

# Habilitar e desabilitar sessões restritas
<a name="Appendix.Oracle.CommonDBATasks.RestrictedSession"></a>

Para habilitar e desabilitar sessões restritas, use o procedimento do Amazon RDS `rdsadmin.rdsadmin_util.restricted_session`. O procedimento `restricted_session` tem os seguintes parâmetros. 


****  

| Nome do parâmetro | Tipo de dados | Padrão | Sim | Descrição | 
| --- | --- | --- | --- | --- | 
| `p_enable` | booliano | true | Não | Defina como `true` para habilitar sessões restritas, `false` para desabilitar sessões restritas.  | 

O exemplo a seguir mostra como habilitar e desabilitar sessões restritas. 

```
/* 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
```