Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Remote connection in SQLplus: ORA-06401: NETCMN....

728 views
Skip to first unread message

czorny

unread,
Apr 26, 2002, 1:49:11 PM4/26/02
to
I try to connect to my database from another host using SQLplus and the
statement:
connect system/***@my.host.net:1521:mysid;
but it cause only an error:
ORA-06401: NETCMN: .....
When I'm using
CONNECT
system/***@'(DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=my.host.net)
(PORT=1521))(CONNECT_DATA=(SERVICE_NAME=mysid)))'
everything is OK.
My tnsnames.ora contains:
MAIN =
(DESCRIPTION =
(ADDRESS_LIST =
(ADDRESS = (PROTOCOL = tcp)(HOST = my.host.net)(PORT = 1521))
)
(CONNECT_DATA =
(SERVICE_NAME = mysid)
)
)
Anyone knows where is the mistake/bug? How can I connect remotely?


Sybrand Bakker

unread,
Apr 26, 2002, 11:13:42 AM4/26/02
to
On Fri, 26 Apr 2002 10:49:11 -0700, "czorny" <czorn...@o2.pl>
wrote:

The first connect is simply not proper syntax. period.
sqlplus system/manager@main (which is your service name in
tnsnames.ora should work).
I wonder why Oracle provides manuals.

Regards


>

Sybrand Bakker, Senior Oracle DBA

To reply remove -verwijderdit from my e-mail address

czorny

unread,
Apr 26, 2002, 8:56:10 PM4/26/02
to

"Sybrand Bakker" <pos...@sybrandb.demon.nl> wrote in message
news:0jricuo5hue8fte0e...@4ax.com...


Yes, it is true - when I am working localy.
But when I am working on other computer (my2.host.net with other Oracle 9i
installation) and I want to connect to my database?
Then I must enter something like the first syntax. If it is not correct what
is the correct one?
Or I should correct tnsnames.ora? But what if I have not necessary
privileges?
Help me please.

CZORNY


Sybrand Bakker

unread,
Apr 26, 2002, 12:59:34 PM4/26/02
to
On Fri, 26 Apr 2002 17:56:10 -0700, "czorny" <czorn...@o2.pl>
wrote:

Absolute nonsense!


And this

>> >system/***@'(DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=my.host.net)
>> > (PORT=1521))(CONNECT_DATA=(SERVICE_NAME=mysid)))'
is exactly equivalent to

this

>> > MAIN =
>> > (DESCRIPTION =
>> > (ADDRESS_LIST =
>> > (ADDRESS = (PROTOCOL = tcp)(HOST = my.host.net)(PORT = 1521))
>> > )
>> > (CONNECT_DATA =
>> > (SERVICE_NAME = mysid)
>> > )
>> > )


So this question


>Or I should correct tnsnames.ora?

is also nonsense.

For some reason, you seem to think you need to use sqlnet1 syntax. It
looks like this will end you up with a v1 error message
as the v1 syntax is
driver designator:hostname:port

You are using net8, not the jdbc driver, aren't you?.

However, you seem to know better,

(>Yes, it is true - when I am working localy.
which is also nonsense, if you have set ORACLE_SID you won't need to
enter anything)

so I don't think you can be helped at all.

Regards and RTFM, you're asking for it.

Howard J. Rogers

unread,
Apr 26, 2002, 6:24:40 PM4/26/02
to
What Sybrand has been saying to you is that your tnsnames.ora file is
perfectly correct, and the correct syntax for any connection, remotely or
not, is connect X/Y@MAIN (ie, you put the tnsnames alias after the "@", not
the stuff you were putting there).

However, I think the point that may have been missed is that your remote
connection needs to be made from a machine onto which the Oracle client has
been installed. You will then, on that remote machine, have an
ORACLE_HOME\network\admin directory. You need then simply copy the
tnsnames.ora that you already have working on the one machine into that
directory on the other, and then you should be able to connect in the
fashion I've described above (ie, using the tnsnames.ora alias).

HJR

"czorny" <czorn...@o2.pl> wrote in message
news:aab48m$9jg$1...@sunsite.icm.edu.pl...

czorny

unread,
Apr 27, 2002, 9:45:56 PM4/27/02
to

"Sybrand Bakker" <pos...@sybrandb.demon.nl> wrote in message
news:te1jcuc9ra8ld387a...@4ax.com...

OK OK OK
Don't be so angry :)

I am simply asking if:
- is it possible to connect to remote database using NET8 without editing
TNSNAMES.ORA file???
- is it possible to connect to remote database using NET8 without permission
to edit TNSNAMES.ORA file???
- is it possible to connect to remote database using NET8 without help of
..... Oracle Clinet administrator???
- and how to do this???

CZORNY


Sybrand Bakker

unread,
Apr 27, 2002, 1:16:29 PM4/27/02
to

"czorny" <czorn...@o2.pl> wrote in message
news:aaeki8$1e1$1...@sunsite.icm.edu.pl...

No
Yes, once the tnsnames.ora has been setup correctly
Oracle Client Administrator is dead and has been replaced by the net8
assistant
However, it seems you still don't understand or try to understand my reply
Your tnsnames.ora IS correct, and you should be able to connect using
<username>/<password>@main
If you think you can't connect please include any pertinent error messages
instead of ignoring my reply.


Regards


--
Sybrand Bakker
Senior Oracle DBA

to reply remove '-verwijderdit' from my e-mail address


czorny

unread,
Apr 28, 2002, 6:51:34 PM4/28/02
to
>"Sybrand Bakker" <pos...@sybrandb.demon.nl> wrote in message
news:ucm12l1...@corp.supernews.com...

>
> No
> Yes, once the tnsnames.ora has been setup correctly
> Oracle Client Administrator is dead and has been replaced by the net8
> assistant
> However, it seems you still don't understand or try to understand my reply
> Your tnsnames.ora IS correct, and you should be able to connect using

I know that my TNSNAMES.ORA is correct! And every day I use:
> <username>/<password>@main

But how SQLplus on other computers (i.e. university.computer.edu) can know
what and where is "main"?
The F.... Manual (Oracle9i Net Services Administrator's Guide Release 1
(9.0.1) Part Number A90154-01)
describes clearly:
CONNECT username/password@connect_identifier

(http://otn.oracle.com/docs/products/oracle9i/doc_library/901_doc/network.90
1/a90154/connect.htm#430042)
but it says that connect_identifier must describe how to access to my
computer and instance. Isn't it?
OK.
Connect_identifier is described in
http://otn.oracle.com/docs/products/oracle9i/doc_library/901_doc/network.901
/a90154/connect.htm#435637
as for example
CONNECT
scott/tiger@'(DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=sales-server)
(PORT=1521))(CONNECT_DATA=(SERVICE_NAME=sales.us.acme.com)))'
so I think I can use it everywhere.
As you can see there is no word about tnsnames.ora in original Oracle
manual.
I tried:
CONNECT
system/***@'(DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=my.host.net)
(PORT=1521))(CONNECT_DATA=(SERVICE_NAME=main)))'
and:
1. this syntax DOES NOT WORK on remote/university (university.computer.edu)
computer - ORA-06401: NETCMN: invalid driver..... (I've wrote this in my
first post)
2. this syntax works on my computer (my.host.net) (but it is not necessary
because I use CONNECT system/***@main - and it is normal)
3. is there a shorter way? Oracle Manuals don't specify all possible
connect_identifier syntaxes


> If you think you can't connect please include any pertinent error messages

> instead of ignoring my reply.

The error number was in my first post.

Howard J. Rogers

unread,
Apr 28, 2002, 3:20:35 PM4/28/02
to
1. Install the Oracle client on your other computers.
2. Copy the working tnsnames.ora from the original machine to each and every
'other computer'.

HJR


"czorny" <czorn...@o2.pl> wrote in message

news:aaguo6$63q$1...@sunsite.icm.edu.pl...

czorny

unread,
Apr 29, 2002, 1:32:29 AM4/29/02
to
Easy to write... But I wonder what will you do if you cannot change screen
resolution because of access restrictions. I think that installing Oracle
client requires much more privileges....


"Howard J. Rogers" <d...@hjrdba.com> wrote in message
news:aahi4j$b39$1...@lust.ihug.co.nz...

Howard J. Rogers

unread,
Apr 29, 2002, 4:58:17 AM4/29/02
to
I can only go on what information you provide. Where in your original post
did it say that you are attempting to do this with minimal privileges on the
other machines?

OK. Easy to re-write, too.

1. Get the system administrator to install the Oracle Client
2. Get the system administrator to copy tnsnames.ora onto his or her other
machines.

HJR


"czorny" <czorn...@o2.pl> wrote in message

news:aahm82$s72$1...@sunsite.icm.edu.pl...

0 new messages