Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.server -> Re: How to switch between two tablespace?
On Sun, 27 Jun 1999 04:22:35 GMT, johnlyn_at_my-deja.com wrote:
> 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'?
The issue here isn't tablespaces, it's the owner of the tables. Try connecting as SYSTEM and issueing this query:
select owner, table_name from dba_tables where table_name='GUEST';
You should get two rows back, and each row should have a different owner. Let's call the owners OWNER1 and OWNER2. You can then issue the following two SELECT statements:
SELECT * FROM owner1.guest; SELECT * FROM owner2.guest;
You have to qualify the tablename by using the owner name. The tablespace has to do with where the data is physically stored, and that's another issue altogether.
regards,
Jonathan Gennick
![]() |
![]() |