Oracle multitenant option-12c Frequently asked Questions (document ID 1511619.1) translations

Source: Internet
Author: User
Tags sqlplus

Applies To: Enterprise Edition database-version (12.1) The knowledge in this document applies to all platforms. Document purpose documents describe many aspects and usages of a pluggable database to better understand the product, and the document can also be used as a quick reference manual. Q-cdb/pdb conceptual knowledge in the 12c multi-tenancy architecture. What does pluggable database (PDB) mean in a multitenant architecture? The pluggable database (PDB) is a new feature in Oracle Database 12c (12.1). You can have multiple pluggable databases within a single database. Pluggable databases are completely backwards compatible. Why use the multi-tenancy option? is to achieve the following database consolidation objectives: Reduce the total cost of operations management:--management cost--data center cost--storage cost------resource utilization--manageability--integration--service management does not need to change the application does not degrade performance you must provide resource management and isolation between applications to simplify database upgrades And what are the benefits of patching from multi-tenant options? The benefits of a multi-tenant pluggable database are: the ability to quickly configure a new database or a copy of an existing database via the plug-and-play function, enabling rapid re-deployment of existing databases to new platforms for many databases, quick patching or upgrading of database versions, And the cost of doing this is only one time you can unplug the PDB to package or upgrade, and then plug it into a different CDB with a newer version. PDB in one machine can run more DB instances than a single database detach the role of the application administrator from the responsibilities of the system administrator provided by Oracle how easy is it to upgrade from an existing database version to a 12c multi-tenant database? Migrating to a 12c pluggable database is straightforward. You can choose one of the options that best suits you: Method 1: Upgrade the current low version database to 12.1 after inserting the database into CDB Method 2: Provide an empty PDB with data pump for each database that needs to be upgraded or Ogg to migrate the database to the PDB multi-tenant architecture, what database features are not supported at this stage? The database features currently not supported in CDB are as follows: Conformance query notification Flashback data Archive heat map Automatic data optimization If you must use the above features, you need to create a non-CDB. How does the basic operation of multi-tenant cdb/pdb know if a database is a multi-tenant database? Use the following statement to query:sql> select NAME, DECODE (CDB, ' YES ', ' multitenant Option enabled ', ' Regular 12c Database: ') ' Multitenant Opti On? ", Open_mode, con_id from V$database; How to confirm what is in the CDBWhat about the PDB? Sql> Select con_id, NAME, open_mode from V$pdbs; how do I connect to a specific PDB, such as: PDB6? You can use the following command to switch from another PDB or root container to pdb6:sql> alter session set container = PDB6, or you can use the following method sql* The Plus connect command connects to the PDB: Connect username/[email protected][:p ort][/service_name][:server][/instance_ with fast connection Name] If from os:$ sqlplus hpal/[email protected]//hpal-node1:1521/pdb2or$ sqlplus hpal/[email protected]// localhost:1521/pdb2or$ sqlplus hpal/[email protected]//localhost/pdb2 View current connection pdb:show con_name using service Name Connection example: Sqlplus Hpal/[email protected] How do I switch to the primary container database? sql> ALTER SESSION SET CONTAINER = cdb$root; how do I confirm the PDB or CDB of the current connection? Sql> Show con_namesql> Select Sys_context (' Userenv ', ' con_name ') "Container DB" from dual; how do I start a PDB? If the current connection pdb:sql> alter pluggable database open, if the current connection root:ql> alter pluggable database PDB6 open; how do I turn off the PDB? If the current connection is pdb:sql> alter pluggable database close; If the current connection is root:sql> alter pluggable database PDB6 close; how do the container databases start to stop? Use Startup/shutdown to start and stop CDB like non-CDB: If the CBD is closed, you cannot access the PDB. In CDB, Root andAll PDB shares a single instance, or, when using RAC, shares multiple concurrent DB instances. Start and close the entire CDB, not the single PDB. However, when CDB is open, you can change the open state of a PDB by altering the pluggable database command. What parameters can be changed at the PDB level? Select NAME, ispdb_modifiable from V$parameter; What are the ordinary users in CDB? Sql> SELECT distinct USERNAME from cdb_users where common = ' YES '; how do I create a normal user? sql> Create User C # #db_dba1 identified by Manager1 Container=all; Sql> create user Pdb6_dba1 identified by Manager1 Container=current; What is the difference between a multitenant architecture container id=0 and 1? con_id "0" means that the data does not belong to any one container, but to the CDB as a whole. For example: The data returned from V$database is CDB but not suitable for any particular container, so con_id is set to "0". A Container_data object can return data belonging to different containers (including root of con_id==1) or CDB, and the con_id of a row belonging to CDB is set to 0. Meaning of different values of different conn_id in the container data object: 0 = Data belonging to the entire cdb1= data belongs to the root2= data belonging to the seed3-254= data belongs to the PDB, each PDB has its own container ID. Is there a background process associated with the PDB? such as: Pmon,smon, etc. not. There is only one set of root and all PDB shared background processes. Is there a separate control file for each PDB? No. The entire CDB has only a single redo log and control file. Do you want to have separate log files for each PDB? No. The entire CDB has only a single redo log and control file. Can I monitor the use of the SGA on the PDB with PDB basis? All PDB is shared with an SGA. However, the consumption of the SGA can be monitored by root or pdb. Sql> alter session set Container=cdb$root; Sql> Select POOL, NAME, BYTES from V$sgastat where con_id = ' &con_id '; Sql> Select con_id, pool, sum (bytes) from V$sgastat Group by con_id, pool order by con_id, pool; PD can be monitored via PDB basis b on the use of PGA? Select con_id, sum (PGA_USED_MEM), sum (PGA_ALLOC_MEM), sum (PGA_MAX_MEM) from v$process Group by con_id Order by con_id; Alter session set container =cdb$root; Select name, value from V$sysstat where NAME is like ' workarea% '; Alter session Set container = <targetpdb>;select name, value from V$sysstat where NAME is like ' workarea% '; each PDB requires a single A single undo table space? There is only one undo table space in a single instance of CDB. In RAC CDB, each instance has one in the undo table space. Only an ordinary user with the appropriate permissions and the current connection container is root can create an undo tablespace. Does each PDB require a separate system tablespace? Root and each PDB have a system table space. Does each PDB require a separate Sysaux tablespace? Root and each PDB have a sysaux table space. Does each PDB need to have a separate temporary tablespace? For the entire CDB, there is only one default temporary tablespace. However, you can create additional temporary table spaces for each PDB. For single-instance CDB, only one temporary table space is needed, and for RAC CDB, each instance needs a temporary tablespace. Is it possible to specify a different default tablespace for root and for each PDB? Of course. Are the physical data files of root and pdb separate? The data file is separate for each pdb,seed and root. So where is the user data stored in the CBD? In CDB, most of the user data exists in the PDB. Root does not store or store a small amount of user data. Can pluggable databases support separate character sets? CDB uses a character set. All PDB in CDB uses the same character set as CDB. Oracle recommendations: For all new deploymentsAnd if all the PDB is empty, then Oracle strongly recommends that the CDB database character set use Al32utf8, CDB national character set using it is strongly recommended to convert an existing database to a CDB of one or more Al32utf8 character sets, as required before merging. A non-CDB can be converted to Al32utf8 using the database Unicode Conversion Assistant. However, after creation, you cannot use the database Conversion Assistant to convert the CDB character set. If you cannot convert a character set before merging the database, you need to use a plug-in-compatible database character set grouping and then plug each group into a different CDB using the appropriate superset. Reference Document:,%2012c% 20release%201%20 (12.1) How do I configure a network file in a pluggable database environment? CDB has a unique Listener.ora,tnsnames.ora,sqlnet.ora file, which is shared by all PDB in CDB. CDB/PDB Advanced Operations How do I install settings pluggable databases? Use Runinstaller to install the database software to create a database using DBCA. You can create multiple PDB in one operation. DBCA allows you to specify the number of PDB when creating CDB, you can use DBCA to unplug the PDB from the CDB. What action acts as an entity on the PDB? These actions: Create a PDB (a new, existing PDB copy, insert a PDB that is not plugged in) unplug the PDB to remove the PDB setting PDB Open_mode How do I create a pluggable database? Create pluggable database x Admin User A identified by P;create pluggable database y Admin User A identified by P File_nam E_convert = (' Pdbseed ', ' y '); How do I completely remove a PDB? Drop pluggable database xincluding datafiles; How simple is the configuration of using PL/SQL to manage PDB? Example: Omf:declaret0 integer NOT null: = -1;procedure show_time (what in Varchar2) ist varchar2 (begint): = Lpad ((dbms_utility. Get_time ()-T0), 5);D bms_output.put_line (' Create PDB: ' | | t| | ' centiseconds '); end show_time;begint0: = Dbms_utility.get_time (); Execute immediate ' Create pluggable database Xadmin User A identified by P '; Show_time (' Create PDB: '); T0: = Dbms_utility.get_time (); Execute immediate ' drop pluggable database xincluding datafiles ' ; Show_time (' drop PDB: '); end; how do I clone a PDB? The cloned PDB must be opened in read Only mode. Omf:create pluggable database X2from x; how do I pull out a PDB? Alter pluggable database x unplug into '/some_directory/x_description.xml '; The in statement must be followed by an XML file that describes the full path of the PDB. Extensibility &rac How do I add or change a user-managed service? Rvctl Add Service ... –pdb <pdb_name>srvctl will automatically open the PDB on all instances that have service startup. If <pdb_name> is set to ', it also means that the service property value is set to NULL, then the service can only connect to the root how can I see which services are bound to the pluggable database? Sql> Column name format a30sql> select PDB, inst_id, NAME from Gv$services order by 1; Diagnose alarm logs about how to find the PDB? All PDB alarm messages are placed in the same alarm log. Information about the container database can be found in the XML format Diag alert and the Diag trace in the text format. You can also view detail information by viewing the dynamic performance View V$diag_info. How do I view the trace files related to PDB? All trace files generated by the PDB are currently available in the container database Diag trace Discovery. You can view the dynamic performance view V$diag_infoView detail information. Other if the PDB, there is user-defined, or ordinary user-created mode object, when unplugged and then inserted into another CDB, and the original ordinary user in this new CDB does not exist, then the original schema object what to do? Which user will they belong to? PDB, do you still have those permissions that were previously granted to other users with permissions on those schema objects? If you insert a PDB with a normal user in the CDB, the general permissions previously granted by ordinary users in the PDB (including set container permissions) will be canceled. If the CDB has the same normal user name as the newly inserted PDB, they will be merged. And the user password is based on CDB. Otherwise, the user in the newly inserted PDB will be locked out. In this case, you can: Let it remain locked, using the pattern of the object. Use the data pump to migrate these objects to another mode, and then delete the locked user account. Close the PDB, connect to root, and create a user with the same name as the locked account. When you reopen the PDB, the database handles the difference in permissions between the locked user and the new user. After that, you can unlock the locked users in the PDB. The user's previous permissions and roles will remain intact. is the multi-tenant option available in the standard version? Available, but each CDB will be able to create only one PDB. Can transactions span PBD? No. Although you can use ALTER session set container after starting a transaction on a PDB, you can use the SELECT statement only in the second PDB. Transactions are reserved and can be switched back to the original PDB for commit or rollback. What data is stored in the Cdb_ and v$ views in each container? The Cdb_ view is a container data object. When a user connects to root and then queries a cdb_ view, the query results depend on the Container_data value that the view sets for that user. The Container_data SQL ALTER user statement is used to set and modify the user's Container_data value. Under the root of multi-tenant CDB, the cdb_ view can be used to query the root and PDB for tables, table spaces, users, permissions, parameters, and so on. Regardless of whose information the Cdb_ view collects, the Cdb_ view belongs to the SYS user. By default, when a user connects to root, only the information that belongs to the root is visible. Can each PDB set its own time zone? OK. Can each PDB set its own NLS parameters? OK. How can I monitor the undo use of each container/database in cdb/pdb? Select Name,max (tuned_undoretention), Max (Maxquerylen), Max (nospaceerrcnt), Max (EXPSTEALCNT) from V$containers C, V$undostat uwhere C.con_id=u.con_idgroup by Name;select Name,snap_id,undotsn,undoblks, Txncount,maxquerylen,maxquerysqlidfrom v$containers C, dba_hist_undostat uwhere C.con_id=u.con_idand u.CON_DBID=c. Dbidorder by NAME; What is the difference between a multitenant architecture and a schema-based model? User name conflicts organize schema-based consolidation. Pattern-based integration security is low. Per-application,back-end,point-in-time recovery is difficult to reconcile the allocation of resources between applications and back-ends. Patching for individual apps and back-end is not done. Cloning of individual applications and back-end is difficult.

Oracle multitenant option-12c Frequently asked Questions (document ID 1511619.1) translations

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