不能自动生成awr快照解决方式


15,30,45,00 * * * * /home/oracle/snapshot_create.sh


[oracle@oracleserver2 ~]$ more /home/oracle/snapshot_create.sh
#!/bin/ksh
export ORACLE_BASE=/u01/app/oracle
export ORACLE_SID=oragps2
export ORACLE_HOME=$ORACLE_BASE/11.2.0/db_1;
/u01/app/oracle/11.2.0/db_1/bin/sqlplus /nolog<<EOF
conn /as sysdba
begin
dbms_workload_repository.create_snapshot();
end;
/
quit
EOF

posted on 2020-03-20 09:03  dataunix123  阅读(614)  评论(0编辑  收藏  举报