不能自动生成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

原文地址:https://www.cnblogs.com/dataroot123/p/12529547.html