0% found this document useful (0 votes)
69 views

Configure Instance Parameters and Modify Container Databases (CDB) and Pluggable Databases (PDB)

This document describes how to configure instance parameters in a CDB and PDB using ALTER SYSTEM commands, modify a PDB using ALTER PLUGGABLE DATABASE commands such as changing the default edition, tablespaces, global name, time zone, and datafile properties. It also describes limiting the maximum size and shared temp space of a PDB using ALTER PLUGGABLE DATABASE STORAGE.

Uploaded by

Ahmed Nagy
Copyright
© © All Rights Reserved
Available Formats
Download as TXT, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
69 views

Configure Instance Parameters and Modify Container Databases (CDB) and Pluggable Databases (PDB)

This document describes how to configure instance parameters in a CDB and PDB using ALTER SYSTEM commands, modify a PDB using ALTER PLUGGABLE DATABASE commands such as changing the default edition, tablespaces, global name, time zone, and datafile properties. It also describes limiting the maximum size and shared temp space of a PDB using ALTER PLUGGABLE DATABASE STORAGE.

Uploaded by

Ahmed Nagy
Copyright
© © All Rights Reserved
Available Formats
Download as TXT, PDF, TXT or read online on Scribd
You are on page 1/ 2

Configure Instance Parameters in a CDB (ALTER SYSTEM)

------------------------------------------------------
ALTER SYSTEM SET parameter_name=value;
ALTER SYSTEM SET parameter_name=value CONTAINER=CURRENT;

ALTER SYSTEM SET parameter_name=value CONTAINER=ALL;

Configure Instance Parameters in a PDB (ALTER SYSTEM)


-------------------------------------------------------
COLUMN name FORMAT A35
COLUMN value FORMAT A35

SELECT name, value


FROM v$system_parameter
WHERE ispdb_modifiable = 'TRUE'
ORDER BY name;

CONN / AS SYSDBA
ALTER SESSION SET CONTAINER = pdb1;

ALTER SYSTEM SET parameter_name=value;


ALTER SYSTEM SET parameter_name=value CONTAINER=CURRENT;

Modify a PDB (ALTER PLUGGABLE DATABASE)


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

CONN / AS SYSDBA
ALTER SESSION SET CONTAINER = pdb1;

-- Default edition for PDB.


ALTER PLUGGABLE DATABASE DEFAULT EDITION = ora$base;

-- Default tablespace type for PDB.


ALTER PLUGGABLE DATABASE SET DEFAULT BIGFILE TABLESPACE;
ALTER PLUGGABLE DATABASE SET DEFAULT SMALLFILE TABLESPACE;

-- Default tablespaces for PDB.


ALTER PLUGGABLE DATABASE DEFAULT TABLESPACE users;
ALTER PLUGGABLE DATABASE DEFAULT TEMPORARY TABLESPACE temp;

-- Change the global name. This will change the container name and the
-- name of the default service registered with the listener.
ALTER PLUGGABLE DATABASE OPEN RESTRICTED FORCE;
ALTER PLUGGABLE DATABASE RENAME GLOBAL_NAME TO pdb1a.localdomain;
ALTER PLUGGABLE DATABASE CLOSE IMMEDIATE;
ALTER PLUGGABLE DATABASE OPEN;

-- Time zone for PDB.


ALTER PLUGGABLE DATABASE SET TIME_ZONE='GMT';

-- Make datafiles in the PDB 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 logging for PDB.
ALTER PLUGGABLE DATABASE ADD SUPPLEMENTAL LOG DATA;
ALTER PLUGGABLE DATABASE DROP SUPPLEMENTAL LOG DATA;

In addition there is a mechanism to control the maximum size of the PDB and the
amount of the shared temp space it can use.

-- Limit the total storage of the the PDB (datafile and local temp files).
ALTER PLUGGABLE DATABASE STORAGE (MAXSIZE 5G);

-- Limit the amount of temp space used in the shared temp files.
ALTER PLUGGABLE DATABASE STORAGE (MAX_SHARED_TEMP_SIZE 2G);

-- Combine the two.


ALTER PLUGGABLE DATABASE STORAGE (MAXSIZE 5G MAX_SHARED_TEMP_SIZE 2G);

-- Remove the limits.


ALTER PLUGGABLE DATABASE STORAGE UNLIMITED;

You might also like