Pluggable database and restricted sessions

Posted by

Once you get into pluggable database territory, you might need to check your usage of “alter system enable restricted session”, because unless you’ve patched, there’s a little bug which lets you enable restricted session, but wont let you get out of it ! 🙂

For example:

SQL> alter session set container = pdb12;
 
Session altered.
 
SQL> alter system enable restricted session;
 
System altered.
 
SQL> select logins from v$instance;
 
LOGINS
----------
RESTRICTED
 
SQL> alter system disable restricted session;
alter system disable restricted session
*
ERROR at line 1:
ORA-65144: ALTER SYSTEM DISABLE RESTRICTED SESSION is not permitted

You can get out of the predicament, by force opening the pluggable database as shown below, but probably best to look at the latest 12c PSU, which contains a fix (unverified)

 
SQL> conn / as sysdba
Connected.
 
SQL> alter pluggable database pdb12 open force;
 
Pluggable database altered.
 
SQL> alter session set container = pdb12;
 
Session altered.
 
SQL> select logins from v$instance;
 
LOGINS
----------
ALLOWED

5 comments

  1. I have noticed you don’t monetize your page, don’t waste your traffic, you can earn additional cash every month because you’ve got high quality content.
    If you want to know how to make extra bucks, search for: Boorfe’s tips best adsense alternative

Got some thoughts? Leave a comment

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

This site uses Akismet to reduce spam. Learn how your comment data is processed.