Herramientas de usuario

Herramientas del sitio


Barra lateral

notas:bases_de_datos:oracle

¡Esta es una revisión vieja del documento!


Notas de Oracle

List all users/schema

         SET PAGESIZE 50
         SELECT DISTINCT USERNAME FROM DBA_USERS;

List ONLY your tables

         SET PAGESIZE 80
         COL TABLE__NAME FORMAT a30;
         COL TABLE_TYPE FORMAT a30;
         SELECT * FROM CAT;

List the Oracle Tablespaces and free space

         SELECT * FROM v$TABLESPACE;

List the free space for all Oracle Tablespaces within a Database

         SELECT * FROM DBD_FREE_SPACE WHERE TABLESPACE_NAME = 'IATOR';

List the space ALREADY USED for a specific Oracle Tablespace

         SELECT * FROM DBA_SEGMENTS WHERE TABLESPACE_NAME = 'myTABLESPACE';

List extents for segments

         SELECT TABLESPACE_NAME, COUNT(*), MAX(blocks), SUM(blocks) FROM dba_free_space GROUP BY TABLESPACE_name;

See all the tables you have access to:

         SET PAGESIZE 90
         COLUMN "OBJECT NAME" format a26
         COLUMN "OBJECT TYPE" format a20
         SELECT object_name    "OBJECT NAME",
                object_type    "OBJECT TYPE"
         FROM
                user_objects
         WHERE
                object_type = 'TABLE';

See your TABLESPACE

         SELECT TABLESPACE_NAME FROM ALL_TABLES WHERE TABLE_NAME = '<your_table>'
notas/bases_de_datos/oracle.1390945619.txt.gz · Última modificación: 2014/01/28 19:46 por cayu