-
Oracle XE client
Hi Friends,
I have installed Oracle XE client on my PC.
I check on its home dir (bin), and I found the proram sqlplus.exe
At DOS I run sqlplus system/manager but I want to connect to
my database server on another server.
How can I configure this connection pls? I look for tnsnames.ora
but I can not find any.
Thanks in advance to all and Happy New Year
-
In Oracle 10g you can use following command on SQL*Plus to connect to another database:
SQL> conn USERNAME/PASSWORD@HOSTNAME:PORT/SID
In that case you don't need a tnsnames.ora. Only your sqlnet.ora need the following entry:
NAMES.DIRECTORY_PATH= (TNSNAMES, EZCONNECT, HOSTNAME)
-
Thanks dear for speedy reply.....I check the home dir of XE client and and can not find sqlnet.ora either... :confused:
but when i run sqlplus system/manager just to test connection...It
created a sqlnet.log error:
***********************************************************************
Fatal NI connect error 12560, connecting to:
(DESCRIPTION=(ADDRESS=(PROTOCOL=BEQ)(PROGRAM=oracle)(ARGV0=oracleORCL)(ARGS='(DESCRIPTION=(LOCAL=YES )(ADDRESS=(PROTOCOL=beq)))'))(CONNECT_DATA=(SID=ORCL)(CID=(PROGRAM=C:\XEClient\bin\sqlplus.exe)(HOST =VISA_1)(USER=Administrator))))
VERSION INFORMATION:
TNS for 32-bit Windows: Version 10.2.0.1.0 - Production
Oracle Bequeath NT Protocol Adapter for 32-bit Windows: Version 10.2.0.1.0 - Production
Time: 03-JAN-2007 16:35:35
Tracing not turned on.
Tns error struct:
ns main err code: 12560
TNS-12560: Message 12560 not found; No message file for product=NETWORK, facility=TNS
ns secondary err code: 0
nt main err code: 530
TNS-00530: Message 530 not found; No message file for product=NETWORK, facility=TNS
nt secondary err code: 2
nt OS err code: 0
Thanksssssssssssssssss................
-
Sure. You can create a new one on $ORACLE_HOME/network/admin/
Try to establish the connection before, may work because it's supposed to be default. If does not work you can create the SQLNET.ORA and TNSNAMES.ORA
-
Thanks dear....but the oracle xe client did not even make a
network/admin directory....should I create one?
Can u pls try to install oracle XE client pls :)
-
Tns_admin
>>Thanks dear....but the oracle xe client did not even make a network/admin directory....should I create one?
You can create it yourself, or you can set TNS_ADMIN pointing to an existent directory and put the file(s) there.
HTH
Cheers.
Carlos.
-
Have you tried to connect to another database before do that?
-
I tried it using...
>sqlplus system/manager@124.6.144.116:1521:xe
SQL*Plus: Release 10.2.0.1.0 - Production on Thu Jan 4 08:08:36 2007
Copyright (c) 1982, 2005, Oracle. All rights reserved.
ERROR:
ORA-12545: Connect failed because target host or object does not exist
but I can ping the server...
======
I also set the TNS_ADMIN=C:\oraclexe\app\oracle\product\10.2.0\server\NETWORK\ADMIN
in my environment variable and run
>sqlplus system/manager@xe
SQL*Plus: Release 10.2.0.1.0 - Production on Thu Jan 4 08:21:35 2007
Copyright (c) 1982, 2005, Oracle. All rights reserved.
ERROR:
ORA-12154: TNS:could not resolve the connect identifier specified
=============
Thankssssssssssssssssss again
-
anyone out there have tried installing the XE client pls.
Note that the XE server side has no problem. I can use its sqlplus.exe adn can connect to any remote server defined in the
tnsnames.ora.
But when I use the sqlplus.exe found in the client bin it will not
connect to a database even the local one. I even set the TNS_ADMIN variable because the client install does not create
a directory %ORACLE_HOME%/NETWORK/ADMIN
Another question is....where does my sqplus.exe client got the
following information(default params) which it logged to the sqlnet.log :
Fatal NI connect error 12560, connecting to:
(DESCRIPTION=(ADDRESS=(PROTOCOL=BEQ)(PROGRAM=oracle)(ARGV0=oracleORCL)(ARGS='(DESCRIPTION=(LOCAL=YES )(ADDRESS=(PROTOCOL=beq)))'))(CONNECT_DATA=(SID=ORCL)(CID=(PROGRAM=C:\XEClient\bin\sqlplus.exe)(HOST =VISA_1)(USER=Administrator))))
Note: it uses ORCL but my sid is XE
I just want to edit this default sqlnet parameters but I dont know
where it is found.
-
You did connect wrong. Try this:
sqlplus system/manager@124.6.144.116:1521/xe