mgmtdb
时间:2021-07-01 10:21:17
帮助过:37人阅读
su - grid[grid@host01 ~]$ oclumon manage -get masterMaster = host012.查看状态[grid@host01 ~]$ srvctl status mgmtdbDatabase is enabledInstance -MGMTDB is running on node host013.查看配置信息:[grid@host01 ~]$ srvctl config mgmtdbDatabase unique name: _mgmtdbDatabase name: Oracle home: <CRS home>Oracle user: gridSpfile: +OCR/_MGMTDB/PARAMETERFILE/spfile.270.1036567143Password file: Domain: Start options: openStop options: immediateDatabase role: PRIMARYManagement policy: AUTOMATICType: ManagementPDB name: GIMR_DSCREP_10PDB service: GIMR_DSCREP_10Cluster name: rac-clusterDatabase instance: -MGMTDB3.登陆mgmtdb[grid@host01 ~]$$export ORACLE_SID=-MGMTDBSQL> connect / as sysdbaConnected.[[grid@host01 ~]$$sqlplus / as sysdba查看数据文件和redo日志文件SQL> select file_name from dba_data_files union select member file_name from V$logfile;FILE_NAME--------------------------------------------------------------------------------+OCR/_MGMTDB/DATAFILE/sysaux.259.1036565765+OCR/_MGMTDB/DATAFILE/system.258.1036565703+OCR/_MGMTDB/DATAFILE/undotbs1.260.1036565817+OCR/_MGMTDB/ONLINELOG/group_1.262.1036565893+OCR/_MGMTDB/ONLINELOG/group_2.263.1036565893+OCR/_MGMTDB/ONLINELOG/group_3.264.10365660556 rows selected.查看数据库名称SQL> select name from v$database;NAME------------------_MGMTDB查看实例名称SQL> select instance_name from v$instance;INSTANCE_NAME---------------------------------MGMTDB查看控制文件SQL> select name from v$controlfile;NAME--------------------------------------------------------------------------------+OCR/_MGMTDB/CONTROLFILE/current.261.1036565891SQL> show parameters spfile;NAME TYPE------------------------------------ ----------------------VALUE------------------------------spfile string+OCR/_MGMTDB/PARAMETERFILE/spfile.270.1036567143生产pfile文件SQL> create pfile=‘/tmp/mgmgdb_pfile.txt‘ from spfile;File created[root@host01 tmp]# more mgmgdb_pfile.txt -MGMTDB.__data_transfer_cache_size=0-MGMTDB.__db_cache_size=717225984-MGMTDB.__java_pool_size=4194304-MGMTDB.__large_pool_size=8388608-MGMTDB.__oracle_base=‘/u01/app/gridbase‘#ORACLE_BASE set from environment-MGMTDB.__pga_aggregate_target=524288000-MGMTDB.__sga_target=1073741824-MGMTDB.__shared_io_pool_size=50331648-MGMTDB.__shared_pool_size=281018368-MGMTDB.__streams_pool_size=0*._awr_restrict_mode=TRUE*._disable_txn_alert=3*._kolfuseslf=TRUE*._partition_large_extents=‘false‘*.audit_file_dest=‘/u01/app/gridbase/admin/_mgmtdb/adump‘*.audit_trail=‘NONE‘*.cluster_database=FALSE*.compatible=‘12.2.0.0.0‘*.control_files=‘+OCR/_MGMTDB/CONTROLFILE/current.261.1036565891‘*.cpu_count=2*.db_block_size=8192*.db_create_file_dest=‘+OCR‘*.db_name=‘_mgmtdb‘*.diagnostic_dest=‘/u01/app/gridbase‘*.dispatchers=‘(PROTOCOL=TCP) (SERVICE=-MGMTDBXDB)‘*.enable_pluggable_database=true*.job_queue_processes=1*.max_string_size=‘EXTENDED‘*.nls_language=‘AMERICAN‘*.nls_territory=‘AMERICA‘*.open_cursors=150*.parallel_min_servers=0*.pga_aggregate_target=524288000*.processes=500*.recyclebin=‘off‘*.remote_login_passwordfile=‘EXCLUSIVE‘*.sga_target=1073741824*.statistics_level=‘TYPICAL‘*.undo_tablespace=‘UNDOTBS1‘create pfile=‘/tmp/mgmgdb_pfile.txt‘ from spfile;查看是否归档SQL> archive log list;Database log mode No Archive ModeAutomatic archival DisabledArchive destination /u01/app/grid/product/12.2.0/dbs/archOldest online log sequence 1Current log sequence 3查看pdbSQL> show pdbs CON_ID CON_NAME OPEN MODE RESTRICTED---------- ------------------------------ ---------- ---------- 2 PDB$SEED READ ONLY NO 3 GIMR_DSCREP_10 READ WRITE NOSQL> show con_name;CON_NAME------------------------------CDB$ROOT查看表空间SQL> Select tablespace_name,status From dba_tablespaces;TABLESPACE_NAME STATUS------------------------------------------------------------ ------------------SYSTEM ONLINESYSAUX ONLINEUNDOTBS1 ONLINETEMP ONLINE查看临时表空间文件SQL> Select file_name From dba_temp_files;FILE_NAME----------------------------------------------------------------------------------------------------+OCR/_MGMTDB/TEMPFILE/temp.265.1036566355
查看用户
SQL> column username format a16;
SQL> column account_status format a16;
SQL> Select username,account_status From Dba_Users;
USERNAME ACCOUNT_STATUS
---------------- ----------------
SYS OPEN
SYSTEM OPEN
GSMCATUSER EXPIRED & LOCKED
XS$NULL EXPIRED & LOCKED
REMOTE_SCHEDULER EXPIRED & LOCKED
_AGENT
SYSBACKUP EXPIRED & LOCKED
GSMUSER EXPIRED & LOCKED
SYSRAC EXPIRED & LOCKED
AUDSYS LOCKED
USERNAME ACCOUNT_STATUS
---------------- ----------------
DIP EXPIRED & LOCKED
SYSKM EXPIRED & LOCKED
OUTLN EXPIRED & LOCKED
ORACLE_OCM EXPIRED & LOCKED
SYS$UMF EXPIRED & LOCKED
SYSDG EXPIRED & LOCKED
DBSNMP EXPIRED & LOCKED
APPQOSSYS EXPIRED & LOCKED
DBSFWUSER EXPIRED & LOCKED
GGSYS EXPIRED & LOCKED
ANONYMOUS EXPIRED & LOCKED
USERNAME ACCOUNT_STATUS
---------------- ----------------
GSMADMIN_INTERNA EXPIRED & LOCKED
L
XDB EXPIRED & LOCKED
WMSYS EXPIRED & LOCKED
23 rows selected.
查看表空间使用情况
SQL> set linesize 1000;
SQL> Select a.Tablespace_Name,
2 to_char(Round(Total, 2),‘fm9999990.0999‘) || ‘G‘ Total,
3 to_char(Round(Free, 2),‘fm9999990.0999‘) || ‘G‘ Free,
4 to_char(Round(Total - Free, 2),‘fm9999990.0999‘) || ‘G‘ Used
5 From (Select Tablespace_Name,sum(t.BYTES)/1024/1024/1024 As Total
6 From Dba_Data_Files t Group By Tablespace_Name
7 ) a,
8 (Select Tablespace_Name, Sum(Bytes) / 1024 / 1024 / 1024 Free
9 From Dba_Free_Space group By Tablespace_Name
10 ) b
11 Where a.Tablespace_Name = b.Tablespace_Name
12 Order By Total Desc;
TABLESPACE_NAME TOTAL FREE USED
-------------------------------- ---------------------------- ---------------------------- ----------------------------
SYSTEM 0.59G 0.17G 0.42G
SYSAUX 0.39G 0.09G 0.3G
UNDOTBS1 0.09G 0.02G 0.06G
-- The End --
mgmtdb
标签:rri password trail bin name 名称 awr open rest