Enabling and disabling restricted sessions (original) (raw)

To enable and disable restricted sessions, use the Amazon RDS procedurerdsadmin.rdsadmin_util.restricted_session. Therestricted_session procedure has the following parameters.

Parameter name Data type Default Yes Description
p_enable boolean true No Set to true to enable restricted sessions,false to disable restricted sessions.

The following example shows how to enable and disable restricted sessions.

/* Verify that the database is currently unrestricted. */

SELECT LOGINS FROM V$INSTANCE;
 
LOGINS
-------
ALLOWED

/* Enable restricted sessions */

EXEC rdsadmin.rdsadmin_util.restricted_session(p_enable => true);
 

/* Verify that the database is now restricted. */

SELECT LOGINS FROM V$INSTANCE;
 
LOGINS
----------
RESTRICTED
 

/* Disable restricted sessions */

EXEC rdsadmin.rdsadmin_util.restricted_session(p_enable => false);
 

/* Verify that the database is now unrestricted again. */

SELECT LOGINS FROM V$INSTANCE;
 
LOGINS
-------
ALLOWED

Canceling a SQL statement in a session

Flushing the shared pool

Did this page help you? - Yes

Thanks for letting us know we're doing a good job!

If you've got a moment, please tell us what we did right so we can do more of it.

Did this page help you? - No

Thanks for letting us know this page needs work. We're sorry we let you down.

If you've got a moment, please tell us how we can make the documentation better.