6 Replies Latest reply on Sep 17, 2013 6:37 PM by Richard Harrison .

    Should db_link be recreated after impdp?

    user130038

      Hi

       

      I have imported schemas (impdp) from production database (10gR2, RHEL 64bit). One of the schemas has a db_link.

       

      The db_link points to a database that exists on the same server - both in production server and also on the new server where I imported the schemas.

       

      When I run a simple query in production using this db_link, it works but when I run the same query on the test server (where I imported the schemas), it gives me following error:

       

      ORA-02019: connection description for remote database not found

       

      I run this in prod database:

       

      Select count(1) from SOME_TABLE@my_link;

       

      when I run it in new database, it gives the above ORA error - even if I qualify the table and db_link with the schema owner like this:

       

      Select count(1) from the_owner.some_table@the_owner.my_link;

       

      NOTE: I am not running these queries as schema owner - I do not know the password. I am able to connect to both databases like this from the command prompt:

       

      $ sqlplus user@/password@db1

      $ sqlplus user@/password@db2

       

      Does this mean that I need to recreate the db_link - perhaps every time I import?

       

      Best regards