Thinking Out Loud

October 28, 2011

11.2.0.3 Silent Install and Database Creation using OMF

Filed under: 11g,oracle — mdinh @ 2:06 am

Performing Silent Install

Operating System:

> uname -an
SunOS <hostname> 5.10 Generic_142909-17 sun4u sparc SUNW,Sun-Fire-880

oraInst.loc:

> cat /var/opt/oracle/oraInst.loc
inventory_loc=/u01/app/11.2.0.3/oraInventory
inst_group=dba

Response File:

> cat /home/mdinh/ora_stage/11.2.0.3/patchset/database/response/swonly.rsp
#------------------------------------------------------------------------------
# Do not change the following system generated value.
#------------------------------------------------------------------------------
oracle.install.responseFileVersion=/oracle/install/rspfmt_dbinstall_response_schema_v11_2_0
oracle.install.option=INSTALL_DB_SWONLY
UNIX_GROUP_NAME=dba
INVENTORY_LOCATION=/u01/app/11.2.0.3/oraInventory
SELECTED_LANGUAGES=en
ORACLE_HOME=/u01/app/oracle/product/11.2.0.3/dbhome_1
ORACLE_BASE=/u01/app/oracle
oracle.install.db.InstallEdition=EE
oracle.install.db.EEOptionsSelection=true
# oracle.rdbms.partitioning:11.2.0.3.0 - Oracle Partitioning
oracle.install.db.optionalComponents=oracle.rdbms.partitioning:11.2.0.3.0
oracle.install.db.DBA_GROUP=dba
oracle.install.db.OPER_GROUP=dba
SECURITY_UPDATES_VIA_MYORACLESUPPORT=false
DECLINE_SECURITY_UPDATES=true
oracle.installer.autoupdates.option=SKIP_UPDATES

Shell Script:

> cat swonly.sh
#!/bin/sh -x
/home/mdinh/ora_stage/11.2.0.3/patchset/database/runInstaller -debug -silent -force -responseFile /home/mdinh/ora_stage/11.2.0.3/patchset/database/response/swonly.rsp
exit

Execute as Root:

/u01/app/oracle/product/11.2.0.3/dbhome_1/root.sh -bindir /opt/oracle/bin
Check /u01/app/oracle/product/11.2.0.3/dbhome_1/install/root_<hostname>_2011-10-26_11-33-40.log

Creating database using Oracle Managed Files (OMF)

I have not been able to figure out why the directory for the database files  is created in UPPERCASE.

Hence, the pre-created directory will need to be in UPPERCASE as well.

Create directories:

mkdir -p /u01/app/oracle/admin/DEVDB01/adump
mkdir -p /oracle/oradata/DEVDB01/arch/

Create init.ora:

> cat initdevdb01.ora
audit_file_dest='/u01/app/oracle/admin/DEVDB01/adump'
audit_sys_operations=FALSE
audit_trail=NONE
compatible=11.2.0.3
control_files='/oracle/oradata/DEVDB01/control01.dbf','/oracle/oradata/DEVDB01/control02.dbf'
db_block_size=8192
db_create_file_dest='/oracle/oradata'
db_create_online_log_dest_1='/oracle/oradata'
db_create_online_log_dest_2='/oracle/oradata'
db_name=devdb01
diagnostic_dest='/u01/app/oracle'
fast_start_mttr_target=300
job_queue_processes=20
log_archive_dest_1='LOCATION=/oracle/oradata/DEVDB01/arch'
log_archive_format='arc_%d_%t_%r_%s.dbf'
open_cursors=1000
pga_aggregate_target=1G
processes=200
remote_login_passwordfile=EXCLUSIVE
sec_case_sensitive_logon=FALSE
session_cached_cursors=500
sga_max_size=2G
sga_target=2G
timed_statistics=TRUE
undo_management=AUTO
undo_retention=60000
undo_tablespace=undotbs1
workarea_size_policy=AUTO

Create database:

startup nomount;
create database
maxlogfiles 8
maxlogmembers 4
maxdatafiles 1024
character set AL32UTF8
national character set AL16UTF16
logfile group 1 size 256M,group 2 size 256M,group 3 size 256M,group 4 size 256M
default temporary tablespace temp tempfile size 1024M
undo tablespace undotbs1 datafile size 1024M;

@?/rdbms/admin/catalog.sql;
@?/rdbms/admin/catproc.sql;
@?/rdbms/admin/catblock.sql;
@?/rdbms/admin/catoctk.sql;
@?/rdbms/admin/catio.sql
@?/rdbms/admin/dbmsiotc.sql
@?/rdbms/admin/dbmsotrc.sql
@?/rdbms/admin/dbmspool.sql
@?/rdbms/admin/userlock.sql

shutdown immediate;
startup mount;
alter database archivelog;
alter database open;
conn system
@?/sqlplus/admin/pupbld.sql

Create and Set DEFAULT tablespace:

CREATE TABLESPACE user_data DATAFILE SIZE 256M AUTOEXTEND ON NEXT 256M MAXSIZE 8G;
ALTER DATABASE DEFAULT TABLESPACE user_data;

COLUMN property_name FORMAT A30
COLUMN property_value FORMAT A30
COLUMN description FORMAT A50
SET LINESIZE 200
SELECT * FROM database_properties WHERE property_name like '%TABLESPACE';

SQL> SELECT * FROM database_properties WHERE property_name like '%TABLESPACE';

PROPERTY_NAME                  PROPERTY_VALUE                 DESCRIPTION
------------------------------ ------------------------------ --------------------------------------------------
DEFAULT_TEMP_TABLESPACE        TEMP                           Name of default temporary tablespace
DEFAULT_PERMANENT_TABLESPACE   USER_DATA                      Name of default permanent tablespace

Directory Structures:

> ls -l /oracle/oradata/DEVDB01/
total 68432
drwxr-xr-x   2 oracle   dba         1024 Oct 27 09:03 arch
-rw-r-----   1 oracle   dba      17481728 Oct 27 18:57 control01.dbf
-rw-r-----   1 oracle   dba      17481728 Oct 27 18:57 control02.dbf
drwxr-x---   2 oracle   dba         1024 Oct 27 09:42 datafile
drwxr-x---   2 oracle   dba         1024 Oct 26 13:41 onlinelog
About these ads

Leave a Comment »

No comments yet.

RSS feed for comments on this post. TrackBack URI

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

The Rubric Theme. Create a free website or blog at WordPress.com.

Follow

Get every new post delivered to your Inbox.

Join 300 other followers

%d bloggers like this: