Data Pump export using cloud shell - oracle

I am trying to export schema using data pump on Oracle Cloud Autonomous database.
I am using cloud shell to export schema.
When I tried to do the final step:
expdp admin/password#DB_HIGH schemas=SCHEMA_NAME directory=data_pump_dir dumpfile=exp%U.dmp filesize=1G logfile=expot.log
I got
UDE-12154: operation generated ORACLE error 12154 ORA-12154:
TNS:could not resolve the connect identifier specified
Do I need Oracle instant client to do export?

The Oracle client code uses one of three ways to look up connect data:
A flat file named tnsnames.ora
Oracle Names service
LDAP
When the complete ORA-12154 error appears with the text line, your program has found a working Oracle client install. However, the specified Oracle service is not listed in tnsnames.ora, Oracle Names or LDAP.
The first step in the troubleshooting process is to determine which name resolution method is deployed at your site. Most sites use tnsnames.ora, but enough use Oracle Names and LDAP, so it’s best to confirm this information.
If you are not the database administrator, get in touch with the people managing your Oracle systems and find out which method you should be using. They may be able to guide you in fixing the problem in accordance with your site’s standards.
The client code decides which mechanism to use based on the file sqlnet.ora. This file and tnsnames can usually both be found in the Oracle install directory (“ORACLE_HOME”), under network/admin/. This location may be overridden with the environment variable TNS_ADMIN.
If the sqlnet.ora file does not exist or does not specify a resolution method, then Oracle Net uses tnsnames.ora.
Example locations of Oracle networking files include:
Windows
ORANTNET80ADMIN
ORACLEORA81NETWORKADMIN
ORAWIN95NETWORKADMIN
ORAWINNETWORKADMIN
UNIX / Linux
$ORACLE_HOME/network/admin/
/etc/
/var/opt/oracle/
If you fix the naming issues, but you still see the ORA-12154 error, check the Oracle service to confirm that it’s available for connections. A power outage, server failure, or network connectivity issue will make this resource inaccessible. It’s also possible that scheduled maintenance or repairs of an unrelated Oracle issue may take that resource temporarily offline.
Thanks

Related

Informatica Workflow Cannot create proper Relational connection object to connect to SQL Server

On my Infa server PC, in Informatica Administration I created a repository service giving Oracle Database information. Once in Informatica I connect to this repository and there I want to create a mapping importing a table from a remote sql server pc (on my home network domain) and then create a workflow to put the data into an oracle target table.
Using ODBC admin console I created and tested the connection and I am also able to telnet the linked sql server and port.
Within informatica I created a relational connection for sql server and when I run the workflow I get the error reason (14007) failed to create and inituiate OLE DB instance and datatabase driven error, failed to connect to database using user I use in SSMS for windows authentication and connection string(). I would like to know, first of of all, if I am doing something wrong, willing to connect me to a repository with oracle database information and then use a sql server table on remote pc. Do I have to create another repository for Sql server and there use sql server tables or I can mix them? secondly I would like to know how to create a relational connection object in informatica for my linked sql server so that it will be the same of relatonal connection created with ODBC admin consolle. Last but not least I would like to understand why gives an error out saying I left connection string empty, when I cannot see a place where I can put it by creating the relational connection object
I might not be able to solve the problem completely, but here's few remarks that might be helpful:
PowerCenter Repository database is where PowerCenter will store all the metadata about the processes you create. It may be Oracle - that's perfectly fine. And as it is not releated to your data sources or targets, you do not need to create another one for different sources/targets. One is enough for all ot them.
Using PowerCenter Workflow Manager create the appropriate connections to all the systems you need. Here you create the connections that indicate ODBC/other connections that will be used by Integration Service to actually connect to your data sources and targets, hence
Make sure the ODBC / other data sources are specified on Intergration Service. It is the IS that will run the process, connect to systems specified in the process with the defined connections.
When you build the mappings, you create them in a client app (Mapping Designer) and you can connect to DB engines to create source and target definitions. Mark, that in such case you use the connection (eg. ODBC data source) defined on the client. Once you will try to actually run the workflow with the given mapping, it is executed on IS (mentioned above) where appropriate connections need to be defined - and that's completely separate.
When editing a session in a workflow, for each source and target you need to pick a connection defined in Informatica Repository, created as described in point 2 above (or use a variable to indicate one - but that's another story)
So the error you mention seems to be related to connection created in Workflow Manager - it probably does not specify the connection string that should refer the data source defined on IS.

sqlplus ORA-12504 running sqlplus locally on oracle server host - but only as non oracle owner account

On various UX environments I run some shellscripts to gather software version info and push it back to a central server. One script does this for Oracle.
On a 12.1.0.2.0 Oracle server (Solaris 11.2 system), the oracle owner account can sqlplus into the local Oracle service, after running oraenv with ORACLE_SID set & ORAENV_ASK=no
Either of these syntaxes works:
sqlplus oracle_ID/password
sqlplus oracle_ID/password#ORACLE_SID
However a non oracle owner account can only use the
sqlplus user_ID/password syntax to connect to the local oracle service!
sqlplus 'user_ID/password#"//hostname:1521/ORACLE_SID"' - syntax also works perfectly.
Attempting to use the following syntax is broken - the first is the one of interest (& works across all other Oracle database hosts for all instances):
sqlplus user_ID/password#ORACLE_SID - ORA-12504: TNS:listener was not given the SERVICE_NAME in CONNECT_DATA
sqlplus user_ID/password#"/ORACLE_SID" - ORA-12154: TNS:could not resolve the connect identifier specified
tnsping ORACLE_SID connects with the service OK.
ohost:~$ truss sqlplus user_ID/password#ORACLE_SID
truss: cannot trace set-id or unreadable object file: /apps/oracle/product/12.1.0.2/bin/sqlplus
It would be best to have one consistent syntax across all my servers for the data gathering script and I was curious why the change of UNIX id would cause this anomaly. Any ideas or ideas how to debug? Thx A.
Update: 15-Apr-2020 - After more GoogFu answer lies in which 'adapter' the user account uses to resolve the 'alias'.
oracle owner uses 'TNSNAMES' adapter whereas monitor account uses 'HOSTNAME' and the HOSTNAME method sends a null SERVICE_NAME field in the CONNECT_DATA. I haven't spotted why the oracle owner uses the TNSNAMES method, yet. I've looked through shell environment variables for both UNIX id's and the oraenv sets up all the ones that refer to the ORACLE_HOME okay. Can't see anything specifically TNS or 'net' related...
Easy when you know how. Seems a little weird to answer my own question...
Simply, the tnsnames.ora file was not world (other) readable. Hence non dba-group accounts had to fall back to the HOSTNAME resolution method.
That was a merry waste of 4 hours. It's not the first time an Oracle installation has had over(?) zealous permissions set on a config or shared object file, inside a 'server' installation, that a genuine client process requires. I haven't looked specifically but it doesn't seem to be filed as a bug with Oracle.

How to see all connector identifiers?

I'm following environment setup guide for my project and there is .bat file with following commands:
sqlplus system/oracle#demo12c #keystorecreate.sql
I'm getting the following error after running the file:
ORA-12154: TNS:could not resolve the connect identifier specified
How to see all connection identifiers to see which one I can use?
demo12c is alias of the database you're connecting to. You should find its entry in the TNSNAMES.ORA file. I don't have 12c version, but - in prior versions - it is (by default) located in the \network\admin directory. For example, for 11gXE, it is something like this:
C:\oraclexe\app\oracle\product\11.2.0\server\network\ADMIN
I presume Oracle didn't change that, so - have a look.
It appears that you won't find demo12c in there. Review the steps described in the environment setup you mentioned; it should mention it, somewhere.
By the way, have you already installed the database? No problem if all of you use the same copy of the database, while each of you has his/her own schema to work with (schema = user and all its objects; it is identified by its name ("username") and a password - the first two parameters you used in the connect string).

getting rid of tnsanme.ora

List item
What is the best way to get rid of tnsnames.ora file on each client
pc ?
Can we use Oracle "transparent gateway" - which uses ODBC drivers to
eliminate "tnsname.ora" file alto gather --to facilitate "oracle to
oracle" connections?
We know one can use Oracle "transparent gateway" to connect to
heterogeneous databases connection e.g., DB2, SQL Server. But can
we use it for Oracle to Oracle?
Any suggestions as to how to get rid of tnsnames.ora?
You can do that when you provide a name server which resolves the TNS alias for you.
With current Oracle you can use:
local naming naming method (which requires an tnsnames.ora file)
directory naming naming method (e.g. with an LDAP Server)
easy connect naming method
CDS external naming method
Network Information Service (NIS) external naming method
Check Oracle documentation Configuring Naming Methods, resp. NAMES.DIRECTORY_PATH to get more information.
Thank you very much for your quick response. My problem is that we have more than 20 Oracle databases and every time when someone gets a new PC or new database is created - that TNSNAmes file needs to be updated, We still have a plenty of legacy client server (two-tier - fat client applications. Your suggestion that we can use Oracle internet directory (OID) in conjunction with Microsft LDAP. Correct? Can we use Microsoft LDAP only without OID? this way we can we get rid of client based Tnsname? correct?

Oracle Connection String With Windows Authentication

We have a requirement to make our products work on Oracle as well as SQL Server (around which they were originally built). Unfortunately we don't have any in house Oracle development experience to speak of but as a senior dev it has fallen to me to lead the project. So far I have managed to make our app connect to an Oracle database (I'm using Oracle XE 11.2) by using the following connection string:
Data Source=(DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=VS010-ORA11GR1)(PORT=1523))(CONNECT_DATA=(SERVICE_NAME=DEVORA)));User Id=dbo;Password=dbo;
The reason we decided to use this type of connection string is because we do not want to rely on changing tnsnames.ora on every client machine. However, as you can see this specifies an Oracle user and associated password. We also need to provide the ability to use the equivalent of SQL Server integrated security.
According to the literature I have read, to do this I simply need to specify / as the user id and then omit the password portion (as this is ignored anyway for Windows authentication). I also created the user in Oracle, making sure it matched the Windows user, with the following snippets:
CREATE USER "OPS$<DOMAIN>\<user>" IDENTIFIED EXTERNALLY;
GRANT CONNECT,RESOURCE TO "OPS$<DOMAIN>\<user>";
I also checked that the sqlnet.ora file on my local machine which hosts the XE instance and my dev environment contained the line:
SQLNET.AUTHENTICATION_SERVICES= (NTS)
I understood that this would enable my app to connect to the Oracle database uing Windows Authentication. However what actually happens is that I get the following Oracle error message:
ORA-01005: null password given; logon denied
this doesn't make much sense because of course its null - it's supposed to be, according to the tutorials I've read.
The app targets .Net Framework 3.5, we are using the System.Data.OracleProvider and the actual connecting and so on is handled by Enterprise Library 5. Incidentally, I am aware of the deprecation of the OracleClient component but I just want this to work before I go into the extra complexities of changing providers.
Can anyone tell me what I'm missing? Have I chosen the wrong type of connection string? I apologise for any basic mistakes but I have always managed to avoid Oracle until now so my knowledge of it is close to zero.
Many thanks
I had the same problem and solved after adding this to conn. string:
Integrated Security=yes
To expand on the answer above by #Stikut. I tested this out with NHibernate 3.3.3.GA and it works.
user id=/;password=;Integrated Security=yes

Resources