-
synonym for database link
Hi All
I am trying to create a synonym for database link
using
create synonym test for testdb.us.oracle.com;
*
ERROR at line 1:
ORA-00933: SQL command not properly ended
Is it that we cannot create a synonym for a database link
or is there something misssing in the above SQL
Regards
-
Hi,
Remove the global name "us.oracle.com" from the db link name.
Please notice the following example:
SQL> create synonym disco1.DB_LNK.ORACLE.COM for scott.DB_LNK.ORACLE.COM;
create synonym disco1.DB_LNK.ORACLE.COM for scott.DB_LNK.ORACLE.COM
*
ERROR at line 1:
ORA-00905: missing keyword
SQL> create synonym disco1.DB_LNK for scott.DB_LNK;
Synonym created.
In addition,i don't understand why do you need to create a synonym for db link.
The using of db link in createing synonym is when you want to view a remote table. For example:
create database link db_lnk connect to user identified by pwd
using 'alias';
create synonym table1 for table1@db_lnk;
Regards,
Nir
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|