我只是克隆了一个托管 Oracle 的服务器,以便制作一个 linux 测试机。但是 sqlplus user/password@alias 连接在克隆的服务器上不起作用。我找不到要更改的内容。先感谢您
以下是源服务器的配置文件:
主机名 :
[root@server1]# cat /etc/hosts
192.168.0.11 server1.domain.com server1
全局名称:
从 global_name 中选择 * ;
my_sid1.server1.domain.com
listner.ora:
LISTENER = (DESCRIPTION_LIST = (DESCRIPTION = (ADDRESS = (PROTOCOL = TCP)(HOST = server1)(PORT = 1521)) (ADDRESS = (PROTOCOL = IPC)(KEY = REGISTER)) )
sid_list_listener=(sid_list= (sid_desc= (global_name=server1) (sid_name=my_sid1) (oracle_home=/u01/app/oracle/product/12r1) )
tnsnames.ora:
serv1.my_sid1=(description= (address= (protocol=ipc) (key=my_sid1)) (address= (protocol=tcp) (host=server1) (port=1521)) (connect_data=(service_name=my_sid1.server1. domain.com)(服务器=专用)))
在克隆的服务器上,使用以下配置,我收到错误消息“ORA-12154:TNS:无法解析指定的连接标识”
主机名 :
[root@server2]# cat /etc/hosts
192.168.0.12 server2.domain.com server2
监听器.ora:
LISTENER = (DESCRIPTION_LIST = (DESCRIPTION = (ADDRESS = (PROTOCOL = TCP)(HOST = server2)(PORT = 1521)) (ADDRESS = (PROTOCOL = IPC)(KEY = REGISTER)) )
sid_list_listener=(sid_list= (sid_desc= (global_name=server2) (sid_name=my_sid2) (oracle_home=/u01/app/oracle/product/12r1) )
tnsnames.ora
server2.my_sid2=(description= (address= (protocol=ipc) (key=my_sid2)) (address= (protocol=tcp) (host=server2) (port=1521)) (connect_data=(service_name=my_sid1.server1. domain.com)(服务器=专用)))
我正在尝试按如下方式使用 sqlplus 命令,但它不起作用:
sqlplus 用户/密码@my_sid2
认为