PDA

View Full Version : Connecting to Oracle from QT App



KaptainKarl
16th August 2007, 01:47
I'm using QT4.3.1 on a Suse Enterprise Desktop 10.2 system.
I am attempting to connect to a remote Oracle 9 database on a Solaris system.
I have installed the Oracle 9 client on the Suse system. I can connect to the database on the Solaris system using the following sqlplus connection string:

./sqlplus firms/hn255pfp@tuts

I attempted to connect to the same database using the sqlbrowser demo in QT. I select the QOCI driver, enter the same information as above and I get the following:

An error occured while opening the connection: ORA-12154: TNS:could not resolve the connect identifier specified
QOCI: Unable to logon

Clearly I am ignorantly missing something. I would appreciate any help available.

Thanks,
Karl

jacek
17th August 2007, 00:29
That connection string consists of three fields (userid/password@db). You have to input each of them in corresponding line edit in sqlbrowser's Connect... dialog.

PS. For security reasons you should never disclose your user names and passwords, even if they're only for "test" accounts.

mm78
17th August 2007, 09:06
Is the tnsnames.ora file set up correctly?

http://www.oracle-base.com/articles/misc/OracleNetworkConfiguration.php#TNSNames