Results 1 to 4 of 4
  1. #1
    Join Date
    Jan 2012
    Posts
    4

    Unanswered: How to access the Sequence created in other Schema

    Hi,

    I have created a table with sequence in one schema. I want to access the table from another schema. While i trying to insert new row into that table Oracle giving error message 'ErrorError(61,12): PL/SQL: ORA-02289: sequence does not exist '.

    Can you help me to overcome this problem? I am using Oracle 11g.

    Thanks in advance....

  2. #2
    Join Date
    Nov 2003
    Posts
    2,933
    Provided Answers: 12
    You need to grant the select privilege to that user.
    Code:
    GRANT SELECT ON your_sequence TO the_other_user

  3. #3
    Join Date
    Jan 2004
    Location
    Croatia, Europe
    Posts
    4,094
    Provided Answers: 4
    Then, you'd reference it using owner's name or, alternatively, create a synonym in your own schema.

    Option 1:
    Code:
    select owner.seq_name.nextval from dual
    Option 2:
    Code:
    create synonym my_seq_name for owner.seq_name;
    
    select my_seq_name.nextval from dual

  4. #4
    Join Date
    Jan 2012
    Posts
    4
    I have created new synonym and gave Grant access. Now its working fine.

    Thank you very much for your reply...

Posting Permissions

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