Oracle 12C Pluggable Database self-booting

Source: Internet
Author: User

The experiment environment creates two PDB, this experiment realizes when the database is opened, realizes pluggable database PDB2 self-start:


Original environment:


Sql> Shu Immediate
Database closed.
Database dismounted.
ORACLE instance shut down.
Sql> Startup
ORACLE instance started.


Total System Global area 943718400 bytes
Fixed Size 2931136 bytes
Variable Size 650118720 bytes
Database buffers 285212672 bytes
Redo buffers 5455872 bytes
Database mounted.
Database opened.
Sql> select Name,open_mode from V$pdbs;


NAME Open_mode
------------------------------ ----------
Pdb$seed READ only
PDBYCR Mounted
PDB2 Mounted


Sql>


Create TRIGGER:


sql> CREATE TRIGGER OPEN_PDB_PDB2
2 after STARTUP
3 on DATABASE
4 BEGIN
5 EXECUTE IMMEDIATE ' alter pluggable database PDB2 open ';
6 END Open_all_pdbs;
7/


Trigger created.


Sql> Shu Immediate
Database closed.
Database dismounted.
ORACLE instance shut down.
Sql> Startup
ORACLE instance started.


Total System Global area 943718400 bytes
Fixed Size 2931136 bytes
Variable Size 650118720 bytes
Database buffers 285212672 bytes
Redo buffers 5455872 bytes
Database mounted.
Database opened.
Sql> select Name,open_mode from V$pdbs;


NAME Open_mode
------------------------------ ----------
Pdb$seed READ only
PDBYCR Mounted
PDB2 READ WRITE


Implemented PDB2 self-booting, you can start different PDB by modifying the SQL statement in the trigger script or implement the self-boot of all PDB, the script is as follows:
CREATE TRIGGER OPEN_PDB_PDB2
After STARTUP
On DATABASE
BEGIN
EXECUTE IMMEDIATE ' alter pluggable database PDB2 open ';
END Open_all_pdbs;
/


Observe the alert log with the following message:
Opening pdb Pdb$seed (2) with no Resource Manager plan active
Alter pluggable database PDB2 Open
Database Characterset for PDB2 is we8mswin1252
Due to limited space in shared pool (need 6094848 bytes, with 3981120 bytes), limiting Resource Manager entities from 2048 to 32
Opening pdb PDB2 (4) with no Resource Manager plan active
Pluggable database PDB2 opened read Write
Completed:alter Pluggable Database Pdb2 Open
Starting background Process CJQ0
Completed:alter DATABASE OPEN

Oracle 12C Pluggable database self-booting

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.