grid$crsctl stat res -t(集群状态)
oracle$lsnrctl status(监听状态)
cd /ogg
./ggsci
info all(OGG进程状态)
ps -ef |grep pmon 查看实例进程 进入对应目录
cd $ORACLE_BASE/diag/rdbms/*/*/trace tail -1000 alert*(alert日志告警) //重要 ORA报错
SQL> select job, what, next_date, next_sec, sysdate, failures, broken,interval from dba_jobs a where broken<>'N';(JOB状态)
SQL> SELECT sum((BLOCKS*BLOCK_SIZE)/1024/1024/1024) ARCHIVE_SIZE_GB FROM V$ARCHIVED_LOG WHERE TO_CHAR(COMPLETION_TIME,'yyyy-mm-dd')=to_char(sysdate-1,'yyyy-mm-dd');(一天前的归档量)
SQL> SELECT sum((BLOCKS*BLOCK_SIZE)/1024/1024/1024) ARCHIVE_SIZE_GB FROM V$ARCHIVED_LOG WHERE TO_CHAR(COMPLETION_TIME,'yyyy-mm-dd')=to_char(sysdate,'yyyy-mm-dd');(当天当前归档量)
SQL> select * from (select start_time,end_time,status,output_bytes_display from v$rman_backup_job_details order by 1 desc) where rownum < 10;(检查最近的备份完成情况) //重要
select name,total_mb,free_mb from v$asm_diskgroup; //重要
select name,state,type,total_mb,free_mb,total_mb-free_mb use_mb,offline_disks from v$asm_diskgroup;(ASM查询) //重要
set pagesize 1000;
col tablespace_name for a14;
select d.tablespace_name,space "sum_space(m)",blocks sum_blocks,space-nvl(free_space,0) "used_space(m)",
round((1-nvl(free_space,0)/space)*100,2) "used_rate(%)",free_space "free_space(m)"
from
(select tablespace_name,round(sum(bytes)/(1024*1024),2) space,sum(blocks) blocks
from dba_data_files
group by tablespace_name) d,
(select tablespace_name,round(sum(bytes)/(1024*1024),2) free_space
from dba_free_space
group by tablespace_name) f
where d.tablespace_name = f.tablespace_name(+) union all
select d.tablespace_name,space "sum_space(m)",blocks sum_blocks,
used_space "used_space(m)",round(nvl(used_space,0)/space*100,2) "used_rate(%)",
nvl(free_space,0) "free_space(m)"
from
(select tablespace_name,round(sum(bytes)/(1024*1024),2) space,sum(blocks) blocks
from dba_temp_files
group by tablespace_name) d,
(select tablespace_name,round(sum(bytes_used)/(1024*1024),2) used_space,
round(sum(bytes_free)/(1024*1024),2) free_space
from v$temp_space_header
group by tablespace_name) f
where d.tablespace_name = f.tablespace_name(+); (表空间使用率查询) //重要
su - oracle
sqlplus / as sysdba 连接数据库
export ORACLE_SID=实例名 //切换到实例
show parameter instance_name; //查询当前实例
ps -ef |grep pmon 查看实例进程 进入对应目录
col GRANTEE for a20 hisora
阅读(1312) | 评论(0) | 转发(0) |