Docstoc

Manually Database Creation Oracle 10G

Document Sample
Manually Database Creation Oracle 10G Powered By Docstoc
					Nidhi.suba@gmail.com


Manual Database Creation Steps:-
   (1) Login as oracle user and decide the name of new database
      For eg:- db01   ( and can set ORACLE_SID=db01 in .bashrc file)


   (2) Create directory structures in admin and oradata folder
      [oracle@seat118~] $cd /u01/app/oracle/oradata
      [oracle@seat118 oradata] $mkdir db01
      [oracle@seat118~] $ cd /u01/app/oracle/admin
      [oracle@seat118 admin] $mkdir db01
      [oracle@seat118~] $cd db01
      [oracle@seat118 db01] $mkdir adump bdump cdump ddump udump pfile

   (3) Copy pfile(init.ora) of another existing database and edit certain
       parameters and Save this file in pfile folder
      [oracle@seat118~] $cp /u01/app/oracle/admin/orcl/pfile/init.ora
      /u01/app/oracle/admin/db01/pfile
      And edit following parameters:-
      db_name,instance_name,background_dump_dest,user_dump_dest,core_dump_de
      st,control_files
      And save this file.
      [oracle@seat118~] $cd /u01/app/oracle/product/db_1/dbs
      [oracle@seat118~] $vim initdb01.ora
      And edit IFILE=’/u01/app/oracle/admin/db01/pfile/init.ora’
      And save this file

   (4) Create password file
      [oracle@seat118~] $cd /u01/app/oracle/product/10.2.0/db_1/dbs
      [oracle@seat118 dbs] $orapwd
      [oracle@seat118 dbs] $orapwd
      file=/u01/app/oracle/product/10.2.0/db_1/dbs/orapwdb01 password=sys
      [oracle@seat118 dbs] $ls –l

   (5) Now startup ur database in nomount phase and create database by the
       following Script.
      [oracle@seat118~] $export ORACLE_SID=db01
      [oracle@seat118~] $echo $ORACLE_SID
      db01
      [oracle@seat118~] $sqlplus
      Enter user name: sys as sysdba
      Password:
      Connected to an idle instance.
      SQL> startup nomount
Nidhi.suba@gmail.com


      SQL> create database db01
           MAXLOGIFLES 5
           MAXLOGMEMBERS 3
           MAXLOGHISTORY 100
           MAXDATAFILES 50
           MAXINSTANCES 1
      LOGFILE
          GROUP 1 ('/u01/app/oracle/oradata/db01/redo01.log') SIZE 4M,
          GROUP 2 (‘/u01/app/oracle/oradata/db01/redo02.log') SIZE 4M
      DATAFILE ‘/u01/app/oracle/oradata/db01/system01.dbf' SIZE 100M
      AUTOEXTEND ON NEXT 10M
      SYSAUX DATAFILE ‘/u01/app/oracle/oradata/db01/sysaux01.dbf'
      SIZE 100M
      AUTOEXTEND ON NEXT 10M
      DEFAULT TEMPORARY TABLESPACE temp
      TEMPFILE ‘/u01/app/oracle/oradata/db01/TEMP01.DBF' SIZE 10M
      AUTOEXTEND ON
      UNDO TABLESPACE undotbs1
      DATAFILE ‘/u01/app/oracle/oradata/db01/UNDOTBS01.dbf' SIZE
      10M;
      Database created.

  (6) Run the catalog and catproc script files
      SQL>@/u01/app/oracle/product/10.2.0/db_1/rdbms/admin/catalog.sql
      SQL>@/u01/app/oracle/product/10.2.0/db_1/rdbms/admin/catproc.sql

   (7) Check and observe the following:-
      SQL>select instance_name,status from v$instance;
      SQL>select * from v$tablespace;
      SQL>select name from v$datafile;
      SQL>select name from v$tempfile;
      SQL>select * from v$logfile;
      SQL>select * from v$log;

				
DOCUMENT INFO
Description: There are 3 way to installing database on oracle. first using DBCA command, second Manually and third OMF database creation. here i share a document manually database creation. i hope this is very helpfull to you.