Results 1 to 4 of 4
  1. #1
    Join Date
    Feb 2005

    Unhappy Unanswered: Oracle grant privilege

    I have 2 databases A and B. The schema for A is SA and B is SB. I want to access the tables in B from A.

    first i tried this query:

    grant select on tablename to SA;
    then i got the error: user or role doesnot exist.

    After that I created a link in SB - SBLink to SA

    grant select on tablename to SA@SBLink
    Error: SQL command not properly terminated.

    Can anyone help me out?
    Thanks in advance

  2. #2
    Join Date
    Nov 2002
    connect B/pwd>;

    grant select on <table_name> to A;

    connect A/<pwd>;
    select count (*) from b.<table_name>; -- should give you the # of rows from the particular table

  3. #3
    Join Date
    Feb 2005
    that is not what I want.. I am soprry if I hv confused u..

    What I want is this-
    I have a db 'A' and there is another database 'B'. I want to give the user of B access into my database A.

    When I give the command-

    grant select on B.tablename to A.user and

    grant select on b.tablename to usre@A,

    it gives an error at the '.' and '@' , respectively.
    Cud u help me out with this?

  4. #4
    Join Date
    Dec 2004
    vienna, at
    you can not grant a privilege to a user in an other database!

    you have to create a database link for database B in the database A,
    create a user in database B, and grant the db-link user in db B the
    select privilege on the tables from SA.
    then you can make a

    select * from SA.table_name@dblink

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts