|
|
init file中的service_names可以高定为任何非 db_name的值。
并且 也可以在tnsnames.ora中设定service_name来连接
[php]
C:\Documents and Settings\Administrator>TNSPING VONGATES
TNS Ping Utility for 32-bit Windows: Version 10.2.0.1.0 - Production on 09-8月 -2007 06:15:07
Copyright (c) 1997, 2005, Oracle. All rights reserved.
已使用的参数文件:
C:\oracle\product\10.2.0\db_1\network\admin\sqlnet.ora
已使用 TNSNAMES 适配器来解析别名
Attempting to contact (DESCRIPTION = (ADDRESS = (PROTOCOL = TCP)(HOST = localhost)(PORT = 1521)) (CO
NNECT_DATA = (SERVER = DEDICATED) (SERVICE_NAME = VONGATES)))
OK (40 毫秒)
C:\Documents and Settings\Administrator>sqlplus /nolog
SQL*Plus: Release 10.2.0.1.0 - Production on 星期四 8月 9 06:15:26 2007
Copyright (c) 1982, 2005, Oracle. All rights reserved.
SQL> conn system@vongates
输入口令:
已连接。
SQL> show user
USER 为 "SYSTEM"
SQL> show parameter service
NAME TYPE
------------------------------------ ----------------------
VALUE
------------------------------
service_names string
VONGATES
SQL> show parameter db_name
NAME TYPE
------------------------------------ ----------------------
VALUE
------------------------------
db_name string
orcl
SQL> exit
从 Oracle Database 10g Enterprise Edition Release 10.2.0.1.0 - Production
With the Partitioning, Oracle Label Security, OLAP and Data Mining options 断开
C:\Documents and Settings\Administrator>tnsping orcl
TNS Ping Utility for 32-bit Windows: Version 10.2.0.1.0 - Production on 09-8月 -2007 06:16:47
Copyright (c) 1997, 2005, Oracle. All rights reserved.
已使用的参数文件:
C:\oracle\product\10.2.0\db_1\network\admin\sqlnet.ora
已使用 TNSNAMES 适配器来解析别名
Attempting to contact (DESCRIPTION = (ADDRESS = (PROTOCOL = TCP)(HOST = localhost)(PORT = 1521)) (CO
NNECT_DATA = (SERVER = DEDICATED) (SERVICE_NAME = orcl)))
OK (190 毫秒)
C:\Documents and Settings\Administrator>sqlplus /nolog
SQL*Plus: Release 10.2.0.1.0 - Production on 星期四 8月 9 06:16:55 2007
Copyright (c) 1982, 2005, Oracle. All rights reserved.
SQL> conn system@orcl
输入口令:
已连接。
SQL> show user
USER 为 "SYSTEM"
SQL> show parameter db_name
NAME TYPE
------------------------------------ ----------------------
VALUE
------------------------------
db_name string
orcl
SQL> show parameter service_name
NAME TYPE
------------------------------------ ----------------------
VALUE
------------------------------
service_names string
VONGATES
SQL>
--------------------------------
[/php] |
|