Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.server -> Re: How to switch between two tablespace?

Re: How to switch between two tablespace?

From: Billy Verreynne <vslabs_at_onwe.co.za>
Date: Mon, 28 Jun 1999 10:20:53 +0200
Message-ID: <7l7b6o$oqb$1@news3.saix.net>


johnlyn_at_my-deja.com wrote in message <7l48u5$edo$1_at_nnrp1.deja.com>...
>Hi:
> I am a newer dba for oracle8. I have created two tablespace, one is
>named "tablespace_one",another is named "tablespace_two". All of them
>have a table named 'guest'.
> The question is: I have connected oracle8 as system user. How to
>view the data of 'guest' in 'tablespace_one'? How to switch to 'guest'
>in 'tablespace_two'?

John, there's something missing from the equation here.

It is not the tablespace that "identifies" the table, it is the owner of the table. I can have multiple guest tables in the -same- tablespace. Each belonging to a different Oracle user/schema.

The question should read, how do you switch from one schema to another? The answer is by either re-connecting to Oracle as that other user, or (if the current user has the required privileges), prefixing the name of the table with the name of that other user. But I'm not sure if that is the question you had in mind...

Look at the view ALL_TABLES - the following SQL should illustrate the concept:
SELECT
  owner,
  tablespace_name,
  table_name
FROM all_tables

regards,
Billy Received on Mon Jun 28 1999 - 03:20:53 CDT

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US