informatica:oracle:comandos
Differences
This shows you the differences between two versions of the page.
| Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
| informatica:oracle:comandos [2013/07/18 08:12] – jose | informatica:oracle:comandos [2024/06/19 09:46] (current) – jose | ||
|---|---|---|---|
| Line 1: | Line 1: | ||
| - | Comprobar usuario bloqueado: | + | < |
| + | SELECT 'DROP TABLE ' || owner || ' | ||
| + | FROM all_tables | ||
| + | WHERE owner = ' | ||
| + | </ | ||
| + | |||
| + | < | ||
| + | set sqlformat insert; | ||
| + | select * from WZC_AUTHORIZATION_OWN.AUTHORIZATION_CONFIGURATION; | ||
| + | set sqlformat default; | ||
| + | </ | ||
| + | |||
| + | ====== Crear Usuario ====== | ||
| + | |||
| + | CREATE USER usuari IDENTIFIED BY contrasenya | ||
| + | |||
| + | GRANT CREATE SESSION TO usuari | ||
| + | |||
| + | |||
| + | |||
| + | ====== | ||
| < | < | ||
| select username, | select username, | ||
| Line 44: | Line 65: | ||
| ====== Cambiar contraseña ====== | ====== Cambiar contraseña ====== | ||
| alter user user_name identified by new_password; | alter user user_name identified by new_password; | ||
| + | | ||
| + | ====== Porcentaje tablespaces ====== | ||
| + | < | ||
| + | COLUMN tsname FORMAT a30 | ||
| + | COLUMN allocation_type FORMAT A4 TRU HEADING ALLO | ||
| + | COLUMN contents FORMAT A4 TRU HEADING MGMT | ||
| + | COLUMN Tot_Size FORMAT 999,999 HEADING " | ||
| + | COLUMN Tot_Free FORMAT 999,999 HEADING " | ||
| + | COLUMN Pct_Free FORMAT 999 HEADING "FREE %" | ||
| + | COLUMN Fragments FORMAT 99,999 HEADING " | ||
| + | COLUMN Large_Ext FORMAT 999,999 HEADING " | ||
| + | set lines 120 | ||
| + | set feedback off pages 999 trims on | ||
| + | SELECT a.tablespace_name TSNAME, SUM(a.tots)/ | ||
| + | SUM(a.sumb)/ | ||
| + | SUM(a.sumb)*100/ | ||
| + | SUM(a.largest)/ | ||
| + | b.contents, b.allocation_type | ||
| + | FROM (SELECt tablespace_name, | ||
| + | MAX(bytes) largest, COUNT(*) chunks | ||
| + | FROM dba_free_space a | ||
| + | GROUP BY tablespace_name | ||
| + | UNION | ||
| + | SELECT tablespace_name, | ||
| + | FROM dba_data_files | ||
| + | GROUP BY tablespace_name | ||
| + | UNION | ||
| + | SELECT tablespace_name, | ||
| + | FROM dba_temp_files | ||
| + | GROUP BY tablespace_name) a, dba_tablespaces b | ||
| + | WHERE b.tablespace_name = a.tablespace_name | ||
| + | GROUP BY a.tablespace_name, | ||
| + | ORDER BY 4 | ||
| + | / | ||
| + | </ | ||
informatica/oracle/comandos.1374135138.txt.gz · Last modified: (external edit)
