This shows you the differences between two versions of the page.
| Both sides previous revision Previous revision Next revision | Previous revision | ||
|
oracle [2020/01/03 10:05] ss_wiki_admin |
oracle [2021/04/23 07:54] (current) ss_wiki_admin [ASM] |
||
|---|---|---|---|
| Line 549: | Line 549: | ||
| ==== Auditing Control ==== | ==== Auditing Control ==== | ||
| + | == Get size of Audit Table == | ||
| + | <code sql> | ||
| + | select segment_name table_name , | ||
| + | </ | ||
| + | |||
| + | == Show count of audited actions == | ||
| + | <code sql> | ||
| + | select username, | ||
| + | </ | ||
| + | |||
| ==Show audited options== | ==Show audited options== | ||
| <code sql> | <code sql> | ||
| Line 697: | Line 707: | ||
| select slave_name, sessions, idle_time_cur, | select slave_name, sessions, idle_time_cur, | ||
| from v$pq_slave order by slave_name; | from v$pq_slave order by slave_name; | ||
| - | < | + | </code> |
| == Show global parallelism details == | == Show global parallelism details == | ||
| Line 745: | Line 755: | ||
| SQL> | SQL> | ||
| select * from gv$asm_operation; | select * from gv$asm_operation; | ||
| + | </ | ||
| + | |||
| + | == Show rebalance operation estimates == | ||
| + | <code sql> | ||
| + | select INST_ID, OPERATION, STATE, POWER, SOFAR, EST_WORK, EST_RATE, EST_MINUTES from GV$ASM_OPERATION; | ||
| </ | </ | ||
| Line 765: | Line 780: | ||
| == Add disk to diskgroups == | == Add disk to diskgroups == | ||
| <code sql> | <code sql> | ||
| - | SQL> alter diskgroup dbfs_dg add disk ' | + | SQL> alter diskgroup dbfs_dg add disk ' |
| - | SQL> alter diskgroup reco_m1 add disk ' | + | SQL> alter diskgroup reco_m1 add disk ' |
| </ | </ | ||
| Line 786: | Line 801: | ||
| == Drop old disk == | == Drop old disk == | ||
| <code sql> | <code sql> | ||
| - | alter diskgroup | + | alter diskgroup |
| </ | </ | ||
| Line 797: | Line 812: | ||
| == Moving multiple files inside ASM == | == Moving multiple files inside ASM == | ||
| <code bash> | <code bash> | ||
| - | for i in $(asmcmd ls +RECOC1/EIWODSD/ | + | for i in $(asmcmd ls +RECOC1/DB/ |
| - | | + | |
| - | | + | |
| done | done | ||
| </ | </ | ||
| Line 936: | Line 951: | ||
| </ | </ | ||
| + | == Stop a running job == | ||
| + | <code sql> | ||
| + | exec DBMS_SCHEDULER.STOP_JOB(job_name => ' | ||
| + | </ | ||
| + | == Disable a job (once stopped) == | ||
| + | <code sql> | ||
| + | exec DBMS_SCHEDULER.disable(' | ||
| + | </ | ||
| + | ==== Automatic Database Diagnostic Monitor (ADDM) ==== | ||
| + | The CONTROL_MANAGEMENT_PACK_ACCESS has three settings: | ||
| + | |||
| + | NONE - Oracle Diagnostics Pack and Oracle Tuning Pack is disabled on the database server, is strongly discouraged by Oracle, but you must if you haven' | ||
| + | |||
| + | DIAGNOSTIC - Oracle Diagnostics Pack is enabled on the database server | ||
| + | |||
| + | DIAGNOSTIC+TUNING - Both Oracle Diagnostics Pack and Oracle Tuning Pack are enabled on the database server | ||
| + | <code sql> | ||
| + | /* Display current value */ | ||
| + | show parameter control_management_pack_access | ||
| + | |||
| + | NAME | ||
| + | ------------------------------------ ----------- ------------------------------ | ||
| + | control_management_pack_access | ||
| + | |||
| + | SELECT count(*) FROM V$ACTIVE_SESSION_HISTORY; | ||
| + | |||
| + | COUNT(*) | ||
| + | ---------- | ||
| + | 64 <---- | ||
| + | | ||
| + | /* Disable feature */ | ||
| + | |||
| + | alter system set control_management_pack_access=' | ||
| + | |||
| + | SELECT count(*) FROM V$ACTIVE_SESSION_HISTORY; | ||
| + | |||
| + | COUNT(*) | ||
| + | ---------- | ||
| + | 0 <----- | ||
| + | |||
| + | </ | ||
| + | |||
| + | The STATISTICS_LEVEL initialization parameter has been around for quite some time and determines the level of database and operating system statistics that will be collected. Setting this parameter to TYPICAL or ALL will enable automatic database diagnostic monitoring, which is what we want. The three valid values are as follows: | ||
| + | |||
| + | TYPICAL - the default setting will collect all the major statistics that Oracle deems necessary for database self-management while providing the best overall performance. Typically, no pun intended, TYPICAL is usually adequate for most environments. | ||
| + | |||
| + | ALL - in addition to the TYPICAL collections, | ||
| + | |||
| + | BASIC - disables many of the important statistics and is highly discouraged. | ||
| + | |||
| + | <code sql> | ||
| + | show parameters STATISTICS_LEVEL; | ||
| + | </ | ||
| + | |||
| + | ====Clusterware Version/ | ||
| + | |||
| + | crsctl resides in // | ||
| + | |||
| + | ==Active Version of Clusterware== | ||
| + | Display the active version and the configured patch level of the Oracle Clusterware software running in the cluster. | ||
| + | |||
| + | <code bash> | ||
| + | $ crsctl query crs activeversion | ||
| + | Oracle Clusterware active version on the cluster is [12.1.0.0.2]. The cluster upgrade state is [NORMAL]. The cluster active patch level is [456789126]. | ||
| + | </ | ||
| + | |||
| + | ==Patch Level of Clusterware== | ||
| + | Display the patch level in the Grid home patch repository. | ||
| + | The patch level corresponds to only the local node in which the command is executed. | ||
| + | |||
| + | <code bash> | ||
| + | $ crsctl query crs releasepatch | ||
| + | |||
| + | Oracle Clusterware release patch level is [3180840333] and the complete list of patches is [13559647] on the local node. | ||
| + | </ | ||
| + | |||
| + | ==Oracle Clusterware Software Version== | ||
| + | Display the version of the Oracle Clusterware software installed | ||
| + | |||
| + | <code bash> | ||
| + | $ crsctl query crs releaseversion | ||
| + | |||
| + | Oracle High Availablity Services release version on the local node is [12.2.0.1.0] | ||
| + | </ | ||
| + | |||
| + | ==Check Patch Level of Clusterware on Specific Node== | ||
| + | Display the configured patch level of the installed Oracle Clusterware. | ||
| + | |||
| + | <code bash> | ||
| + | $ crsctl query crs softwarepatch < | ||
| + | Oracle Clusterware patch level on node [node1] is [456789126] | ||
| + | </ | ||
| + | |||
| + | ==Latest Running Version of Clusterware== | ||
| + | Display latest version of the software that has been successfully started on the specified node. | ||
| + | |||
| + | <code bash> | ||
| + | $ crsctl query crs softwareversion < | ||
| + | Oracle Clusterware version on node [node1] is [12.2.0.1.0] | ||
| + | </ | ||
| + | |||
| + | ==Verify a Patch is Installed== | ||
| + | <code bash> | ||
| + | $ < | ||
| + | </ | ||