2 Replies Latest reply: Jun 15, 2011 4:47 AM by 866613 RSS

    Synonym related

    866613
      In database b, I have a synonym created as below
      CREATE OR REPLACE SYNONYM SCHEMA1.T_H FOR SCHEMA2.T_H

      In database A, I am accessing the table of database b using a db link BTR as below

      create database link BTR
      connect to SCHEMA1
      SID=122

      etc...


      I am accessing the table using the below query as follows:
      ===========================================

      select * from T_H@BTR

      Will there be any error for the above query in the database A

      where SCHEMA1 & SCHEMA2 are present in the same database B

      Thanks in advance
        • 1. Re: Synonym related
          mtefft
          Will there be an error? Why don't you try it?

          You seem to be on the right track, but
          - Object SCHEMA2.T_H might not exist
          - SCHEMA1 might not have privileges on it
          - You might not have the right password in your database link
          - etc

          so it is impossible to say there will be no errors.
          • 2. Synonym related
            866613
            Actually this is supposed to be done in a live database, hence cannot be tested now.

            Schema2 will have the table T_H in place, and Schema1 will have priveleges to create synonym for Schema2 and has got the right password for the database link


            Thanks