重启oracle 11g R1 Rac 数据库
1,以root用户登录到服务器
2,停止数据库 ORA_CRS_HOME/bin/crsctl stop crs
3,启动数据库 ORA_CRS_HOME/bin/crsctl start crs
4,切到oracle用户,查看状态
su - oracle
crs_stat -t
重启oracle 11g R2 Rac 数据库
1,以root用户登录数据库
2,cd /opt/oracrs/product/11gR2/grid/bin
3,./crsctl stop crs
4,./crsctl start crs
5,./crsctl check crs
表分析
1,以oracle用户登录服务器
2,sqlplus / as sysdba
3,exec dbms_stats.gather_table_stats(ownname =>'OWNER', tabname =>'TABLE_NAME');
4,exec dbms_stats.gather_schema_stats(ownname =>'OWNER');
增加控制文件
1,以oracle用户登录服务器
2,sqlplus '/ as sysdba'
3,alter system set control_files='+DG_ORA/test/control01.ctl','+DG_ORA/test/control02.ctl','+DG_ORA/test/control03.ctl','+DG_ORA/test/control04.ctl'scope=spfile;
4,shutdown immediate;
5,startup nomount;
6,exit
7,rman target / nocatalog
8,restore controlfile to'+DG_ORA/test/control04.ctl' from '+DG_ORA/test/control01.ctl';
9,exit
10,shutdown immediate;
11,startup
增加重做日志组
alter database add logfile thread 1 group 5('+DG_DATA/etldb/redo051.log', '+DG_DATA/etldb/redo052.log') size 500m;
alter database add logfile thread 1 group 6('+DG_DATA/etldb/redo061.log', '+DG_DATA/etldb/redo062.log') size 500m;
alter database add logfile thread 1 group 7('+DG_DATA/etldb/redo071.log', '+DG_DATA/etldb/redo072.log') size 500m;
alter database add logfile thread 2 group8 ('+DG_DATA/etldb/redo081.log','+DG_DATA/etldb/redo082.log') size 500m;
alter database add logfile thread 2 group9 ('+DG_DATA/etldb/redo091.log','+DG_DATA/etldb/redo092.log') size 500m;
alter database add logfile thread 2 group10 ('+DG_DATA/etldb/redo0101.log', '+DG_DATA/etldb/redo0102.log') size 500m;
重做日志组添加成员
alter database add logfile member'+DG_DATA/crmhisdb/redo042.log' to group 4;
alter database add logfile member'+DG_DATA/crmhisdb/redo032.log' to group 3;
alter database add logfile member'+DG_DATA/crmhisdb/redo022.log' to group 2;
alter database add logfile member'+DG_DATA/crmhisdb/redo012.log' to group 1;
备份spfile
create pfile=’/home/oracle/pfile150616.ora’from spfile;
startup pfile=’/home/oracle/pfile150616.ora’
create spfile from pfile='initorcl.ora'
关闭数据库监听日志
lsnrctl
set current_listener LISTENER
show log_status
setlog_status off
数据库密码生命周期
alter profile DEFAULT limit password_life_timeunlimited;
数据库密码输入错误次数限制
alter profile DEFAULT limit failed_login_attemptsunlimited;