启用和禁用受限制的会话
要启用和禁用受限制的会话,请使用 Amazon RDS 过程 rdsadmin.rdsadmin_util.restricted_session
。restricted_session
过程具有以下参数。
参数名称 | 数据类型 | 默认值 | 是 | 描述 |
---|---|---|---|---|
|
布尔值 |
true |
否 |
设置为 |
以下示例介绍了如何启用和禁用受限制的会话。
/* 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