Oracle数据库链接有错误

时间:2014-04-29 09:07:07

标签: oracle11g

我正在尝试从另一个Oracle服务器创建数据库链接。 我正在使用的命令是:

 create public database link mylink connect to myuser identified by 0000 authenticated by myuser identified by 0000 using 'myTNSNameRemoteServer';

sqlplus给我这个错误:

ERROR at line 1:
ORA-00933: SQL command not properly ended

在第一个实例中将'*'放在密码的第一个字符下。

我有没有逃过它?

谢谢

3 个答案:

答案 0 :(得分:4)

解决方案是双重引用密码:

create public database link mylink connect to myuser identified by "0000" authenticated by myuser identified by "0000" using 'myTNSNameRemoteServer';

答案 1 :(得分:3)

你可以试试这个:

CREATE DATABASE LINK "dblink_name"
             CONNECT TO "user_user"
             IDENTIFIED BY "user_pass"
             USING '(DESCRIPTION =
                (ADDRESS_LIST =
                  (ADDRESS = (PROTOCOL = TCP)(HOST = "user_server" )(PORT ="user_port" ))
                )
                (CONNECT_DATA =
                  (SERVICE_NAME = "user_service_name")
                  (SRVR = DEDICATED)
                )
              )' ;

答案 2 :(得分:0)

试试这个: 创建数据库链接ABCD使用'DBALIASAME'连接到通过密码识别的用户;