Skip to Main Content

Oracle Database Discussions

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

PL/sql script

797732Feb 15 2012 — edited Feb 15 2012
DECLARE

db_role v$database.database_role%TYPE;

BEGIN

SELECT database_role INTO db_role from v$database;

IF db_role = 'PHYSICAL STANDBY' THEN

EXECUTE IMMEDIATE 'ALTER DATABASE RECOVER MANAGED STANDBY DATABASE CANCEL';
END IF;

EXECUTE IMMEDIATE 'SHUTDOWN IMMEDIATE';

END;
/
the script is giving error for EXECUTE IMMEDIATE 'SHUTDOWN IMMEDIATE';

any suggestions?

Thanks
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Mar 14 2012
Added on Feb 15 2012
9 comments
4,358 views