synonym for database link
DBAsupport.com Forums - Powered by vBulletin
Results 1 to 2 of 2

Thread: synonym for database link

Hybrid View

  1. #1
    Join Date
    Dec 2002
    Posts
    110

    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

  2. #2
    Join Date
    Dec 2001
    Location
    Tel-Aviv,Israel
    Posts
    233
    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
  •  


Click Here to Expand Forum to Full Width