P. 1
11g Database r12

11g Database r12

|Views: 12|Likes:
Published by sharmakaushal
ManualDatabase Creation
ManualDatabase Creation

More info:

Published by: sharmakaushal on Feb 22, 2013
Copyright:Attribution Non-commercial


Read on Scribd mobile: iPhone, iPad and Android.
download as DOCX, PDF, TXT or read online from Scribd
See more
See less





11g Manual Database creation

Things we need before creating the database. 1) 2) 3) 4) Proper Oracle HOME and the software should be installed in the $ORACLE_HOME Folder structure in the admin directory which contains adump,bdump,cdump,and udump. Init parameter file DB Creation script


Step 1: The database software i.e ORACLE_HOME binaries should be installed. For installing ORACLE SOFTWARE please follow the steps described in "Oracle 10g Home Install" page.

On the database host do the following. cd $ORACLE_HOME ls -ltr -> Here it should list all the files which are installed during the software installation. My Oracle home is located at /local/mnt/oracle/product/

Step 2: Creating "diag" directories for diagnostic_dest parameter.

In 11g there is no need to create directories for adump, budmp, cdump and udump in "admin" location. Normally admin directory will be created in the directory structure. Look for admin directory for oracle on your host. In my system my admin directory is located at /local/mnt/oracle/admin/SRITSTDB/

Step 3: Creating INIT parameter file.

*.aq_tm_processes=0 *.COMPATIBLE=''# 11.1 *.diagnostic_dest='/local/mnt/oracle/admin/SRITSTDB' # This parameter is the replacement for audit, background, core and user dump directories. *.control_files='/u01/app/oracle/data/db1/data/SRITSTDB/SRITSTDB_control01.ctl','/u01/app/oracle/data/ db2/data/SRITSTDB/SRITSTDB_control02.ctl', '/u01/app/oracle/data/db1/data/SRITSTDB/SRITSTDB_control03.ctl' *.db_block_size=8192 *.db_domain='WORLD' *.db_file_multiblock_read_count=16 *.db_files=1024 *.db_name='SRITSTDB' *.job_queue_processes=0 *.large_pool_size=150M# increase to 150M minimum req for 10.2, was 64M *.log_archive_dest='/u01/app/oracle/admin/SRITSTDB/arch/SRITSTDB_' *.nls_date_format='DD-MON-YYYY HH24:MI:SS' *.NLS_LENGTH_SEMANTICS='CHAR'# turn on after upgrade *.open_cursors=1800 *.pga_aggregate_target=500M *.remote_os_authent=FALSE *.sga_max_size=1000M *.sga_target=512M *.undo_management='AUTO' *.undo_retention=28800 *.undo_tablespace='UNDOTBS1' *.REMOTE_LOGIN_PASSWORDFILE=EXCLUSIVE Make sure all the yellow shaded paths should exists.

Step 4: Create password file in the $ORACLE_HOME/dbs folder.

On the database host do the following. cd $ORACLE_HOME cd dbs By Staying in "dbs" directory issue the following command. Here $ORACLE_SID is the name of the database which we are creating. $ORACLE_HOME/bin/orapwd file=orapw$ORACLE_SID password=srikanth entries=5

Step 5: DB creation scripts. In the next step I will show how to execute these scripts. In this step I will list all the scripts which are needed for the database creation.

We have to create the db creation scripts. The DB creation scripts will be as follows. You can create these scripts in any folder you want in your machine. Script 1: cr_db.sql file. --- This script accepts one parameter and the parameter will be the ORACLE DATABASE NAME. HERE the database name is SRITSTDB. set time on timing on feed on spool cr_db.log startup nomount CREATE DATABASE "&DBNAME" MAXINSTANCES 8 MAXLOGHISTORY 1 MAXLOGFILES 16 MAXLOGMEMBERS 3 MAXDATAFILES 1024 --CHARACTER SET UTF8 NATIONAL CHARACTER SET AL16UTF16 --DATAFILE '/opt/mis/oracle/data/db1/data/SRITSTDB/SRITSTDB_system1a.dbf' SIZE 1000M extent management local SYSAUX DATAFILE '/opt/mis/oracle/data/db1/data/SRITSTDB/SRITSTDB_sysaux1a.dbf' SIZE 1000M DEFAULT TEMPORARY TABLESPACE TEMP TEMPFILE '/opt/mis/oracle/data/db1/data/SRITSTDB/SRITSTDB_temp1a.dbf' SIZE 1000M extent management local uniform size 1m UNDO TABLESPACE "UNDOTBS1" DATAFILE '/opt/mis/oracle/data/db1/data/SRITSTDB/SRITSTDB_undotbs1a.dbf' SIZE 1000M --LOGFILE GROUP 1 ('/opt/mis/oracle/data/db1/data/SRITSTDB/SRITSTDB_log1a.dbf','/opt/mis/oracle/data/db2/data/SRITSTD B/SRITSTDB_log1b.dbf') SIZE 100M, GROUP 2 ('/opt/mis/oracle/data/db1/data/SRITSTDB/SRITSTDB_log2a.dbf','/opt/mis/oracle/data/db2/data/SRITSTD B/SRITSTDB_log2b.dbf') SIZE 100M, GROUP 3 ('/opt/mis/oracle/data/db1/data/SRITSTDB/SRITSTDB_log3a.dbf','/opt/mis/oracle/data/db3/data/SRITSTD B/SRITSTDB_log3b.dbf') SIZE 100M --USER SYS IDENTIFIED BY srikanth USER SYSTEM IDENTIFIED BY srikanth / NOTE: MAKE SURE ALL THE SHADED PATHS SHOULD EXIST ON YOUR MACHINE. YOU CAN CHANGE THE THESE DIRECTORY PATHS WHAT EVER YOU WANT.

Script 2: @dictionary.sql

connect /as sysdba spool dictionary.out @?/rdbms/admin/catalog.sql @?/rdbms/admin/catblock.sql @?/rdbms/admin/catproc.sql @?/rdbms/admin/catoctk.sql @?/rdbms/admin/owminst.plb @?/javavm/install/initjvm.sql @?/xdk/admin/initxml.sql @?/xdk/admin/xmlja.sql @?/rdbms/admin/catjava.sql @?/rdbms/admin/catexf.sql @?/rdbms/admin/catclust.sql connect SYSTEM/srikanth spool sqlplus.log @?/sqlplus/admin/pupbld.sql @?/sqlplus/admin/help/hlpbld.sql helpus.sql spool off spool off alter profile default limit FAILED_LOGIN_ATTEMPTS unlimited ; exit;

You're Reading a Free Preview

/*********** DO NOT ALTER ANYTHING BELOW THIS LINE ! ************/ var s_code=s.t();if(s_code)document.write(s_code)//-->