Oracle 12c Configuration and modification of CDB and PDB parameters

Source: Internet
Author: User


1 Configuring CDB Instance Parameters

Configuring the instance parameters of CDB is like a normal instance, with the alter SYSTEM setting the initialization parameters, and some database configurations can use the Alterdatabase command.

After connecting the Rootcontainer, you can use the ALTER system command to modify it, which is only valid for root container, which is the current container. The following 2 commands work the same:

ALTER SYSTEM SET Parameter_name=value;

ALTER SYSTEM SET parameter_name=valuecontainer=current;

If you want to make the changes valid for all container, use the following syntax:

ALTER SYSTEM SET Parameter_name=valuecontainer=all;

With all in root container, all PDB will inherit these parameters unless the parameter is modified separately in the PDB.

2 Configuring PDB instance Parameters

If you set Container=all in Rootcontainer, the parameters of the PDB also inherit the previous value, but can be modified in the PDB container by the alter system. Note that this can be modified only if this parameter is supported, you can use the following command to view:

Column name format A35

Column value Format A35

Select Name, value

From V$system_parameter

WHERE ispdb_modifiable = ' TRUE '

Order BY name;

-- I have a 174 parameter that can be modified in the PDB:

Sql> Select COUNT (1) fromv$system_parameter where ispdb_modifiable= ' TRUE ';

COUNT (1)

----------

174

Modify the steps as follows:

Conn/as SYSDBA

ALTER SESSION SET CONTAINER = pdb1;

ALTER SYSTEM SET Parameter_name=value;

ALTER SYSTEM SET parameter_name=valuecontainer=current;

3 Modifying CDB (ALTER DATABASE)

The ALTER database command and NON-CDB databases are the same, some commands can affect the CDB and all the PDB, some only for the root container valid, specific use can refer to the official website.

http://docs.oracle.com/cd/E16655_01/server.121/e17636/cdb_admin.htm#ADMIN13633

4 Modifying the PDB (ALTER Pluggabledatabase)

After you can specify a specific PDB, modify the PDB information using the alterpluggable Database command and, of course, for backward compatibility, the ALTER DATABASE command can do most of the work.

The following are the specific modifications:

Conn/as SYSDBA

ALTER SESSION SET CONTAINER = pdb1;

--Default Edition forpdb.

ALTER pluggable DATABASE DEFAULT EDITION =ora$base;

--Default Tablespacetype for PDB.

ALTER pluggable DATABASE SET defaultbigfile tablespace;

ALTER pluggable DATABASE SET defaultsmallfile tablespace;

--Default tablespacesfor PDB.

ALTER pluggable DATABASE DEFAULT tablespaceusers;

ALTER pluggable DATABASE DEFAULT temporarytablespace temp;

-Change the Globalname. This would change the container name and the

--Name of the Defaultservice registered with the listener.

ALTER pluggable DATABASE OPEN restrictedforce;

ALTER pluggable DATABASE RENAME Global_nameto pdb1a.localdomain;

ALTER pluggable DATABASE CLOSE IMMEDIATE;

ALTER pluggable DATABASE OPEN;

--time zone for PDB.

ALTER pluggable DATABASE settime_zone= ' GMT ';

-Make datafiles in thepdb offline/online and make storage changes.

ALTER pluggable DATABASE datafile '/u01/app/oracle/oradata/cdb1/pdb1/pdb1_users01.dbf ' OFFLINE;

ALTER pluggable DATABASE datafile '/u01/app/oracle/oradata/cdb1/pdb1/pdb1_users01.dbf ' ONLINE;

ALTER pluggable DATABASE datafile '/u01/app/oracle/oradata/cdb1/pdb1/pdb1_users01.dbf '

RESIZE 1G autoextend on NEXT 1M;

--Supplemental loggingfor PDB.

ALTER pluggable DATABASE ADD supplementallog DATA;

ALTER pluggable DATABASE DROP supplementallog DATA;

In addition there are amechanism to control the maximum size of the PDB and the amount of the sharedtemp space it can use.

--The totalstorage of the The The PDB (datafile and local temp files).

ALTER pluggable DATABASE STORAGE (maxsize5g);

--Limit The amount oftemp space used in the shared temp files.

ALTER pluggable DATABASE STORAGE (max_shared_temp_size 2G);

--Combine the.

ALTER pluggable DATABASE STORAGE (maxsize5g max_shared_temp_size 2G);

--Remove the limits.

ALTER pluggable DATABASE STORAGE UNLIMITED;

--------------------------------------------------------------------------------------------

Copyright, the article allows reprint, but must be linked to the source address, otherwise investigate legal responsibility!

Aboutdave:

--------------------------------------------------------------------------------------------

qq:251097186

Email: [email protected]

Blog:http://blog.csdn.net/tianlesoftware

Weibo:http://weibo.com/tianlesoftware

Twitter:http://twitter.com/tianlesoftware

Facebook:http://www.facebook.com/tianlesoftware

Linkedin:http://cn.linkedin.com/in/tianlesoftware

Dave's QQ Group:

--------------------------------------------------------------------------------------------

Note: Add group must indicate tablespace and data file relationship | Do not repeat the addition group

cndba_1:104207940 (Full) cndba_2:62697716 (full) cndba_3:283816689

cndba_4:391125754 cndba_5:62697850 cndba_6:62697977 cndba_7:142216823 (full)

Oracle 12c Configuration and modification of CDB and PDB parameters

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.