oracle
Differences
This shows you the differences between two versions of the page.
| Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
| oracle [2024/11/27 09:41] – [Dataguard related] mduersch | oracle [2025/08/14 09:19] (current) – [ACLs] mduersch | ||
|---|---|---|---|
| Line 1: | Line 1: | ||
| ====== ORACLE ====== | ====== ORACLE ====== | ||
| + | ==== ACLs ==== | ||
| + | |||
| + | ACLs abfragen: | ||
| + | |||
| + | SET LINESIZE 150 | ||
| + | COLUMN host FORMAT A40 | ||
| + | COLUMN acl FORMAT A50 | ||
| + | SELECT host, lower_port, upper_port, acl | ||
| + | FROM | ||
| + | ORDER BY host; | ||
| + | |||
| + | |||
| + | |||
| + | SET LINESIZE 150 | ||
| + | COLUMN acl FORMAT A50 | ||
| + | COLUMN principal FORMAT A20 | ||
| + | COLUMN privilege FORMAT A10 | ||
| + | SELECT acl, | ||
| + | | ||
| + | | ||
| + | | ||
| + | | ||
| + | | ||
| + | FROM | ||
| + | ORDER BY acl, principal, privilege; | ||
| + | |||
| + | Source: https:// | ||
| + | ==== Spool ==== | ||
| + | |||
| + | Spool output as csv | ||
| + | |||
| + | connect < | ||
| + | set markup csv on; | ||
| + | spool / | ||
| + | select * from < | ||
| + | spool off; | ||
| + | |||
| + | ==== Sessions ==== | ||
| + | |||
| + | | ||
| + | | ||
| + | | ||
| + | SID SERIAL# NETWORK_SERVICE_BANNER | ||
| + | ---------- ---------- | ||
| + | 76 0 | ||
| + | 80 0 | ||
| + | 133 15475 TCP/IP NT Protocol Adapter for Linux: Version 19.0.0.0.0 - Production | ||
| + | 133 15475 Encryption service for Linux: Version 19.0.0.0.0 - Production | ||
| + | 133 15475 AES256 Encryption service adapter for Linux: Version 19.0.0.0.0 - Production | ||
| + | 133 15475 Crypto-checksumming service for Linux: Version 19.0.0.0.0 - Production | ||
| + | |||
| + | Besser: | ||
| + | SELECT | ||
| + | sid, | ||
| + | | ||
| + | | ||
| + | | ||
| + | | ||
| + | | ||
| + | FROM sys.gv_$session s | ||
| + | WHERE (inst_id, sid) not in | ||
| + | (SELECT inst_id, sid | ||
| + | FROM sys.gv_$session_connect_info | ||
| + | WHERE network_service_banner like ' | ||
| + | or network_service_banner like ' | ||
| + | and TYPE <> ' | ||
| + | |||
| + | ==== Grants by User ==== | ||
| + | |||
| + | set long 200000 pages 0 lines 131 | ||
| + | column meta format a121 word_wrapped | ||
| + | select dbms_metadata.get_ddl(' | ||
| + | select dbms_metadata.get_granted_ddl(' | ||
| + | select dbms_metadata.get_granted_ddl(' | ||
| + | select dbms_metadata.get_granted_ddl(' | ||
| ==== DBexport ==== | ==== DBexport ==== | ||
| Line 8: | Line 83: | ||
| expdp -help | expdp -help | ||
| + | ==== Tables ==== | ||
| + | |||
| + | size of table | ||
| + | | ||
| - | ==== Tablesoace | + | ==== Tablespace |
| | | ||
| Line 136: | Line 215: | ||
| ==== Sessions (to kill?) ==== | ==== Sessions (to kill?) ==== | ||
| - | set lines 200 | + | |
| - | set pages 999 | + | set pages 999 |
| col username for a12 | col username for a12 | ||
| Line 158: | Line 237: | ||
| , | , | ||
| from gv$session | from gv$session | ||
| - | where type=' | + | where type=' |
| + | |||
| + | # Danach ggf: | ||
| + | ALTER SYSTEM KILL SESSION ' | ||
| ==== AWR ==== | ==== AWR ==== | ||
| Line 309: | Line 391: | ||
| alter system reset log_archive_config sid=' | alter system reset log_archive_config sid=' | ||
| + | |||
| + | set pagesize 100 | ||
| + | set linesize 100 | ||
| + | colum segment_name format A50 | ||
| + | colum object_name format A50 | ||
| + | |||
| + | # Größe von Index Tabelle bestimmen | ||
| + | | ||
| + | | ||
| + | | ||
| + | | ||
| + | | ||
| + | | ||
| + | owner like ' | ||
| + | | ||
| + | |||
| + | # Erstelldatum der Indexe | ||
| + | | ||
| + | | ||
| + | | ||
| + | | ||
| + | | ||
| + | | ||
| + | owner like ' | ||
| + | | ||
| + | order by created; | ||
| + | | ||
| + | # Größe und Zahl der vorhandenen / bereits duplizierten Tablepsaces | ||
| + | | ||
| + | | ||
| + | | ||
| + | | ||
| + | | ||
| + | | ||
| + | owner like ' | ||
| + | group by segment_type; | ||
| ==== Selects ==== | ==== Selects ==== | ||
oracle.1732700512.txt.gz · Last modified: 2024/11/27 09:41 by mduersch
