How to automatically start PDB Pluggable Database in Oracle 12c

Source: Internet
Author: User

How to automatically start PDB Pluggable Database in Oracle 12c

PDB Pluggable Database is an important new feature of 12c, but for PDB in CDB, all PDB is not brought when CDB is started by default, in this way, we need to manually alter pluggable database all open;

[Oracle @ clouds ~] $ Sqlplus "/as sysdba"

SQL * Plus: Release 12.1.0.2.0 Production on Thursday March 31 08:52:31 2016

Copyright (c) 1982,201 4, Oracle. All rights reserved.

Connect:
Oracle Database 12c Enterprise Edition Release 12.1.0.2.0-64bit Production
With the Partitioning, Automatic Storage Management, OLAP, Advanced Analytics
And Real Application Testing options

SQL> select open_mode from v $ database;

OPEN_MODE
--------------------
READ WRITE

SQL> alter pluggable database bidb1 open;

The plug-in database has been changed.

SQL> alter pluggable database bidb2 open;

The plug-in database has been changed.

SQL> select con_id, name, open_mode from v $ pdbs;

CON_ID NAME OPEN_MODE
--------------------------------------------------
2 PDB $ SEED READ ONLY
3 BIDB1 READ WRITE
4 BIDB2 READ WRITE

-- Or directly start all the pluggable Databases

SQL> alter pluggable database all open;

You can add a Trigger to customize the PDB OPEN

Use the SYS user to create the following trigger:
Create trigger open_all_pdbs
AFTER STARTUP
ON DATABASE
BEGIN
Execute immediate 'alter pluggable database all open ';
END open_all_pdbs;
/

In this way, after the cdb of oracle 12c database is started, the pdb will also be started automatically.

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.