I was trying to install both Oracle instantclient-basic-windows.x64-12.1.0.2.0 and instantclient-odbc-windows.x64-12.1.0.2.0
I am getting the following error then testing the ODBC driver configuration:
My tnsnames.ora file has:
UASERVER=
(DESCRIPTION=
(ADDRESS_LIST=
(ADDRESS=
(COMMUNITY=TCP)
(PROTOCOL=TCP)
(HOST=10.3.240.40)
(PORT=1521)
)
)
(CONNECT_DATA=(SERVICE_NAME=RPA-DEV))
)
Could anyone please help me to solve this?
Punya, the message indicates the service name is wrong so if you have the correct port specified I suspect the service name needs a dot extension. Does the sqlnet.ora file provide a default domain? As Alex suggested you should check to see what the target listener is listening for via a status command.
Related
I am trying to export a table from my oracle database with SID=DB034 with username=b034. I am using this command:
expdp b034/aDmin123456789#DBB034 tables=B034.BIL_CUSTOMER_GROUP, DEPT directory=exp_test dumpfile=dump_test.dmp logfile=log_test.log
My directory is correct and also I had granted privileges to b034 user. After running the command I get this error:
ORA-12154: TNS:could not resolve the connect identifier specified
Can anyone help me with this?
The most common cause of ORA-12154 is that database alias (DBB034) can't be found in TNSNAMES.ORA file (the one expdp is using. If you have more than a single Oracle product installed on your computer, I suggest you use TNS_ADMIN environment variable. Say if you need instructions).
That's something like old-fashioned telephones - you're trying to call someone, but can't find their name in any phone book.
So, what to do? Add DBB034 into TNSNAMES.ORA.
As you asked (in a comment) how TNSNAMES.ORA alias looks like, here you are:
DBB034=
(DESCRIPTION=
(ADDRESS=
(PROTOCOL=TCP)
(HOST=11.222.33.44) --> put host name or its IP address here
(PORT=1521) --> usually 1521, but doesn't have to be
)
(CONNECT_DATA=
(SERVICE_NAME=dbb034) --> lucky guess; maybe it is called differently
)
)
Basically, if you aren't sure what to put in there, ask your DBA, they know.
I'm running ORACLE 11gR2 through Windows server 2008 R2. Because of some reason shutdown database with "shutdown immediate" command, but when I need to startup again database, this error message is appear:
"ORA-12560: TNS:protocol adapter error"
about ORA 12560 I consumed many time through internet for finding soloution but all of the is very basic guide that could not solve my problem. please consider to my problem with following below image:
1. when I want to startup database:
set oracle_sid in command prompt and check in windows environment variables:
check lsnrctl status:
tnsping:
check windows oracle service:
so, according those images everything looks fine but my database wont to start again I will be thankful if I have your clear, correct and tested solution for my problem
There are a multitude of things that might be happening here.
I continue to have issues with databases registering properly with the listener. Make a backup of the listener.ora file %ORACLE_HOME%\network\admin\listener.ora and add an entry similar to the following to the SID_LIST. Your ORACLE_HOME path will most likely be different than mine:
(SID_DESC =
(GLOBAL_DBNAME = RDEV.world)
(ORACLE_HOME = D:\Oracle\product\12.2.0\dbhome_1)
(SID_NAME = RDEV)
)
Restart the listener and see if you can connect:
lsnrctl stop
lsnrctl start
The following entry added to the sqlnet.ora file also helps. Again, backup before editing
NAMES.DEFAULT_DOMAIN = WORLD
This allows you to reference the database as ORCL or ORCL.WORLD
These fixes have worked on Oracle 11 and 12 databases.
I am trying to connect from Ubuntu to Oracle in Windows Server. I have installed unixODBC and Oracle driver to Ubuntu. When I try to connect using isql it gives following error:
user#user:~$ isql -v oracle-jono username password
[S1000][unixODBC][Oracle][ODBC][Ora]ORA-12545: Connect failed because target host or object does not exist
[ISQL]ERROR: Could not SQLConnect
And when I run it with sudo I get different error:
[S1000][unixODBC][Oracle][ODBC][Ora]ORA-12162: TNS:net service name is incorrectly specified
I have tried many combinations of enviranment variables without success (ORACLE_HOME, ORACLE_SID, TNS_ADMIN, TWO_TASK). This is my very first time I am doing anything with Oracle so practically I don't know anything about it. I have also tried to modify odbc.ini and tnsnames.ora files.
My odbc.ini for this Oracle connection:
[oracle-jono]
Description = ...
Driver = OracleDriver
Server = 111.222.111.222
User = ...
Password = ...
Port = 1521
Database = mydatabase
My tnsnames.ora:
Data Source=
(DESCRIPTION=
(ADDRESS_LIST=
(ADDRESS=
(PROTOCOL=TCP)
(HOST=111.222.111.222)
(PORT=1521)
)
)
(CONNECT_DATA=
(SERVER=DEDICATED)
(SERVICE_NAME=mydatabase)
)
);User Id=...;Password=...;
Is there something clearly wrong? What should I put to environment variables? Do I have to do something in Windows Server where Oracle database exits (for example Oracle listeners)?
I tried many many things and not sure which of them worked but my guess is that ServerName in odbc.ini fixed this error:
[oracle-jono]
Description = ...
...same as above...
ServerName = //111.222.111.222:1521/mydatabase
when i try to connect any DataBase in my TNSNAMES.ora file SQLPLUS throws
ORA-12154: TNS could not resolve service name
I've already checked this stuff:
TNS_ADMIN environment variable is defined as "C:\oraclexe\app\oracle\product\10.2.0\server\NETWORK\ADMIN"
"C:\oraclexe\app\oracle\product\10.2.0\server\NETWORK\ADMIN\tnsnames.ora" was located
The following connect descriptor was found for my_db in the tnsnames.ora file
my_db=
(DESCRIPTION=
(ADDRESS=
(PROTOCOL=TCP)
(HOST=local.db)
(PORT=1521)
)
(CONNECT_DATA=
(SID=SCMPROD)
)
)
"C:\oraclexe\app\oracle\product\10.2.0\server\NETWORK\ADMIN\sqlnet.ora" was located
NAMES.DIRECTORY_PATH specifies TNSNAMES in the sqlnet.ora file
the question is:
what is missing?
UPDATE
Now on SqlPlus using the usr/pwd#SELFTEST connection string it works
In can't be an error on the server because on my old PC it still accept my connection an all my company works on it.
The tnsname.ora
SELFTEST=
(DESCRIPTION=
(ADDRESS=
(PROTOCOL=TCP)
(HOST=10.100.2.7)
(PORT=1521)
)
(CONNECT_DATA=
(SERVER=dedicated)
(SERVICE_NAME=GOLDtest)
)
)
The problem still exist trying to connect from Toad for Oracle...
ORA-12154: TNS could not resolve service name
my_db=
(DESCRIPTION=
(ADDRESS=
(PROTOCOL=TCP)
(HOST=local.db)
(PORT=1521)
)
(CONNECT_DATA=
(SID=SCMPROD)
)
)
The error is about incorrect service name. I see your tnsnames.ora doesn't have the service_name, rather you have mentioned SID. Probably this is the cause of the error.
You could edit the tnsnames.ora as:
SCMPROD =
(DESCRIPTION =
(ADDRESS_LIST =
(ADDRESS = (PROTOCOL = TCP)(HOST = localhost)(PORT = 1521))
)
(CONNECT_DATA =
(SERVICE_NAME = SCMPROD)
)
)
Assuming, SCMPROD is the service_name.
From the source
ORA-12154: TNS:could not resolve the connect identifier specified
Cause: A connection to a database or other service was requested using a connect identifier, and the connect identifier specified could
not be resolved into a connect descriptor using one of the naming
methods configured. For example, if the type of connect identifier
used was a net service name then the net service name could not be
found in a naming method repository, or the repository could not be
located or reached.
Action:
If you are using local naming (TNSNAMES.ORA file):
Make sure that "TNSNAMES" is listed as one of the values of the NAMES.DIRECTORY_PATH parameter in the Oracle Net profile (SQLNET.ORA)
Verify that a TNSNAMES.ORA file exists and is in the proper directory and is accessible.
Check that the net service name used as the connect identifier exists in the TNSNAMES.ORA file.
Make sure there are no syntax errors anywhere in the TNSNAMES.ORA file. Look for unmatched parentheses or stray characters. Errors in a
TNSNAMES.ORA file may make it unusable.
If you are using directory naming:
Verify that "LDAP" is listed as one of the values of the NAMES.DIRETORY_PATH parameter in the Oracle Net profile (SQLNET.ORA).
Verify that the LDAP directory server is up and that it is accessible.
Verify that the net service name or database name used as the connect identifier is configured in the directory.
Verify that the default context being used is correct by specifying a fully qualified net service name or a full LDAP DN as the connect
identifier
If you are using easy connect naming:
Verify that "EZCONNECT" is listed as one of the values of the NAMES.DIRETORY_PATH parameter in the Oracle Net profile (SQLNET.ORA).
Make sure the host, port and service name specified are correct.
Try enclosing the connect identifier in quote marks. See the Oracle Net Services Administrators Guide or the Oracle operating system
specific guide for more information on naming.
I have a oracle database based on a server, and I want to import the data in the tables on the server.
I am trying to use sqlloadr(sqlldr) for inserting all data in the oracle database, which is on localhost and there is no problem in this case, but the problem occurs while I try to connect a web-server(not localhost).
The command that I've used in localhost case:
sqlldr <usrname>/<password> control=table.ctl log=table.log ERRORS=25000
and following is concerning to web-server
sqlldr <usrname>/<password>#LABSERVER control=table.ctl log=table.log ERRORS=25000
where I created a tnsnames.ora as following:
LABSERVER =
(DESCRIPTION =
(ADDRESS_LIST =
(ADDRESS = (PROTOCOL = TCP)(Host = <hostaddress>)(Port = 1521))
)
(CONNECT_DATA =
(SERVICE_NAME = <servicename>)
)
)
but I got this error:
SQL*Loader-704: Internal error: ulconnect:OCIServerAttache [0]
ORA-12154: TNS:could not resolve the connect identifier specified
Any idea will be appreciated
We had a similar issue and did not have privileges to modify tnsnames.ora on local, so we had to specify the service in the command line like:
sqlldr userid=username/password#\"(DESCRIPTION=(ADDRESS_LIST=(ADDRESS=(PROTOCOL=TCP)(HOST=myDBHost)(PORT= 1521)))(CONNECT_DATA=(SERVER=DEDICATED)(SID=MYDBSID)))\" Control='mytable.ldr' Log='mytable.log'
thanks to https://hs2n.wordpress.com/2012/06/12/oracle-using-sqlplus-and-sqlldr-on-databases-without-tnsnames-entry/#comment-700
"where I created a tnsnames.ora which
is like following:"
That seems to mean you have posted the TNSNAMES.ORA file from the database server.
Remember you also need a TNSNAMES.ORA file on the client. Is that correctly configured too?
Basically this error is telling you that given the host, port, protocol and service_name the client could not find a listening Oracle service. Make sure that your hostname is valid (e.g., you can ping it), that the listener is listening on 1521, and that the service_name in the server database is really the name you specified. You can verify it by issuing this command in sqlplus:
SHOW PARAMETER service_names
which tells you what the database is registering itself as with the listener.
For those, like me, who found this thread.
One thing to check: file permissions on the tnsnames.ora file.
For clients on the same machine yet not part of the DBA group and with ORACLE_HOME and ORACLE_BIN set correctly subject error was reported. File permissions of the tnsnames.ora file precluded world read; as the tnsnames.ora file could not be read 704 / 12514 thrown as service name could not be resolved.
From command prompt: chmod 644 $ORACLE_HOME/network/admin/tnsnames.ora
if your password has a # character , then sqlldr utility will not work , change ur password it will work
http://www-01.ibm.com/support/docview.wss?uid=swg21347615