Thursday, May 21, 2009

Create Oracle Database

Step 1: Decide on Your Instance Identifier (SID)

Step 2: Establish the Database Administrator Authentication Method

Step 3: Create the Initialization Parameter File

Step 4: Connect to the Instance

Step 5: Create a Server Parameter File (Recommended)

Step 6: Start the Instance

Step 7: Issue the CREATE DATABASE Statement

Step 8: Create Additional Tablespaces

Step 9: Run Scripts to Build Data Dictionary Views

Step 10: Run Scripts to Install Additional Options (Optional)

Step 11: Back Up the Database.

Step 1: Decide on Your Instance Identifier (SID)

C:\>set ORACLE_SID=orclnew

Step 2: Establish the Database Administrator Authentication Method

C:\>oradim -new -sid orclnew -intpwd orclnewpwd -startmode M

C:\oracle\product\10.2.0\db_1\database\ PWDorclnew.ora created

Step 3: Create the Initialization Parameter File

create initorclnew.ora file(C:\oracle\product\10.2.0\db_1\database)

Step 4: Connect to the Instance

sqlplus /nolog

SQL> connect sys/orclnewpwd as sysdba

SQL>startup nomount pfile='C:\oracle\product\10.2.0\db_1\database\initorclnew.ora';

Step 5: Create a Server Parameter File (Recommended)

CREATE SPFILE='C:\ORACLE\PRODUCT\10.2.0\db_1\database\spfilenew.ora’ from

Pfile=’C:\ORACLE\PRODUCT\10.2.0\ADMIN\orcl\pfile\init.ora’;

SHUTDOWN

Step 6

STARTUP NOMOUNT

Step 7: Create database

CREATE DATABASE orclnew

USER SYS IDENTIFIED BY pz6r58

USER SYSTEM IDENTIFIED BY y1tz5p

LOGFILE GROUP 1 ('C:\ORACLE\PRODUCT\10.2.0\oradata\orclnew\redo01.log') SIZE 100M,

GROUP 2 ('C:\ORACLE\PRODUCT\10.2.0\oradata\orclnew\redo02.log') SIZE 100M,

GROUP 3 ('C:\ORACLE\PRODUCT\10.2.0\oradata\orclnew\redo03.log') SIZE 100M

MAXLOGFILES 5

MAXLOGMEMBERS 5

MAXLOGHISTORY 1

MAXDATAFILES 100

MAXINSTANCES 1

CHARACTER SET US7ASCII

NATIONAL CHARACTER SET AL16UTF16

DATAFILE 'C:\ORACLE\PRODUCT\10.2.0\oradata\orclnew\system01.dbf' SIZE 325M REUSE

EXTENT MANAGEMENT LOCAL

SYSAUX DATAFILE 'C:\ORACLE\PRODUCT\10.2.0\oradata\orclnew\sysaux01.dbf' SIZE 325M REUSE

DEFAULT TABLESPACE tbs_1

DEFAULT TEMPORARY TABLESPACE tempts1

TEMPFILE 'C:\ORACLE\PRODUCT\10.2.0\oradata\orclnew\temp01.dbf'

SIZE 20M REUSE

UNDO TABLESPACE undotbs

DATAFILE 'C:\ORACLE\PRODUCT\10.2.0\oradata\orclnew\undotbs01.dbf'

SIZE 200M REUSE AUTOEXTEND ON MAXSIZE UNLIMITED;

Step 8: Create Additional Tablespaces

CREATE TABLESPACE backoffice_users LOGGING

DATAFILE 'C:\ORACLE\PRODUCT\10.2.0\oradata\orclnew\user01.dbf'

SIZE 25M REUSE AUTOEXTEND ON NEXT 1280K MAXSIZE UNLIMITED

EXTENT MANAGEMENT LOCAL;

Step 9: Run Scripts to Build Data Dictionary Views

CONNECT SYS/password AS SYSDBA

@ catalog.sql

@catproc.sql

Step 11: Back Up the Database.

Take a full backup of the database to ensure that you have a complete set of files from

which to recover if a media failure occurs.

TNSNAMES.ORA

ORCLNEW =

(DESCRIPTION =

(ADDRESS_LIST =

(ADDRESS = (PROTOCOL = TCP)(HOST = 10.100.0.65)(PORT = 1521))

)

(CONNECT_DATA =

(SID = orclnew)

)

)

LISTENER.ORA

(SID_DESC=

(GLOBAL_DBNAME=orclnew)

(ORACLE_HOME= C:\oracle\product\10.2.0\client_1)

(SID_NAME=ORCLNEW)

No comments:

Post a Comment

Followers