ssh -X -v myserver.mydomain.com
You can also use -vv and -vvv for more detailed debug information.
[postgres@oric-pgdb01.oric.no ~]$ psql psql (11.6) Type "help" for help. postgres=# \conninfo You are connected to database "postgres" as user "postgres" via socket in "/var/run/postgresql" at port "5432". postgres=# \dn List of schemas Name | Owner -------------------+---------- postgres_exporter | postgres public | postgres (2 rows)
[postgres@oric-pgdb01.oric.no ~]$ psql psql (11.6) Type "help" for help. postgres=# \connect klmdb superuseror, suppling detailed information to psql directly on the command-line:
[postgres@oric-pgdb01.oric.no ~]$ psql -h oric-pgdb01.oric.no -U superuser klmdbThen:
klmdb=# \dn klm | klm_migrator public | postgres klm_inv | klm_inventory
postgres=# \l+ gld List of databases Name | Owner | Encoding | Collate | Ctype | Access privileges | Size | Tablespace | Description ------+-----------------+----------+------------+------------+----------------------------------------+---------+------------+------------- kml | klm_master | UTF8 | en_US.utf8 | en_US.utf8 | klm_master=CTc/klm_master +| 1448 MB | pg_default | | | | | | klm_consumer=c/klm_master+ | | | | | | | | klm_producer=c/klm_master+ | | | | | | | | klm_migrator=c/klm_master+ | | | | | | | | postgres_exporter=c/klm_master | | | (1 row)
postgres=# select pg_database_size('klm'); pg_database_size ------------------ 1518559747 (1 row) # convert to GB: postgres=# select pg_database_size('klm')/1024/1024/1024 "gb"; gb ---- 1 (1 row)
SELECT * FROM DBA_AUDIT_MGMT_CONFIG_PARAMS ORDER BY AUDIT_TRAIL;
"PARAMETER_NAME" | "PARAMETER_VALUE" | "AUDIT_TRAIL" |
---|---|---|
DB AUDIT TABLESPACE | AUDDATA | FGA AUDIT TRAIL |
DB AUDIT CLEAN BATCH SIZE | 10000 | FGA AUDIT TRAIL |
AUDIT FILE MAX SIZE | 10000 | OS AUDIT TRAIL |
OS FILE CLEAN BATCH SIZE | 1000 | OS AUDIT TRAIL |
AUDIT FILE MAX AGE | 5 | OS AUDIT TRAIL |
DEFAULT CLEAN UP INTERVAL | 1 | STANDARD AUDIT TRAIL |
DB AUDIT TABLESPACE | AUDDATA | STANDARD AUDIT TRAIL |
DB AUDIT CLEAN BATCH SIZE | 10000 | STANDARD AUDIT TRAIL |
AUDIT FILE MAX SIZE | 10000 | UNIFIED AUDIT TRAIL |
AUDIT FILE MAX AGE | 5 | UNIFIED AUDIT TRAIL |
DB AUDIT TABLESPACE | AUDDATA | UNIFIED AUDIT TRAIL |
AUDIT WRITE MODE | IMMEDIATE WRITE MODE | UNIFIED AUDIT TRAIL |
AUDIT FILE MAX SIZE | 10000 | XML AUDIT TRAIL |
AUDIT FILE MAX AGE | 5 | XML AUDIT TRAIL |
OS FILE CLEAN BATCH SIZE | 1000 | XML AUDIT TRAIL |
BEGIN DBMS_AUDIT_MGMT.SET_AUDIT_TRAIL_PROPERTY( audit_trail_type => DBMS_AUDIT_MGMT.AUDIT_TRAIL_XML, audit_trail_property => DBMS_AUDIT_MGMT.OS_FILE_MAX_AGE, audit_trail_property_value => 2 ) ; END; /
SELECT * FROM DBA_AUDIT_MGMT_CONFIG_PARAMS WHERE AUDIT_TRAIL='XML AUDIT TRAIL' AND PARAMETER_NAME='AUDIT FILE MAX AGE';
"PARAMETER_NAME" | "PARAMETER_VALUE" | "AUDIT_TRAIL" |
---|---|---|
AUDIT FILE MAX AGE | 2 | XML AUDIT TRAIL |
Sun Jan 26 10:25:41 2020 +01:00 LENGTH : '401' ACTION :[147] 'select /*+ opt_param('parallel_execution_enabled', 'false') EXEC_FROM_DBMS_XPLAN */ * from gv$sql_plan where 1=0' DATABASE USER:[1] '/' PRIVILEGE :[4] 'NONE' CLIENT USER:[0] '' CLIENT TERMINAL:[7] 'UNKNOWN' STATUS:[1] '0' DBID:[10] '1325844924' SESSIONID:[1] '0' USERHOST:[26] 'myhost.mydomain.com' CLIENT ADDRESS:[0] '' ACTION NUMBER:[1] '3' Sun Jan 26 10:25:41 2020 +01:00 LENGTH : '375' ACTION :[121] 'SELECT * FROM gv$sql_plan where sql_id = 'a0f1h9d5muwa6' and inst_id = 1 and child_address = hextoraw('00000004FFF16130')' DATABASE USER:[1] '/' PRIVILEGE :[4] 'NONE' CLIENT USER:[0] '' CLIENT TERMINAL:[7] 'UNKNOWN' STATUS:[1] '0' DBID:[10] '1325844924' SESSIONID:[1] '0' USERHOST:[26] 'myhost.mydomain.com' CLIENT ADDRESS:[0] '' ACTION NUMBER:[1] '3' |
alter system set audit_sys_operations=FALSE scope=spfile; shutdown immediate startup