notas:bases_de_datos:oracle
Diferencias
Muestra las diferencias entre dos versiones de la página.
| Próxima revisión | Revisión previa | ||
| notas:bases_de_datos:oracle [2014/01/28 21:46] – creado cayu | notas:bases_de_datos:oracle [2017/08/17 15:07] (actual) – [Notas de Oracle] cayu | ||
|---|---|---|---|
| Línea 1: | Línea 1: | ||
| - | ====== | + | ====== Oracle ====== |
| - | + | * [[notas: | |
| + | * [[manuales: | ||
| + | * [[notas: | ||
| + | ===== Notas de Oracle ===== | ||
| List all users/ | List all users/ | ||
| <code sql> | <code sql> | ||
| Línea 46: | Línea 48: | ||
| | | ||
| </ | </ | ||
| + | |||
| + | |||
| + | Consulta para calcular el espacio total, el ocupado y el espacio libre de un TABLESPACE : | ||
| + | <code sql> | ||
| + | SET pagesize 0 | ||
| + | SET numf ' | ||
| + | SELECT NVL(b.free, | ||
| + | FROM ( | ||
| + | SELECT tablespace_name, | ||
| + | FROM dba_data_files GROUP BY tablespace_name) A | ||
| + | LEFT OUTER JOIN | ||
| + | ( SELECT tablespace_name, | ||
| + | FROM dba_free_space GROUP BY tablespace_name) B | ||
| + | ON a.tablespace_name=b.tablespace_name WHERE a.tablespace_name=' | ||
| + | </ | ||
| + | |||
| + | Consulta para conocer sesiones activas | ||
| + | <code sql> | ||
| + | select count(SES.SID) | ||
| + | from v\$session SES, V\$SQLAREA SQL, V\$SESSION_WAIT WA, V\$PROCESS P | ||
| + | where SES.STATUS=' | ||
| + | AND SES.SQL_ID=SQL.SQL_ID | ||
| + | AND SES.SID=WA.SID | ||
| + | and SES.paddr=p.addr | ||
| + | and SES.USERNAME not in (' | ||
| + | </ | ||
| + | |||
| + | Otorgar acceso de lectura a todas las tablas a determinado usuario | ||
| + | <code sql> | ||
| + | GRANT SELECT ANY TABLE TO EXT_USER_REPORTING WITH ADMIN OPTION; | ||
| + | </ | ||
| + | |||
| + | Volcar un último archive log | ||
| + | <code sql> | ||
| + | SQL> alter system archive log current; | ||
| + | </ | ||
| + | ===== Referencias oficiales ===== | ||
| + | * DB_BLOCK_SIZE | ||
| + | * 11g - http:// | ||
| + | * 12c - http:// | ||
| + | |||
notas/bases_de_datos/oracle.1390945619.txt.gz · Última modificación: 2014/01/28 21:46 por cayu
