I have a physical standby DB which is in a mount state.
We are going to perform failover tests, but i need to MGW agent (which is configured on primary) to be shutdown when i'll open standby DB.
I try to select MGW_AGENT view, but it can't be done, while db is mount.
Any ideas, how to check and shutdown mgw agent without opening DB?
Won't shutting the listener on the Primary side disable the agent?
Not certain if locking the Agent user will work. Change as needed for your user.
CREATE TRIGGER CHECK_DB_ROLE AFTER STARTUP ON DATABASE
SELECT DATABASE_ROLE INTO V_ROLE FROM V$DATABASE;
IF V_ROLE = 'PRIMARY' THEN
ALTER USER MGWADMIN ACCOUNT UNLOCK;
ALTER USER MGWADMIN ACCOUNT LOCK;
Message was edited by: mseberg