sqlnet.ora、tnsnames.ora、listener.ora配置

一、远程连接配置
1、D:\app\user\product\11.2.0\dbhome_1\NETWORK\ADMIN\tnsnames.ora
本地名 =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = TCP)(HOST = 远程数据库IP地址)(PORT = 远程服务器端口号))
(CONNECT_DATA =
(SERVER = DEDICATED)
(SERVICE_NAME = 远程数据库服务名)
)
)
注意:通常SERVICE_NAME = global_name = 数据库名.domain名
2、D:\app\user\product\11.2.0\dbhome_1\NETWORK\ADMIN\sqlnet.ora
SQLNET.AUTHENTICATION_SERVICES= () 去掉括号中的NTS,还可以改成ALL,允许所有方式连接
3、D:\app\user\product\11.2.0\dbhome_1\NETWORK\ADMIN\listener.ora
LISTENER =
(DESCRIPTION_LIST =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = TCP)(HOST = pcname)(PORT = 1521))
)
)

二、oracle常用命令
1、命令连接数据库
sqlplus test/test@pcname/orcl;
2、命令导入数据
IMP test/test BUFFER=64000 FILE=C:\test.dmp FROMUSER=XXX TOUSER=YYY
EXP …

sqlnet.ora、tnsnames.ora、listener.ora配置详解

你可能感兴趣的:(Oracle)