Good morning,
I need to list the existing tables by tablespace, what is the correct syntax? Thanks.
List tables for table space
-
- Rank: Programador Júnior
- Posts: 15
- Joined: Tue, 09 Oct 2007 10:37 am
- Location: Porto Alegre - RS
Tiago Stöhlirck
You can list all tables:
or then filter by the tablespace or table name:
If you do not You have access to DBA_Tables, you can use User_Tables (which will list the user tables) or all_tables (which will list all the tables that the logged in user has access).
Select tablespace_name, table_name From dba_tables Order By tablespace_name;
Select tablespace_name, table_name From dba_tables Where tablespace_name = 'EGC_DATA';
Select tablespace_name, table_name From dba_tables Where table_name = 'PESSOAS';
-
- Rank: Analista Júnior
- Posts: 77
- Joined: Wed, 05 Dec 2007 10:51 am
- Location: Fortaleza - CE
Face with the user System you were to have access (I believe).
Do you have any access table of the tablespace_name you want?
Here, for example, when using the Select below I have the following result:
You can also search for the Table Owner.
If it does not work out and why you do not have permission to access tablespace_name you want.
Do you have any access table of the tablespace_name you want?
Here, for example, when using the Select below I have the following result:
SELECT
OWNER,
TABLE_NAME,
TABLESPACE_NAME
FROM
ALL_TABLES
WHERE
OWNER IN ('SYS', 'ALBA')
OWNER TABLE_NAME TABLESPACE_NAME
-------- ---------- ---------------
ALBA ACESSO DADOSALB
ALBA AGENCIA DADOSALB
SYS ACCESS_LICENSE$ SYSTEM
SYS AUDIT_ACTIONS SYSTEM
If it does not work out and why you do not have permission to access tablespace_name you want.
I made the command below with the User Owner that has access to tablespace that I need, however I listed some tables that the user I was logged in is the owner and in the tablespace_name field was empty? why? Thank you so much.
SELECT
OWNER,
TABLE_NAME,
TABLESPACE_NAME
FROM
ALL_TABLES
- dr_gori
- Moderador
- Posts: 5026
- Joined: Mon, 03 May 2004 3:08 pm
- Location: Portland, OR USA
- Contact:
Thomas F. G
Você já respondeu a dúvida de alguém hoje?
https://glufke.net/oracle/search.php?search_id=unanswered
Você já respondeu a dúvida de alguém hoje?
https://glufke.net/oracle/search.php?search_id=unanswered
From what I know, when Table_Space is null, it's temporary tables, so it does not have tablespace. (or IoT - Index Organized Tables)
Let's move this topic to DBA, because I believe that there we will have more answers.
Moved !!! :-O
Let's move this topic to DBA, because I believe that there we will have more answers.
Moved !!! :-O
-
- Rank: DBA Sênior
- Posts: 372
- Joined: Tue, 24 Jan 2006 3:33 pm
- Location: Palmas - TO
- Contact:
Viewing Abespace Informationdr_gori wrote: From what I know, when the table_space is null, it's temporary tables, so it does not have tablespace. (or IoT - Index Organized Tables)
Let's move this topic to DBA, because I believe that there we will have more answers.
Moved !!! : -The
Viewing Normation About Tables
Gilberto
Good morning,
You can use the command below to list the tables and their respective tablespaces.
You can use the command below to list the tables and their respective tablespaces.
select segment_name, tablespace_name from dba_segments where segment_type='TABLE' ;
-
- Information
-
Who is online
Users browsing this forum: No registered users and 1 guest