Predetermine a unique Oracle system identifier (SID) for your instance, open a command window, and set the ORACLE_SID environment variable. Use this command windows for the subsequent steps,untill complete all the under steps.
ORACLE_SID is used to distinguish this instance from other Oracle Database instances that you may create later and run concurrently on the same host computer. The maximum number of characters for ORACLE_SID is 12, and only letters and numeric digits are permitted. On some platforms, the SID is case-sensitive.
The following example for UNIX and Linux operating systems sets the SID for the instance that you will connect to in Step 6: Connect to the Instance:
Bourne, Bash, or Korn shell:
export ORACLE_SID=orcl
Step 2:Cteate the initialization parameter file(spile)
When an Oracle instance starts, it reads an initialization parameter file named spfile<sid>.ora in $/ORACLE_HOME/dbs acquiescently if you do not assign the initialization parameter file(pfile or spfile) explicitly. Now let begin creating the initialization parameter file. Firstly, create the pfile(initorcl.ora) from an existent sample(init.ora).
Mine seem like under one
$ORACLE_HOME/dbs/initorcl.ora
orcl.__db_cache_size=192937985 orcl.__java_pool_size=4194304 orcl.__large_pool_size=4194304 orcl.__shared_pool_size=75497472 orcl.__streams_pool_size=0 *.audit_file_dest='/home/oracle/admin/orcl/adump' *.background_dump_dest='/home/oracle/admin/orcl/bdump' *.control_files='/home/oracle/oradata/orcl/control01.ctl','/home/oracle/orad ata/orcl/control02.ctl','/home/oracle/oradata/orcl/control03.ctl' *.core_dump_dest='/home/oracle/admin/orcl/cdump' *.db_block_size=8192 *.db_domain='' *.db_file_multiblock_read_count=16 *.db_name='orcl' *.db_recovery_file_dest='/home/oracle/flash_recovery_area' *.db_recovery_file_dest_size=2147483648 *.dispatchers='(PROTOCOL=TCP) (SERVICE=orclXDB)' *.job_queue_processes=10 *.open_cursors=300 *.pga_aggregate_target=94371840 *.processes=150
Step 3: Connect to an idle instance and start up instance(orcl) nomount, then create the spfile from the pfile
[oracle@localhost pfile]$ cd [oracle@localhost ~]$ sqlplus /nolog SQL*Plus: Release 10.2.0.1.0 - Production on Mon Aug 8 16:08:02 2011 Copyright (c) 1982, 2005, Oracle. All rights reserved. SQL> conn / as sysdba Connected to an idle instance. SQL> startup nomount SQL> create spfile from pfile; SQL>
Step 4: Create some necessary directories
[oracle@localhost ~]$ mkdir -R /home/oracle/admin/orcl/
[oracle@localhost ~]$ cd /home/oracle/admin/orcl
[oracle@localhost ~]$ mkdir adump bdump cdump dpdump pfile udump
[oracle@localhost ~]$ mkdir -R /home/oracle/oradata/orcl
[oracle@localhost ~]$
Step 5: Connect to the nomount instance as sysdba and execute the follow statementset echo on spool /home/oracle/admin/orcl/create/create_db.log CREATE DATABASE orcl CONTROLFILE REUSE MAXINSTANCES 1 MAXLOGHISTORY 1 MAXLOGFILES 5 MAXLOGMEMBERS 5 MAXDATAFILES 100 DATAFILE '/home/oracle/oradata/orcl/system01.dbf' SIZE 325M REUSE AUTOEXTEND ON NEXT 10240K MAXSIZE UNLIMITED SYSAUX DATAFILE '/home/oracle/oradata/orcl/sysaux01.dbf' SIZE 250M REUSE UNDO TABLESPACE "UNDOTBS1" DATAFILE '/home/oracle/oradata/orcl/undotbs01.dbf ' SIZE 200M REUSE AUTOEXTEND ON NEXT 5120K MAXSIZE UNLIMITED DEFAULT TABLESPACE "users" DATAFILE '/home/oracle/oradata/orcl/users01.dbf' SIZE 500M REUSE AUTOEXTEND ON NEXT 5120K MAXSIZE UNLIMITED DEFAULT TEMPORARY TABLESPACE "TEMP1" TEMPFILE '/home/oracle/oradata/orcl/tem p01.dbf' SIZE 20M REUSE CHARACTER SET ZHS16GBK NATIONAL CHARACTER SET AL16UTF16 LOGFILE GROUP 1 ('/home/oracle/oradata/orcl/redo01.log') SIZE 100M REUSE, GROUP 2 ('/home/oracle/oradata/orcl/redo02.log') SIZE 100M REUSE, GROUP 3 ('/home/oracle/oradata/orcl/redo03.log') SIZE 100M REUSE; spool off
If nothing go wrong, it will prompt :Database created.
Otherwise scan the /home/oracle/admin/orcl/bdump/alert_orcl.log looking for the error.
Step 6: Run scripts to build data dictionary views
@?/rdbms/admin/catalog.sql @?/rdbms/admin/catproc.sql @?/sqlplus/admin/pupbld.sql
For now, an instance is already built. It is so easy?