Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.misc -> Re: How do I start SQL*Plus under a different database?
Peter Chatterton wrote:
> Hi Malcolm,
>
> sqlplus -?
> <logon> ::= <username>[/<password>][@<connect_string>] | / | /NOLOG
> That's what it shows; I didn't realize that <connect_string> == SID.
>
> Thanks,
> Peter.
>
It isn't. It is an alias, defined in tnsnames.ora in you
network\admin directory. You could name it Peter for all it cares.
As long as it points to the correct SID (or service_name).
Example:
HUB.CS.NL =
(DESCRIPTION =
(ADDRESS_LIST = (ADDRESS = (PROTOCOL = TCP)(HOST = 192.168.1.200)(PORT = 1521)) ) (CONNECT_DATA = (SID = orcl) )
It is quite common, tho, to have the SID as alias; e.g.:
DEV.CS.NL =
(DESCRIPTION =
(ADDRESS_LIST = (ADDRESS = (PROTOCOL = TCP)(HOST = 192.168.1.200)(PORT = 1521)) ) (CONNECT_DATA = (SID = dev) )
Frank Received on Tue Jan 14 2003 - 14:39:13 CST