Print Thread
Unable to connect to DB
#40965 06/10/11 02:51 PM
Joined: Jun 2011
Posts: 12
G
Member
OP Offline
Member
G
Joined: Jun 2011
Posts: 12
Hello,
New (returning ) DOA user.
Installed latest DOA for Delphi 2010
Running Windows 7 - 64
Installed 11gR2 64 bit.

Compiled DOA demo Query Grid. Run it... Got expected error.
Downloaded and installed Oracle 32 bit Client into a new directory, specifically instantclient-basic-nt-11.2.0.2.0.zip

Changed path so that the instant client path is BEFORE Oracle home path.

Copied TNSNAMES.ora from ..NETWORK/ADMIN to instant client directory.

Database name is called test.

I open up a cmd command window, and can connect via
sqlplus sh/sh
or
sqlplus sh/sh@test

There are NO Oracle environment variables that are set, such as ORACLE_SID or ORACLE_HOME.

PATH is set to
Path=C:\Program Files\Common Files\Microsoft Shared\Windows Live;C:\Program Files (x86)\Common Files\MicrosoftShared\Windows Live;e:\11gR2\product\11.2.0\ClientInstall\instantclient_11_2\;e:\11gR2\product\11.2.0\dbhome_1\bin;C:\Program Files (x86)\Common Files\ArcSoftBin;D:Delphi2010\RAD Studio\7.0\bin; [THen a bunch of other things]

I have verified that there are no typos in the instant client path name.

My tnsnames.ora file is
# tnsnames.ora Network Configuration File: e:\11gR2\product\11.2.0\dbhome_1\network\admin\tnsnames.ora
# Generated by Oracle configuration tools.

LISTENER_TEST =
(ADDRESS = (PROTOCOL = TCP)(HOST = localhost)(PORT = 1521))


ORACLR_CONNECTION_DATA =
(DESCRIPTION =
(ADDRESS_LIST =
(ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC1521))
)
(CONNECT_DATA =
(SID = CLRExtProc)
(PRESENTATION = RO)
)
)

TEST =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = TCP)(HOST = localhost)(PORT = 1521))
(CONNECT_DATA =
(SERVER = DEDICATED)
(SERVICE_NAME = TEST)
)
)


TNSPING test shows...
that is is connecting fine, although it is using the tnsnames.ora file in the Oacle_home\network\admin directory, and not the Instant client directory.

e:\11gR2\product\11.2.0\ClientInstall\instantclient_11_2>tnsping test

TNS Ping Utility for 64-bit Windows: Version 11.2.0.1.0 - Production on 10-JUN-2
011 10:48:39

Copyright (c) 1997, 2010, Oracle. All rights reserved.

Used parameter files:
e:\11gR2\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 = localhos
t)(PORT = 1521)) (CONNECT_DATA = (SERVER = DEDICATED) (SERVICE_NAME = TEST)))
OK (0 msec)

The specific error that I am getting when I run the Oracledemo with JUST username and password is: ORA-12560: TNS protocol adapter error, and it comes back immediately.

If I run the demo, and try to log on with user name, password and a database name of test, I get an 18 second delay, then the error message:
ORA-12154: TNS: could not resolve the connect identifier specified.

I have tried the database name in both upper case and all lower case, but it makes no difference.

Any help appreciated.

Thanks
George S





Re: Unable to connect to DB
G Spears #41629 07/21/11 07:36 PM
Joined: Jul 2011
Posts: 1
Maine, USA
P
Member
Offline
Member
P
Joined: Jul 2011
Posts: 1
Maine, USA
I'm having the same problem with a similar configuration:

Windows 7 64 bit
Delphi 2006

I can compile and run with no problem, but the TSession component can't connect during design. I've tried different databases, verified tnsnames, etc. Is the problem caused by the 64 bit OS?

Re: Unable to connect to DB
Peggy #41631 07/22/11 08:45 AM
Joined: Aug 1999
Posts: 22,221
Member
Offline
Member
Joined: Aug 1999
Posts: 22,221
On Windows 7 64 Bit you will need to install a 32 Bit Oracle Client. Delphi generates a 32 Bit application, so it cannot interface with a 64 Bit Oracle Client.

The 32 Bit Oracle Client can communicate with a 64 Bit Server, even on the same machine if necessary. The 32 Bit client can coexist with a 64 Bit Oracle installation when installed in separate Oracle Home directories.


Marco Kalter
Allround Automations

Moderated by  support 

Link Copied to Clipboard
Powered by UBB.threads™ PHP Forum Software 7.7.4
(Release build 20200307)
Responsive Width:

PHP: 7.1.33 Page Time: 0.073s Queries: 14 (0.024s) Memory: 2.5105 MB (Peak: 3.0421 MB) Data Comp: Off Server Time: 2024-05-22 03:25:34 UTC
Valid HTML 5 and Valid CSS