DBAsupport.com Forums - Powered by vBulletin
Results 1 to 4 of 4

Thread: How to read table from another tablespace

  1. #1
    Join Date
    Aug 2005
    Posts
    1

    How to read table from another tablespace

    Hello,

    I have created two users (alpha, beta) and two tablespaces (alpha, beta).

    I have created a table in beta called OrgData.

    When I log in as alpha I would like to be able to write:
    SELECT * FROM ORGDATA

    This produces an error displaying table not found.

    The next statement works but I would like to avoid specifying the tablespace in this case:
    SELECT * FROM BETA.ORGDATA.

    Is this a tablespace issue? A user issue? Or a schema issue?

    If anybody knows please shout.

    Thanks.
    Regards,
    John

  2. #2
    Join Date
    Sep 2002
    Location
    England
    Posts
    7,334
    well its nothing to do with tablespaces, tablespaces are where you store your objects. What you are doing is specifying the schema name of the other table.

    So to get what you want, as alpha do

    create synonym ORGDATA for beta.orgdata;

    then do select * from orgdata; and you will have your data

  3. #3
    Join Date
    Jun 2000
    Location
    Madrid, Spain
    Posts
    7,447
    grant select on orgdata to alpha

  4. #4
    Join Date
    Sep 2002
    Location
    England
    Posts
    7,334
    Quote Originally Posted by pando
    grant select on orgdata to alpha
    i believe that part had already been done when he said

    SELECT * FROM BETA.ORGDATA.

    worked

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