Accessing a remote table
DBAsupport.com Forums - Powered by vBulletin
Results 1 to 5 of 5

Thread: Accessing a remote table

  1. #1
    Join Date
    Jun 2003
    Location
    Singapore
    Posts
    11

    Accessing a remote table

    Hi all

    We have 2 different instance for eg. db01, db02.

    The objects in db01 are accessible to scott(a schema for eg) in db02 using a public dblink unthenticated by scott.

    If another user for eg. scott1 in db02 want access the same tables from db01, how the access can be done. It is the existing db_link can be used since the db_link is a public db_link? But right now the scott1 is unable to access the table from db01.

    Pls Help me.

    Regards

    Bhaskara

  2. #2
    Join Date
    May 2001
    Posts
    736
    create a public databaselink on db02 similarly how u have created one on db01.

  3. #3
    Join Date
    Aug 2003
    Location
    Dhahran
    Posts
    33
    As I understand it you have two users SCOTT and SCOTT1 in DB02 and SCOTT can get access to data in DB01 via a public database link but SCOTT1 cannot.

    There are two main possibilities and a minor possibility and it would be useful to know what error message SCOTT1 gets to resolve which of the possibilities applies.

    For the PUBLIC database link to work with SCOTT and not SCOTT1, SCOTT must be a user in both databases with the same password in both databases and grants on the tables.

    One possibility is that SCOTT1 does not exist in both databases or does not have the same password in both locations. In this case he should get ORA-01017 (followed by ORA-02063).

    A second possiblity is that SCOTT1 exists in both databases and has the same password in both locations but does not have the required privilege on the table. In that case they would get error ORA-00942 (again followed by ORA-02063).

    A less likely possibility (but still a possibility) is that one or the other of these users is actually using a private database link with different properties. In that case it could be the link rather than the users that explains the differences in access.

  4. #4
    Join Date
    Oct 2002
    Location
    Breda, The Netherlands
    Posts
    317

    Re: Accessing a remote table

    Originally posted by PsudoDBA

    If another user for eg. scott1 in db02 want access the same tables from db01, how the access can be done. It is the existing db_link can be used since the db_link is a public db_link? But right now the scott1 is unable to access the table from db01.
    I read this as follows:

    db1 has user SCOTT
    db1 has a dblink to db2
    db2 has SCOTT1

    SCOTT read tables in db2, but now SCOTT1 wants to read data in db1. To do this he wants to use the dblink that was created in db1.

    Am I correct?

    As far as I know, DB Links only work one way... So, if you want SCOTT1 to read from DB1, you must create a dblink in db2 pointing to db1.

    HTH,

    Erik
    An expert is one who knows more and more about less and less until he knows absolutely everything about nothing.

  5. #5
    Join Date
    Aug 2003
    Location
    Dhahran
    Posts
    33
    In the original post it says:

    The objects in db01 are accessible to scott(a schema for eg) in db02 using a public dblink unthenticated by scott.

    If another user for eg. scott1 in db02 want access the same tables from db01
    So it seems to me that SCOTT is in DB02 and SCOTT1 is also in DB02.

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