Configure and modify CDB and PDB parameters in Oracle 12c, 12 cpdb

Source: Internet
Author: User

Configure and modify CDB and PDB parameters in Oracle 12c, 12 cpdb


 

1. Configure CDB instance Parameters

 

The instance parameters for configuring CDB are the same as those for normal instances. You can use alter system to set initialization parameters. For some database configurations, you can use the ALTERDATABASE command.

 

After connecting to the rootcontainer, you can use the alter system command to modify it. By default, it is only valid for the root container, that is, the current container. The following two commands serve the same purpose:

 

Alter system set parameter_name = value;

Alter system set parameter_name = valueCONTAINER = CURRENT;

 

 

To make the modification valid for all container, use the following syntax:

Alter system set parameter_name = valueCONTAINER = ALL;

 

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

 

2. Configure PDB instance Parameters

 

If CONTAINER = ALL is set in rootcontainer, the PDB parameter also inherits the previous value, but it can be modified in PDB container through alter system. Note that this parameter can be modified only when it is supported. You can use the following command to view it:

 

 

Column name format a35

Column value format a35

 

Select name, value

From v $ system_parameter

WHERE ispdb_modifiable = 'true'

Order by name;

 

-- Here I have 174 parameters, which can be modified in PDB:

SQL> select count (1) fromv $ system_parameter where ispdb_modifiable = 'true ';

 

COUNT (1)

----------

174

 

 

The procedure is as follows:

CONN/AS SYSDBA

Alter session set container = pdb1;

 

Alter system set parameter_name = value;

Alter system set parameter_name = valueCONTAINER = CURRENT;

 

 

3. Modify CDB (alter database)

 

The alter database command is the same as the non-cdb database Command. Some commands can affect CDB and all PDB, and some are only valid for the root container. For more information, see the official website.

 

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

 

 

4. Modify PDB (alter pluggabledatabase)

 

After specifying a specific PDB, you can use the alterpluggable database command to modify the PDB information. Of course, for backward compatibility, the alter database command can also complete most of the modifications.

 

The specific modification operations are as follows:

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 will change the container name and

-- 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 1 M;

 

-- Supplemental loggingfor PDB.

Alter pluggable database add supplementallog data;

Alter pluggable database drop supplementallog data;

 

 

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

 

-- Limit the totalstorage of 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 two.

Alter pluggable database storage (maxsize5G MAX_SHARED_TEMP_SIZE 2G );

 

-- Remove the limits.

Alter pluggable database storage unlimited;

 

 

 

 

 

 

Bytes --------------------------------------------------------------------------------------------

All rights reserved. reprinted articles are allowed, but source addresses must be indicated by links. Otherwise, the documents will be held legally responsible!

 

AboutDave:

Bytes --------------------------------------------------------------------------------------------

QQ: 251097186

Email: tianlesoftware@gmail.com

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

WEAVER: 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:

Bytes --------------------------------------------------------------------------------------------

Note: The relationship between tablespaces and data files must be specified for grouping. | do not add groups repeatedly.

CNDBA_1: 104207940 (full) CNDBA_2: 62697716 (full) CNDBA_3: 283816689

CNDBA_4: 391125754 CNDBA_5: 62697850 CNDBA_6: 62697977 CNDBA_7: 142216823 (full)

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.