Operating System - HP-UX
1751811 Members
5348 Online
108781 Solutions
New Discussion юеВ

Oracle Dba studio connection

 
dps
Occasional Advisor

Oracle Dba studio connection

Can connect to database via sqlplus using scott tiger but not get through via dba studio?.

I am on a windows 2000 (iv) Personal Oracle 8i 8.1.7.

I get ORA - 12154 TNS: Could not resolve service name - help????
DPS
8 REPLIES 8
Andreas D. Skjervold
Honored Contributor

Re: Oracle Dba studio connection

Hi

What you have to check is wheter you have sqlplus and DBA studio installed in separate ORACLE_HOMEs, which in effect means that you have 2 separate tnsnames.ora (or 2 ../network/admin folders)

An Oracle client installation makes a /ora8i/network/admin and an Enterprise Manager/DBA studio installation makes an /oracle/ora81/network/admin folder. (or was it the other way around.?)

Check if this is the case and copy your valid tnsnames.ora to the adminfolder where it is missing or incomplete.

Andreas
Only by ignoring what everyone think is important, can you be aware of what everyone ignores!
Alexander M. Ermes
Honored Contributor

Re: Oracle Dba studio connection

Hi there.
You should should set the environment variable TNS_ADMIN directing to the correct directory for the tnsnames.ora ( sample export TNS_ADMIN=c:\ora81\network\admin ) on your workstation.
Rgds
Alexander M. Ermes
.. and all these memories are going to vanish like tears in the rain! final words from Rutger Hauer in "Blade Runner"
dps
Occasional Advisor

Re: Oracle Dba studio connection

Andreas - that has not worked.

I have oracle\ora81\network\admin and
oracle\ora81\admin

I copied over a tnsnames but it made no difference.
DPS
dps
Occasional Advisor

Re: Oracle Dba studio connection

Alexander. Where do i set this enviromental variable.

I am on win 2000 service pack 2. Start control panel system advanced enviromental variables click new ??? Or in regedit somewhere???
DPS
Andreas D. Skjervold
Honored Contributor

Re: Oracle Dba studio connection

Hi

Hmmm.. Its the ..\network\admin that is the correct one.

Do you have an suffix / domain name added to your service name; something like your_db.world = in the tnsnames.ora?
Have sometimes found that some applications need the full service specified while others don't. So sqlplus accepts your_db as service name but DBA studio needs your_db.world? but I migh be on a wrong track here. Will check into it.

Setting TNS_ADMIN is done in My Computer | Properties.

Andreas
Only by ignoring what everyone think is important, can you be aware of what everyone ignores!
T G Manikandan
Honored Contributor

Re: Oracle Dba studio connection

Hello,
check whether you have a entry in the tnsnames.ora file for the new database.
The file is located at $ORACLE_HOME/network/admin directory.
As you are using W2k use Net8 assistant to configure you local net service name.
provide a service name to connect to the machine with database.
else
open your tnsnames.ora file and add entry like the below.
"database-sid".world =
(DESCRIPTION =
(ADDRESS_LIST =
(ADDRESS =
(COMMUNITY = tcp.world)
protocoltype
>>> (PROTOCOL = TCP)
host machine ip-address or hostname.check whether you hostname is resolving properly.
>>> (Host = xx.xx.xx.xx)
(Port = 1521)
)
(ADDRESS =
(COMMUNITY = tcp.world)
(PROTOCOL = TCP)
(Host = xx.xx.xx.xx)
(Port = 1526)
)
)
>>>database-sid name.
(CONNECT_DATA = (SID = "database-sid name")
)
)

Also check your listener.ora file on the database server to check whether you have configured a listener for the database.
Else use NET8 configuration assistant for listener configuration.
(SID_DESC =
(GLOBAL_DBNAME = "database-name")
(ORACLE_HOME = "ORACLE-home")
(SID_NAME = "database-name")
)

check in the control Panel----->services

and check for the listener service whether it is started properly on the server.

Thanks
dps
Occasional Advisor

Re: Oracle Dba studio connection

ManikanDan - I had already carried out the steps you outlined.

pinged my machine ok.
net start showed me that listener is running.

When I run tnsping service_name I get TNS - 03505 Failed to resolve service_name.

DPS
dps
Occasional Advisor

Re: Oracle Dba studio connection

Andreas and all - I have resolved it!!!!!

With this tnsnames.ora it connects -

AWGCDP1.mag.co.uk =
(DESCRIPTION =
(ADDRESS_LIST =
(ADDRESS = (PROTOCOL = TCP)(HOST = UKP-WNXY3XG69G2.mag.co.uk)(PORT = 1521))
)
(CONNECT_DATA =
(SERVICE_NAME = awgcdp1.mag.co.uk)
)
)

Whereas,this does not!

AWGCDP1 =
(DESCRIPTION =
(ADDRESS_LIST =
(ADDRESS = (PROTOCOL = TCP)(HOST = UKP-WNXY3XG69G2.mag.co.uk)(PORT = 1521))
)
(CONNECT_DATA =
(SERVICE_NAME = awgcdp1.mag.co.uk)
)
)

I had actually been shuffling around with the combinations before with no success but obviously looking back at my older copies of tnsnames I see I had not made an exact match as above. So service_name and the actual bit before the description (and the host) must be similar?

Andreas the way I was asking to set TNS_ADMIN was also correct.

Thank you all for your assistance!!!

Now I shall start with configuring this database on windows 95 and NT - wish me luck!!!!
DPS