Complete steps to manually create a database in Oracle

Source: Internet
Author: User
Step 1: create a directory for storing database files and log files in the $ ORACLE_BASEoradata and $ ORACLE_BAS

Step 1: create a directory for storing database files and log-related directories in $ ORACLE_BASE \ oradata and $ ORACLE_BAS

Complete steps to manually create a database in Oracle

1. Create a directory for storing database files and log-Related Files

Create the NEWDB directory in the $ ORACLE_BASE \ oradata and $ ORACLE_BASE \ admin directories respectively.

Use commands to view the directory structure

[Oracle @ wang NEWDB] $ pwd

/U01/app/admin/NEWDB

[Oracle @ wang NEWDB] $ pwd

/U01/app/oradata/NEWDB

Ii. Determine the ORACLE Instance name

[Oracle @ wang NEWDB] $ export ORACLE_SID = NEWDB

-------------------------------------- Split line --------------------------------------

Oracle 11g uses DBCA to create a database in non-interactive (silent) Mode

Oralce 10 Gb database creation using DBCA

Procedure for manually creating a database Oracle 11 GB

CentOS 5.2x86 install Oracle 11g R2 notes

Install Oracle 11gR2 (x64) in CentOS 6.4)

Steps for installing Oracle 11gR2 in vmwarevm

-------------------------------------- Split line --------------------------------------

3. Create an initialization parameter file

1. Create a parameter file

Vi $ ORACLE_BASE/dbs/initNEWDB. ora

Control_files = (/u01/app/oradata/NEWDB/control01.dbf,

/U01/app/oradata/NEWDB/control02.dbf,

/U01/app/oradata/NEWDB/control03.dbf)

Db_name = NEWDB

Db_domain = NEWDB.oracle.com

Log_archive_dest_1 = "LOCATION =/u01/app/admin/NEWDB/arch"

Log_archive_dest_state_1 = enable

DB _ block_size = 8192

Pga_aggregate_target = 90 M

Processes = 100

Sessions = 120

Open_cursors = 200

Undo_management = AUTO

Undo_tablespace = undotbs

Compatible = 10.2.0

Sga_target = 270 M

Nls_language = AMERICAN

Nls_territory = AMERICA

Db_recovery_file_dest =/u01/app/admin/NEWDB/flashback

Db_recovery_file_dest_size = 1G

Audit_dump_dest =/u01/app/admin/NEWDB/adump

Core_dump_dest =/u01/app/admin/NEWDB/cdump

Background_dump_dest =/u01/app/admin/NEWDB/bdump

2. Create a spfile parameter file

[Oracle @ wang dbs] $ sqlplus/as sysdba

SQL * Plus: Release 10.2.0.1.0-Production on Sun Feb 23 14:37:08 2014

Copyright (c) 1982,200 5, Oracle. All rights reserved.

Connected to an idle instance.

SQL> create spfile from pfile;

File created.

4. Create a database

1 startup nomount;

2. Compile the database creation script

Vi temp

CREATE DATABASE NEWDB

User sys identified by oracle

User system identified by oracle

Logfile group 1 ('/u01/app/oradata/NEWDB/redo01.log') SIZE 50 M,

GROUP 2 ('/u01/app/oradata/NEWDB // redo02.log') SIZE 50 M,

GROUP 3 ('/u01/app/oradata/NEWDB/redo03.log') SIZE 50 M

MAXLOGFILES 5

MAXLOGMEMBERS 5

MAXLOGHISTORY 1

MAXDATAFILES 100

MAXINSTANCES 1

Character set US7ASCII

National character set AL16UTF16

DATAFILE '/u01/app/oradata/NEWDB/system01.dbf' SIZE 325 M REUSE

EXTENT MANAGEMENT LOCAL

Sysaux datafile '/u01/app/oradata/NEWDB // sysaux01.dbf' SIZE 325 M REUSE

Default temporary tablespace tempts1

TEMPFILE '/u01/app/oradata/NEWDB/temp01.dbf'

SIZE 20 M REUSE

Undo tablespace undotbs

DATAFILE '/u01/app/oradata/NEWDB/undotbs01.dbf'

SIZE 200 m reuse autoextend on maxsize unlimited;

3. Execute the script

SQL> CREATE DATABASE NEWDB

User sys identified by oracle

User system identified by oracle

Logfile group 1 ('/u01/app/oradata/NEWDB/redo01.log') SIZE 50 M,

GROUP 2 ('/u01/app/oradata/NEWDB // redo02.log') SIZE 50 M,

GROUP 3 ('/u01/app/oradata/NEWDB/redo03.log') SIZE 50 M

MAXLOGFILES 5

MAXLOGMEMBERS 5

MAXLOGHISTORY 1

MAXDATAFILES 100

MAXINSTANCES 1

Character set US7ASCII

National character set AL16UTF16

DATAFILE '/u01/app/oradata/NEWDB/system01.dbf' SIZE 325 M REUSE

EXTENT MANAGEMENT LOCAL

Sysaux datafile '/u01/app/oradata/NEWDB // sysaux01.dbf' SIZE 325 M REUSE

Default temporary tablespace tempts1

TEMPFILE '/u01/app/oradata/NEWDB/temp01.dbf'

SIZE 20 M REUSE

Undo tablespace undotbs

DATAFILE '/u01/app/oradata/NEWDB/undotbs01.dbf'

SIZE 200 m reuse autoextend on maxsize unlimited;

2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 19 20 21 22

Database created.

For more details, please continue to read the highlights on the next page:

,

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.