Oracle Database creation process

Source: Internet
Author: User

Oracle Database creation process

Since there is already a database instance in the current environment, this does not affect the creation of a new instance sun

Current System instance

[oracle@DBA2 dbs]$ env |grep ORACLEORACLE_SID=orcl1ORACLE_BASE=/u/oracleORACLE_HOME=/u/oracle/product/11.2[oracle@DBA2 dbs]$

1. First, set the ORACLE_SID of the database to be created.

Export $ ORACLE_SID = sun

2. Create a password file for the new instance

Orapwd file = $ ORACLE_HOME/dbs/orapwsun password = oracle entries = 10

3. Create an initialization parameter file (pfile)

[oracle@DBA2 dbs]$ vi initsun.oradb_name=suncontrol_files='/oradata/sun/control01.ctl'sga_target=250Mundo_management=autoundo_tablespace=undotbs

The main parameters are db_name, control_files, and sga_target.

4. Create instance-related directories (data files, log files, control files, etc)

I put the data files, log files, and control files in a directory. I only use one control file here. Of course, it is recommended that two or three control files be stored in different paths to ensure data file redundancy.

[oracle@DBA2 ~]$ mkdir /oradata/sun[oracle@DBA2 admin]$ mkdir /u/oracle/admin/adump[oracle@DBA2 admin]$ mkdir /u/oracle/admin/bdump[oracle@DBA2 admin]$ mkdir /u/oracle/admin/pfile

5. Create a spfile file and start the database to nomount.

SQL> create spfile from pfile;File created.SQL> startup nomountORACLE instance started.Total System Global Area 418484224 bytesFixed Size 1336932 bytesVariable Size 281020828 bytesDatabase Buffers 130023424 bytesRedo Buffers 6103040 bytesSQL>

6. Create a database (with scripts)

CREATE DATABASE sunUSER SYS IDENTIFIED BY oracleUSER SYSTEM IDENTIFIED BY oracleLOGFILE GROUP 1 ('/oradata/sun/redo01a.log') SIZE 20M,GROUP 2 ('/oradata/sun/redo02a.log') SIZE 20M,GROUP 3 ('/oradata/sun/redo03a.log') SIZE 20MMAXLOGFILES 5MAXLOGMEMBERS 5MAXLOGHISTORY 1MAXDATAFILES 100MAXINSTANCES 2CHARACTER SET AL32UTF8DATAFILE '/oradata/sun/system01.dbf' SIZE 400M REUSEEXTENT MANAGEMENT LOCALSYSAUX DATAFILE '/oradata/sun/sysaux01.dbf' SIZE 400M REUSEDEFAULT TABLESPACE usersDATAFILE '/oradata/sun/users01.dbf' SIZE 20M REUSE AUTOEXTEND ON MAXSIZE UNLIMITEDDEFAULT TEMPORARY TABLESPACE tempts01TEMPFILE '/oradata/sun/tempts01.dbf' SIZE 20M REUSEUNDO TABLESPACE undotbsDATAFILE '/oradata/sun/undotbs01.dbf' SIZE 200M REUSE AUTOEXTEND ON MAXSIZE UNLIMITED/

 

7. Execute relevant data dictionary attempts

@? /Rdbms/admin/catalog. SQL
@? /Rdbms/admin/catproc. SQL
@? /Sqlplus/admin/pupbld. SQL

OK. Now the manual creation of the Oracle database is complete. The experiment proves that manual database creation is easier and faster than DBCA database creation, and the basic process is divided into the above steps.

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.