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: Jonathan Gennick <jonathan_at_gennick.com>
Date: Sun, 27 Jun 1999 15:54:04 GMT
Message-ID: <377a4888.8623660@netnews.worldnet.att.net>


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



jonathan_at_gennick.com
http://gennick.com
Brighten the Corner Where You Are Received on Sun Jun 27 1999 - 10:54:04 CDT

Original text of this message

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