Oracle 12C--Create CDB manually

Source: Internet
Author: User
Tags sqlplus

1. Specify Oracle_sid

$ Export ORACLE_SID=DB12

2. Specify environment variables

such as Oracle_base, Oracle_home, PATH (to include $oracle_home/bin)
3. Select the authentication method

• Operating system validation

• Password file validation
4. Create initialization parameter file

$ VI initdb12.oradb_name='db12'Memory_target=2Gprocesses= Maxdb_block_size=8192Db_domain="'diagnostic_dest='/u12/app/oracle'Dispatchers='(PROTOCOL=TCP) (SERVICE=DB12XDB)'open_cursors= -Remote_login_passwordfile='EXCLUSIVE'Undo_tablespace='UNDOTBS1'Control_files='/u12/app/oracle/oradata/db12/control01.ctl','/u12/app/oracle/oradata/db12/control02.ctl'compatible='12.0.0'audit_file_dest='/u12/app/oracle/admin/db12/adump'Audit_trail='DB'Enable_pluggable_database=true

5. If you are windows, you need to create an instance

> Oradim-new-sid <sid>-startmode manual-pfile <file>

6. Connect to an instance

$ sqlplus/nologsql> Conn/ as sysdbaconnected to an idle instance.

7. Create SPFile

 from pfile; File created. SQL

8. Launch an instance

sql>2147483648  bytesfixed size                  2926472  bytesvariable size             1291847800 bytesdatabase buffers           838860800 Bytesredo buffers                13848576 Bytessql>

9. Execute the CREATE DATABASE command

CREATE DATABASE DB12 user SYS identified by the Oracle user system identified by Oracle logfile Group1('/u12/app/oracle/oradata/db12/redo01a.log','/u12/app/oracle/oradata/db12/redo01b.log') size 100m, group2('/u12/app/oracle/oradata/db12/redo02a.log','/u12/app/oracle/oradata/db12/redo02b.log') size 100m, group3('/u12/app/oracle/oradata/db12/redo03a.log','/u12/app/oracle/oradata/db12/redo03b.log') size 100m maxloghistory1Maxlogfiles -maxlogmembers3Maxdatafiles1024x768characterSetAl32utf8 national CharacterSetal16utf16 Extent Management local datafile'/u12/app/oracle/oradata/db12/system01.dbf'size 700m reuse autoextend on next 10240k maxsize unlimited sysaux datafile'/u12/app/oracle/oradata/db12/sysaux01.dbf'size 550m reuse autoextend on next 10240k MaxSize Unlimiteddefaulttablespace users datafile'/u12/app/oracle/oradata/db12/users01.dbf'size 500m reuse autoextend on MaxSize Unlimiteddefaulttemporary tablespace tempts1 tempfile'/u12/app/oracle/oradata/db12/temp01.dbf'size 20m reuse autoextend on next 640k maxsize unlimited undo tablespace undotbs1 DataFile'/u12/app/oracle/oradata/db12/undotbs01.dbf'size 200m reuse autoextend on next 5120k maxsize Unlimited enable pluggable database seed File_name_convert 
    = ('/u12/app/oracle/oradata/db12',                         '/U12/APP/ORACLE/ORADATA/DB12/PDB1') system datafiles size 125m autoextend on next 10m maxsize unlimited sysaux datafiles size 100m user_data t Ablespace Usertbs datafile'/u12/app/oracle/oradata/db12/pdb1/usertbs01.dbf'Size 200m reuse autoextend on MaxSize Unlimited;

10. Run the script to create a data dictionary view

Execute @ sysdba/rdbms/admin/catalog.sql@/rdbms/admin/catproc.sql under System user @?/sqlplus /admin/pupbld.sql

11.windows, set the boot to start automatically

> Oradim-edit-sid <sid>-startmode auto-srvcstart SYSTEM [-spfile]

12. View

Sql>SelectCon_id,dbid,name,open_mode fromV$pdbs; con_id DBID NAME Open_mode---------- ---------- ------------------------------ ----------2 3463549582pdb$seed READ Onlysql>SelectCon_id,dbid,name,open_mode fromv$containers; con_id DBID NAME Open_mode---------- ---------- ------------------------------ ----------1 1741224387cdb$root READ WRITE2 3463549582pdb$seed READ Onlysql>

Oracle 12C--Create CDB manually

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.