Sporadic ORA-12154 errors when connecting
We are occasionally receiving "ORA-12154: TNS:could not resolve service name" errors in all of the applications running on our W2K web server connected to an 8.1.6 database on a Sun server. Does anyone have any idea what is causing this and how we can prevent it?
Try using an IP address in your tnsnames.ora instead of a machine name for a tns entry.
Similar Messages
-
ORA-12154: Error when connecting to asm instance
hi all, I am now facing new problem with asm of clusterware, I failed to connect to asm instance, there is how I did it:
sqlplus /nologSQL*Plus: Release 11.2.0.1.0 Production on Wed Jul 7 04:58:52 2010
Copyright (c) 1982, 2010, Oracle. All rights reserved.
SQL> connect sys@+ASM as sysasm
Enter password:
ERROR:
ORA-12154: TNS:could not resolve the connect identifier specified
I consider listener is correct configed.
lsnrctl statusLSNRCTL for 64-bit Windows: Version 11.2.0.1.0 - Production on 07-JUL-2010 08:51:49
Copyright (c) 1991, 2010, Oracle. All rights reserved.
Connecting to (ADDRESS=(PROTOCOL=tcp)(HOST=)(PORT=1521))
STATUS of the LISTENER
Alias LISTENER
Version TNSLSNR for 64-bit Windows: Version 11.2.0.1.0 - Produ
ction
Start Date 05-JUL-2010 22:12:29
Uptime 1 days 6 hr. 39 min. 23 sec
Trace Level off
Security ON: Local OS Authentication
SNMP OFF
Listener Parameter File E:\app\11.2.0\grid\network\admin\listener.ora
Listener Log File e:\app\11.2.0\grid\log\diag\tnslsnr\rac1\listener\aler
t\log.xml
Listening Endpoints Summary...
(DESCRIPTION=(ADDRESS=(PROTOCOL=ipc)(PIPENAME=\\.\pipe\LISTENERipc)))
(DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=192.168.0.110)(PORT=1521)))
(DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=192.168.0.112)(PORT=1521)))
Services Summary...
Service "+ASM" has 1 instance(s).
Instance "+asm2", status READY, has 1 handler(s) for this service...
Service "itpub" has 1 instance(s).
Instance "itpub2", status READY, has 1 handler(s) for this service...
Service "itpubXDB" has 1 instance(s).
Instance "itpub2", status READY, has 1 handler(s) for this service...
The command completed successfully
How to resolve the promblem? Best regards..thank you for you kind.. I forgot it... but after I modify tnsname.ora, Error number changed..
tnsname.ora:
# tnsnames.ora Network Configuration File: E:\oracle\product\11.2.0\dbhome_1\network\admin\tnsnames.ora
# Generated by Oracle configuration tools.
ITPUB =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = TCP)(HOST = rac-cluster-scan)(PORT = 1521))
(CONNECT_DATA =
(SERVER = DEDICATED)
(SERVICE_NAME = itpub)
+ASM =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = TCP)(HOST = rac-cluster-scan)(PORT = 1521))
(CONNECT_DATA =
(SERVER = DEDICATED)
(SERVICE_NAME = +ASM)
*>sqlplus /nolog*
SQL*Plus: Release 11.2.0.1.0 Production on Wed Jul 7 12:50:07 2010
Copyright (c) 1982, 2010, Oracle. All rights reserved.
SQL> connect sys@+asm as sysasm
Enter password:
ERROR:
ORA-12514: TNS:listener does not currently know of service requested in connect
descriptor
SQL>
tnsping +asmTNS Ping Utility for 64-bit Windows: Version 11.2.0.1.0 - Production on 07-JUL-2
010 12:51:09
Copyright (c) 1997, 2010, Oracle. All rights reserved.
Used parameter files:
E:\oracle\product\11.2.0\dbhome_1\network\admin\sqlnet.ora
Used TNSNAMES adapter to resolve the alias
Attempting to contact (DESCRIPTION = (ADDRESS = (PROTOCOL = TCP)(HOST = rac-clus
ter-scan)(PORT = 1521)) (CONNECT_DATA = (SERVER = DEDICATED) (SERVICE_NAME = +as
m)))
OK (20 msec) -
Ora 12154 error when trying to add a database to VS Server Explorer
Hi Everyone,
I get the Ora 12154 error when trying to add a database to VS Server Explorer.
How do I get around this problem.
The database service is running and I can connect to the database with pl/sql.
I can also tnsping the database and that is also ok.
Looks like a problem with the odp.net software.
I am running the 32 bit Oracle 11g on a Windows7 Home Premium 64 bit PC.
I am new to this stuff so please help me step by step.
Thanks.
EmadHi J. B.
I have a question related to this. After you told me about the //host:1521/database alias I tried it in a VB 2008 program and it worked and returned data. At least I know that it can be used in a VB program without issues. I just now need to be able to add a connection with the Server Explorer.
Anyway here is the VB coding I used. I'm new to this and still learning:
Imports Oracle.DataAccess.Client ' Visual Basic ODP.NET Oracle managed provider
Public Class Form1
' String to connect to the database.
Dim strConnectionString As String = _
"Data Source=//emad-pc:1521/emadeva;User ID=scott;Password=tiger;" '
' Associate the connection string with a connection object.
Dim objOracleConnection As New OracleConnection(strConnectionString)
' SQL query for returning data rows.
Dim strSqlQuery As String = _
"Select dname, deptno " & _
"From dept " & _
"Where deptno = 10" '
' Command object to make this query work.
Dim objOracleCommand As New OracleCommand(strSqlQuery, objOracleConnection)
Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
' Identify what type of command is being used.
objOracleCommand.CommandType = CommandType.Text
Try
objOracleConnection.Open()
' Set up a Data Reader and load it with data.
Dim objOracleDataReader As OracleDataReader = _
objOracleCommand.ExecuteReader()
objOracleDataReader.Read()
' Convert the department number to a string.
lblDepartmentNumberFromOracle.Text = _
CStr(objOracleDataReader.Item("deptno"))
Catch ex As Exception
MessageBox.Show(ex.Message, "Error")
End Try
End Sub
End Class
I still want to thank you for the help you are providing.
Truly,
Emad -
ORA-12154 Error - NET8 Connection Tester Works Though
I have copied over a tnsnames.ora file from another machine I know that works fine. It has one Oracle home.
When I try to connect via SQLPlus or Oracle DBA studio, I get told that it cannot resolve the service name and the ORA-12154 error. However, when I go into Net8 Assistant and test the connection, it work without an issue no matter what login/password I use, from a developers to the system login and password.
Any ideas?I have copied over a tnsnames.ora file from another machine I know that works fine. It has one Oracle home.
When I try to connect via SQLPlus or Oracle DBA studio, I get told that it cannot resolve the service name and the ORA-12154 error. However, when I go into Net8 Assistant and test the connection, it work without an issue no matter what login/password I use, from a developers to the system login and password.
Any ideas? -
ORA-12154 error when trying to connect to Oracle 11g DB from Excel 2010
All,
I am trying to set up Excel 2010 64-bit to connect to an Oracle 11g database, but am having some trouble due to an "ORA-12154 could not resolve the connect identifier specified" error. I am able to TNSping the SID name, as well as connect to SQLplus. The TNS entry works, and the Oracle Home is in the right spot. I am even able to put the full connection string in the "Data Source" field when creating a data link in Excel and have it connect to the DB. But I would like to be able to create one that used the SID rather than the full connection string, as other users will have to use this. The developer behind the Excel solution created a number of .odc files to connect to various databases, so this gives extra weight behind figuring out how to connect via a SID rather than a full connection string. Any suggestions?user10832104 wrote:
All,
I am trying to set up Excel 2010 64-bit to connect to an Oracle 11g database, but am having some trouble due to an "ORA-12154 could not resolve the connect identifier specified" error. I am able to TNSping the SID name, as well as connect to SQLplus. The TNS entry works, and the Oracle Home is in the right spot. I am even able to put the full connection string in the "Data Source" field when creating a data link in Excel and have it connect to the DB. But I would like to be able to create one that used the SID rather than the full connection string, as other users will have to use this. The developer behind the Excel solution created a number of .odc files to connect to various databases, so this gives extra weight behind figuring out how to connect via a SID rather than a full connection string. Any suggestions?
If you are able to connect with sqlplus, then this really becomes a question of how to define a data connection in Excel.
But after quickly googling ..
In excel ...
"Data" tab
"from other sources"
"from data connection wizard"
select ODBC DSN
On data link properties, select the "connection" tab
select "Use Data Source Name" and hit the drop-down
select a dsn that you had previously set up to point to the oracle database.
Anyway, that looks like how it is supposed to be done. I'm getting a dll initialization error. Probably due to the fact I have both 32-bit and 64-bit oracle clients, and windows never handles that very gracefully. But then Windows never graceffully handles anything that isn't MicroSoft. To paraphrase Forest Gump, "My momma always said Windows was like a box of chocolates. You never know what you're going to get."
In any event, the error you report means it was actually tying to look it up in tnsnames, but what you supplied wasn't found there. That can also be a big issue when dealing with MS products, because they don't use the same terminology, so lead people into entering something other than what Oracle expects. Are you referencing an ODBC DSN? If so, have you tested that apart from Excel? -
Gives ORA-12154 error, when trying to connect as sysdba
Hi Gurus,
I am new to oracle. I have successfully install Oracle Database 10gR2 on RHEL4.
Everyghing is working fine.
I found that loging through sqlplus not success as sysdba.(ORA-12154) But as a normal user I can loging through sqlplus. Anyway I can loging as sysdba through emctl console.
Can anyone help on this pls. Urgent.......................You're welcome.
I dont know how this happened Probably your old password had some special characters within it, that's why I wanted to know if connecting without password did work. Then I would have advised you to change your password (avoiding special characters...). -
ORA-12699: error when connecting to server with FIPS enabled
Hi all,
I have a oracle client and server with FIPS enabled on them. When I use SQL Developer from the client, I can connect to the server and run queries on them.
I have an ADO based application, which I am trying to run on the client to query the oracle server, but the open database call seems to fail on this with the ORA-12699 error ..
Heres the connection string I am using ... "Provider=OraOLEDB.Oracle;Data Source=Test;User Id=scott;Password=tiger;"
Are there any other options to be added to the connection string string ?? any ideas / comments would be of great help ...
Note : I am using Oracle 11G ..
--sachiNaveen,
Forms 5.0 is not certified and not tested with Oracle DB 10g because it was desupported before 10g got released.
The other problem is hard to give a generic answer for and I suggest to address this to metalink.oracle.com
Frank -
TNS Ora-12532 error When connecting with Db11 running in the VM
I created a virtual machine from the PVM Entrerprise Linux 5 64 bits and db11g.
Inside the virtual Machine the sqlplus system/manager1@VDB11 is working well.
The tnsping 172.20.0.33 is working well too.
But from the other external machine using oracle 11g client these command are not working: Tns Ora-12532 error.
What to do?
Thanksmy virtual machine: vm1 have an static ip address 172.20.0.33
the oracle listener is was configured with the same ip
in the virtual machine : vm1 the /etc/hosts file content is:
127.0.0.1 localhost.localdomain
172.20.0.33 virtualdb11
in the tnsnames.ora file in the virtual machine i have a service:
VDB11 ...( host=172.20.0.33) (port=1521)
under console connection with my virtual machine vm1 the command : sqlplus system/manager1@VDB11 is working well
but when i working in an other external machine , where the tnsnames.ora have an entry:
VDB11 ...(host=172.20.0.33)......
the ping command : ping 172.20.0.33 is working well
but sqlplus system/manager1@VDB11 is not work and return the error:
ora-12532 tns -
ORA-12154 error when logging into SQL*Plus
I installed Oracle 10g (10.2.0.3.0) server on a Hyper-V virtual machine running Windows Server 2008 Enterprise as a standalone server. I did a software only install and then ran the Database Configuration Assistant to create a database. I also ran the Oracle Net Configuration Assistant to configure the Listener, Naming Methods, and Local Net Service Name. I ran the test in the Net Configuration Assistant and it was successful after I changed the login credentials to use the SYSTEM account and password. TNSPING of the net service name is successful. I can also successfully connect to the database via Enterprise Manager using the SYSTEM account and password. What I can NOT do is connect locally to the database via SQL*Plus (either through the gui or command line). I get the following error:
ERROR:
ORA-12154: TNS: Could not resolve the connect identifier specified
I've checked and double-checked the LISTENER.ORA, SQLNET.ORA, and TNSNAMES.ORA files. They all seem correct to me, especially since I used the configuration assistants to create them.
Anyone have an idea what might be wrong or what I can check next? Any help would be appreciated!
Thanks!They all seem correct to me, especially since I used the configuration assistants to create them. Garbage In, Garbage Out.
Since Oracle throws an error, I strongly suspect you are mistaken.
Simply put, you are using something like "@REMOTE" someplace & somehow and the error indicates SQL*Net does not know to what @REMOTE refers.
How many systems are involved, names, OS version, etc?
post connection string & post contents of tnsnames.ora file. -
ORA-03106 Error when connecting to Oracle 10g from Forms 6i
I have migrated my database from Oracle 8.0.5 to Oracle 10g, version 10.0.1.0.3 through import-export utility. During migration, one difference I made was to change the NLS_LANG to UTF8 from ANSI.
The NLS_LANG for client is AMERICAN_AMERICA.WE81S08859P1.
I am using HP ML370 Proliant Server and running Red Hat Enterprise Linux AS version 3 with Oracle 10g
My client-server application is based on Oracle Developer version 2.1. I am using forms 5.0 and reports 3.0 only.
The problem with me is that the client-server application is working against the upgraded database, but with greatly downgraded speed. The .fmb files cannot be compiled, however some of the .rdf files are compiled successfully, but remaining not.
My question is that is Developer 2000 (Forms 5.0.6 and Reports 3.0.5) compatable with Oracle 10 database, as my application is running very slow ?
I tried Forms 6i to remove this problem. I used Forms Developer 6i Recut version and successfully installed on Windows XP, however, when try to create connection using Net 8 Easy Utility, the connection does not establish with following error:
ORA-03106 : fatal two-task communication protocol error
The entry has been checked in tnsnames.ora and is found correct. I also tried connecting through SQL, but the application closes.
The patch set 17 for installation on Windows XP has also been applied, but still the same error persits.
The same installation has also been checked on Windows 2000, but the same problem persists.
I would be thankful if any one provide me solution for the same. Where I am mistaken and what do I do to get out of this problem.
Regards
Naveen.Naveen,
Forms 5.0 is not certified and not tested with Oracle DB 10g because it was desupported before 10g got released.
The other problem is hard to give a generic answer for and I suggest to address this to metalink.oracle.com
Frank -
ORA-12514 Error when connection from OEM
I have RAC database. I can access Cluster from https://rs1pre91dvdba01.pre.ccosvc.com:5500/em
but when clicking on database tab -> Performance -> Afer giving username / password I get
Listener refused the connection with the following error: ORA-12514, TNS:listener does not currently know of service requested in connect descriptor The Connection descriptor used by the client was: (description=(address_list=(address=(host=rs1pre91cl)(protocol=tcp)(port=1521))(address=(host=rs1pre91cl)(protocol=tcp)(port=1521))(load_balance=yes))(connect_data=(service_name=DWH1)))
[oracle@rs1pre91dvdba01 admin]$ . oraenv
ORACLE_SID = [oracle] ? DWH1
The Oracle base for ORACLE_HOME=/u01/app/oracle/product/11.2.0/dbhome_1 is /u01/app/oracle
[oracle@rs1pre91dvdba01 admin]$ emctl status dbconsole
Oracle Enterprise Manager 11g Database Control Release 11.2.0.1.0
Copyright (c) 1996, 2009 Oracle Corporation. All rights reserved.
https://rs1pre91dvdba01.pre.ccosvc.com:5500/em/console/aboutApplication
Oracle Enterprise Manager 11g is running.
Logs are generated in directory /u01/app/oracle/product/11.2.0/dbhome_1/rs1pre91dvdba01_DWH1/sysman/log
How can I access Performance tab from OEM.
thanks.[oracle@rs1pre91dvdba01 admin]$ lsnrctl status
LSNRCTL for Linux: Version 11.2.0.1.0 - Production on 02-FEB-2011 15:37:35
Copyright (c) 1991, 2009, Oracle. All rights reserved.
Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=IPC)(KEY=LISTENER)))
STATUS of the LISTENER
Alias LISTENER
Version TNSLSNR for Linux: Version 11.2.0.1.0 - Production
Start Date 05-JAN-2011 12:06:28
Uptime 28 days 3 hr. 31 min. 7 sec
Trace Level off
Security ON: Local OS Authentication
SNMP OFF
Listener Parameter File /u01/app/11.2.0/grid/network/admin/listener.ora
Listener Log File /u01/app/oracle/diag/tnslsnr/rs1pre91dvdba01/listener/alert/log.xml
Listening Endpoints Summary...
(DESCRIPTION=(ADDRESS=(PROTOCOL=ipc)(KEY=LISTENER)))
(DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=172.30.2.201)(PORT=1521)))
(DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=172.30.2.203)(PORT=1521)))
Services Summary...
Service "+ASM" has 1 instance(s).
Instance "+ASM1", status READY, has 1 handler(s) for this service...
Service "DWH1" has 1 instance(s).
Instance "DWH11", status READY, has 1 handler(s) for this service...
Service "DWH1XDB" has 1 instance(s).
Instance "DWH11", status READY, has 1 handler(s) for this service...
Service "MDM1" has 1 instance(s).
Instance "MDM11", status READY, has 1 handler(s) for this service...
Service "MDM1XDB" has 1 instance(s).
Instance "MDM11", status READY, has 1 handler(s) for this service...
The command completed successfully
[oracle@rs1pre91dvdba01 admin]$ lsnrctl service
LSNRCTL for Linux: Version 11.2.0.1.0 - Production on 02-FEB-2011 15:37:44
Copyright (c) 1991, 2009, Oracle. All rights reserved.
Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=IPC)(KEY=LISTENER)))
Services Summary...
Service "+ASM" has 1 instance(s).
Instance "+ASM1", status READY, has 1 handler(s) for this service...
Handler(s):
"DEDICATED" established:34200 refused:0 state:ready
LOCAL SERVER
Service "DWH1" has 1 instance(s).
Instance "DWH11", status READY, has 1 handler(s) for this service...
Handler(s):
"DEDICATED" established:106 refused:0 state:ready
LOCAL SERVER
Service "DWH1XDB" has 1 instance(s).
Instance "DWH11", status READY, has 1 handler(s) for this service...
Handler(s):
"D000" established:0 refused:0 current:0 max:1022 state:ready
DISPATCHER <machine: rs1pre91dvdba01.pre.ccosvc.com, pid: 6845>
(ADDRESS=(PROTOCOL=tcp)(HOST=rs1pre91dvdba01.pre.ccosvc.com)(PORT=45445))
Service "MDM1" has 1 instance(s).
Instance "MDM11", status READY, has 1 handler(s) for this service...
Handler(s):
"DEDICATED" established:56105 refused:0 state:ready
LOCAL SERVER
Service "MDM1XDB" has 1 instance(s).
Instance "MDM11", status READY, has 1 handler(s) for this service...
Handler(s):
"D000" established:0 refused:0 current:0 max:1022 state:ready
DISPATCHER <machine: rs1pre91dvdba01.pre.ccosvc.com, pid: 24224>
(ADDRESS=(PROTOCOL=tcp)(HOST=rs1pre91dvdba01.pre.ccosvc.com)(PORT=59486))
The command completed successfully
[oracle@rs1pre91dvdba01 admin]$ id
uid=500(oracle) gid=500(oinstall) groups=500(oinstall),501(dba)
[oracle@rs1pre91dvdba01 admin]$ env | sort
ASM_SID=+ASM1
_=/bin/env
COBBLER_SERVER=ccoshs02xvsat01.ccosvc.com
DB_HOME_BIN=/u01/app/oracle/product/11.2.0/dbhome_1/bin
DB_HOME=/u01/app/oracle/product/11.2.0/dbhome_1
DISPLAY=localhost:10.0
DWH_SID=DWH11
G_BROKEN_FILENAMES=1
GI_HOME_BIN=/u01/app/11.2.0/grid/bin
GI_HOME=/u01/app/11.2.0/grid
GRID_HOME=/u01/app/11.2.0/grid
HISTSIZE=1000
HOME=/home/oracle/
HOSTNAME=rs1pre91dvdba01.pre.ccosvc.com
INPUTRC=/etc/inputrc
LANG=en_GB
LD_LIBRARY_PATH=/u01/app/oracle/product/11.2.0/dbhome_1/lib
LESSOPEN=|/usr/bin/lesspipe.sh %s
LOGNAME=oracle
LS_COLORS=no=00:fi=00:di=00;34:ln=00;36:pi=40;33:so=00;35:bd=40;33;01:cd=40;33;01:or=01;05;37;41:mi=01;05;37;41:ex=00;32:*.cmd=00;32:*.exe=00;32:*.com=00;32:*.btm=00;32:*.bat=00;32:*.sh=00;32:*.csh=00;32:*.tar=00;31:*.tgz=00;31:*.arj=00;31:*.taz=00;31:*.lzh=00;31:*.zip=00;31:*.z=00;31:*.Z=00;31:*.gz=00;31:*.bz2=00;31:*.bz=00;31:*.tz=00;31:*.rpm=00;31:*.cpio=00;31:*.jpg=00;35:*.gif=00;35:*.bmp=00;35:*.xbm=00;35:*.xpm=00;35:*.png=00;35:*.tif=00;35:
MAIL=/var/spool/mail/oracle
MDM_SID=MDM11
NLS_DATE_FORMAT=dd-mm-yyyy hh24:mi:ss
OLDPWD=/u01/app/oracle/product/11.2.0/dbhome_1/rs1pre91dvdba01_DWH1/sysman/config
ORACLE_BASE=/u01/app/oracle
ORACLE_HOME=/u01/app/oracle/product/11.2.0/dbhome_1
ORACLE_SID=DWH1
ORACLE_UNQNAME=DWH1
PATH=/u01/app/oracle/product/11.2.0/dbhome_1/bin:/usr/kerberos/bin:/usr/local/bin:/bin:/usr/bin:/usr/sbin:/home/oracle//bin
PWD=/u01/app/oracle/product/11.2.0/dbhome_1/network/admin
SHELL=/bin/bash
SHLVL=1
SSH_ASKPASS=/usr/libexec/openssh/gnome-ssh-askpass
SSH_CLIENT=172.30.0.125 58337 22
SSH_CONNECTION=172.30.0.125 58337 172.30.2.201 22
SSH_TTY=/dev/pts/0
SVN_EDITOR=vi
TERM=xterm
TNS_ADMIN=/u01/app/11.2.0/grid/network/admin
USER=oracle -
Ora-12203 error when connecting to oracle 9i on win2003 - urgent help reqd
hi
one of our clients who is on same N3 network and is trying to log on to our oracle 9i database which is installed on windows 2003 + srv pack 1 but is getting ora-12203 erorr.
the ip address of the client machine has been allowed thr our firewalls and been allowed to use sqlnet on oracle port 1521
following setting have also been done
in registry HKEY_LOCAL_MACHINE\SOFTWARE\ORACLE\HOME(0) i have set
USED_SHARED_SOCKET=TRUE
using Net manager, i have set connection type as DEDICATED_SERVER.
protocol as TCP/IP and Port no =1521.
At O/S level we have given oracle_home for 9i access (read, modify execute ..etc) to all sub-folders under e:\orant\ora9i
i have restarted the listener service and also the windows 2003 server.
Is there any specific setup criteria which we need to cater when users connect to windows 2003 server
thanks
kedarHi Paul
we have 2 external machine which have been given access thr our firewalls
our database is in Wales and the machines are in england.
everything is ok on the server as i have checked the settings which i could know of
All these machines are on same N3 network , the 2 client machines have DNSlookup set which goes thr all the necessary firewalls and when the following command is run on client machine it can see the server
c:\> nslookup < machine_name >
the access to our database is given thr range of ip address as we dont have static IP and when the above command is run it returns dynamic IP address for the database in Wales
H:\>nslookup krusty.hsw.wales.nhs.uk
Server: bwd-dc1.bwd.xelpct.nhs.uk
Address: 10.xxx.xx.xx
Non-authoritative answer:
Name: krusty.hsw.wales.nhs.uk
Address: 194.xxxx.x.xx <---- ip address of databse
Thanks
Kedar -
Dear Friends,
I am using OCI and instant_client (11.2.0.3.0) in my C++ program (on Windows 7) to connect remotely to 11G database.
While doing a connection using server name as well as servername:port/service_name as connection strings, I am getting error of ORA-12504 TNS:listener was not given the SERVICE_NAME in CONNECT_DATA.
According to instant client FAQ & white paper at http://www.oracle.com/technetwork/database/features/instant-client/index.html, no tnsnames.ora is required for instant client. Then why could I be getting this error?
I ensured that only the instant client directory is in Path environment variable. There was a ODBC driver installed on this same host. Could that be modifying the behavior of instant client?
Kindly guide.
Many thanks in advance for your help and time.
Best Regards,
- ganesh>>what is the exact connect string you are using?
For connection, I am using the plain hostname on which the DB server is running.
>>are you calling OCIServerAttach before OCISessionBegin?
I am not using OCISessionBegin. For connecting to DB server, I am using the following sequence of OCI calls (in this same order):
1) g_OCIEnvNlsCreate
2) g_OCIHandleAlloc //-- error handle: OCI_HTYPE_ERROR
3) g_OCIHandleAlloc // --- sevice context: OCI_HTYPE_SVCCTX
4) Setting driver name and application name for the session:
OCISession* usersession = 0;
ret = g_OCIAttrGet(m_pSvcCtx, OCI_HTYPE_SVCCTX, &usersession, NULL,
OCI_ATTR_SESSION, m_pErrHdl);
if (ret == OCI_SUCCESS)
ret = g_OCIAttrSet(usersession, OCI_HTYPE_SESSION, (void*)"OCI_DRV", 2,OCI_ATTR_DRIVER_NAME, m_pErrHdl);
ret = g_OCIAttrSet(usersession, OCI_HTYPE_SESSION, (void*)"ClientApplication", <ub4>(strlen("DataReconScanning")), OCI_ATTR_CLIENT_IDENTIFIER, m_pErrHdl);
5) g_OCILogon() using the user, password and host name, as below:
g_OCILogon(m_pDbCon, m_pErrHdl, &m_pSvcCtx,
(text*)user.c_str(), static_cast<ub4>(user.length()),
(text*)pass.c_str(), static_cast<ub4>(pass.length()),
(text*)host.c_str(), static_cast<ub4>(host.length()));
Thanks. -
Hi,
I am a newbie in oracle forms. I have installed oracle database 10gr2 on windows xp in c directory. In D drive i have installed oracle developer suite 10g. When i try to connect database from developer suite i receive ORA 12154 error.
Do i need to change tnsnames.ora in developer suites 'D' directory or in database'C' directory.
Please explain me in steps so that i can configure developer suite.
Thank YouForms will use its own Tnsnames.ora file so create alias for it
Run NetCA from
START > PROGRAMS > ORACLE - Oracle HOME name > Configuration and Migration tools > Net Configuration Assistant
and create Alias for Local naming
also make sure the Listener and Database is up and running
Baig,
[My Oracle Blog|http://baigsorcl.blogspot.com/] -
If your getting the ora-12154 error...
If you have followed the directions provided and swear you have done everything right... then try this.
Check to make sure the tnsnames.ora and sqlnet.ora files are actually .ORA files. I recently started a new job and was tasked with getting instant client working with a VB app. Anyhow, I installed instant client and added the enviroment variables etc etc. I kept getting the 12154 error when testing a sqlplus connection and I couldn't understand why.
Well since this was a new computer I was working on, I hadn't change the setting when viewing files so it was hiding the file type from me and all I could see was "tnsnames.ora" when the file was really "tnsnames.ora.txt". A day later I figured it out and felt pretty stupid!
Windows Explorer | Tools | Folder Options | View | Uncheck "Hide extensions for known file types"
Check those file types people...I think you had done a "terrific" job helping novices like me to check/fix the error with the hidden tnsnames.ora.txt extension. I think it is very useful information.
Thank a lot.
Maybe you are looking for
-
Cannot connect to the Internet with browser when using VPN
I am experiencing an odd network problem and am hoping that someone on this list has seen something similar and can help me isolate the cause. I have a Mac Pro running Mac OS X (10.5.8) and use Cisco's VPNClient to connect to my employer's network. S
-
Creating transfer order for delivery with ABAP
Hi Experts, I'm using L_TO_CREATE_DN to create a transfer order for delivery note... Is it possible to use this function or another one, to create a transfer order for one position of the delivery note ? Regards, David
-
Is anybody else experiencing problems accessing the itunes store?
i'm on a macbook pro 10.6.8. my itunes is 10.3.1. i haven't experienced problems before, just today when i was trying to update some iphone apps. the updates wouldn't download and it kept giving me the network timeout error. i checked my connection
-
RAID pro´s look this way
Need some help. See my specs below... Got my two Maxtor UATA133 80GB two days ago. Yesterday i started to set up my RAID and decided to go for the "0" knowing its a bit of a risk... True. After having struggeled a bit with the ACARD driver that came
-
Question about 3rd party Plug-ins....
Is it just me or does Logic have some SERIOUS issues with 3rd party AU? For example, I can run Logic with all its own plugins and instruments just fine but the second I go to use my FM7, Novation Bass Station, or impOSCar I start experiencing bugs, c