oracle连接plsql

oracle查看本机服务名

在cmd命令窗口:
?
1
 
sqlplus / as sysdba;
 
1
select instance_name from v$instance;
 
?

 可以在你oracle安装目录,我的是:F:\oracle\product\10.2.0\db_1\NETWORK\ADMIN

找到文件:tnsnames.ora,手动增加配置信息:

复制代码
 1 # tnsnames.ora Network Configuration File: F:\oracle\product\10.2.0\db_1\network\admin\tnsnames.ora
 2 # Generated by Oracle configuration tools.
 3 
 4 orcl_localhost =
 5   (DESCRIPTION =
 6     (ADDRESS_LIST =
 7       (ADDRESS = (PROTOCOL = TCP)(HOST = localhost)(PORT = 1521))
 8     )
 9     (CONNECT_DATA =
10       (SERVICE_NAME = orcl)
11     )
12   )
13 
14 EXTPROC_CONNECTION_DATA =
15   (DESCRIPTION =
16     (ADDRESS_LIST =
17       (ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC1))
18     )
19     (CONNECT_DATA =
20       (SID = PLSExtProc)
21       (PRESENTATION = RO)
22     )
23   )
复制代码

可以看到,刚才配置的信息在这里可以找到。

你可能感兴趣的:(oracle)