You are on page 1of 14

HPI DB Creation 11g

DIVISION: [AP,CORP,CHC,EMEA,MAH,MFC,MMD,MRL,HH]
Oracle SID: [SID]
Server Name: [Server_name] (ITANIUM)
Oracle UNIX Owner : ormerck
Oracle UNIX Group : dbmerck
Oracle Home : /opt/oracle/ormerck/product/11.2.0.3.5
Requires IQOQ: [YES for Prod or Formal Test, else NO]

NOTE: Beginning with Version 11.2.0.2 the Oracle Home version


includes the PSU # in the 5th position. If using this document for
an earlier version of 11g, you may have to edit the Oracle Home
names or use an earlier version of this document.
NOTE: Beginning with Version 11.2.0.2 the Oracle Home version includes the PSU # in the 5th
position. If using this document for an earlier version of 11g, you may have to edit the Oracle Home
names or use an earlier version of this document.....................................................................................0
1. Publication Records............................................................................................................................2
2. Oracle Database Creation Procedures..............................................................................................4
2.1. Creation Prerequisites..........................................................................................................................4
2.1.1. Code Tree Verification..........................................................................................................................4
2.1.2. File System Verification........................................................................................................................4
2.1.3. Environment Verification.....................................................................................................................5
2.2. Create 11.2.0.3.5 Database....................................................................................................................6
2.3. Post Database Creation Steps...............................................................................................................7
2.4. Names Resolution..................................................................................................................................9
2.5. Setup of Enterprise Manager Monitoring and Backups....................................................................9
2.6. Asset Management..............................................................................................................................10
3. Attachments......................................................................................................................................11
3.1. listener.ora...........................................................................................................................................11
3.2. tnsnames.ora (Local)...........................................................................................................................11
3.3. tnsnames.ora (Global ONLY) and OID.............................................................................................12
3.4. sqlnet.ora..............................................................................................................................................12
3.5. ldap.ora................................................................................................................................................12
3.6. Database Parameters..........................................................................................................................13

1
1. Publication Records

Rev. # Reason Date (dd-Mmm-


yyyy)
1.0 First Draft: Copied from Linux 11g db creation document – P.Scotto 05-Mar-2010
1.0 Changed Linux to UNIX in software depot for FTP – P. Scotto 05-Mar-2010
1.0 Added step to grant execute on create script (chmod) – P.Scotto 09-Mar-2010
1.0 Clarified changes to /etc/oratab in post createion steps – P.Scotto 09-Mar-2010
1.1 Set domain name in listener to upper case (MERCK) – P.Scotto 14-Apr-2010
1.2 Removed domain from tnsnames entry name (.merck) – P.Scotto 14-Apr-2010
1.3 Removed EM information as it is not required with new version – P. Bekal 16-Nov-2010
1.4 Workaround for Bug 7232946 (11g R1 Only) included – P.Scotto 25-Jan-2011
2.0 Made 11.2.0.2 PSU 1 the default version – P.Scotto 21-Feb-2011
2.0 Added Oracle PSU to version (5th Position) – P.Scotto 21-Feb-2011
2.0 Corrected instruction for creating network files – P.Scotto 21-Feb-2011
2.0 Added Note to title page RE: Oracle Home Versions – P.Scotto 21-Feb-2011
2.1 Added dparms.sql post-creation configuration snapshot – P.Scotto 01-Mar-2011
2.2 Added Division – P. Bekal 8-Mar-2011
2.3 Added ENVS parameter to listener.ora to resolve issues with backward 15-Apr-2011
compatability – P.Scotto
2.4 Added step to check for/request a DNS alias for the database – P.Scotto 19-Apr-2011
2.4 Added instruction to review the post-creation script and resolve issues – 19-Apr-2011
P.Scotto
2.5 Added section 2.4 Names Resolution. Re-numbered subsequet sections 19-Jul-2011
– P.Scotto
2.5 Added Division parameter to tnsnames request description – P.Scotto 19-Jul-2011
2.5 Added formatted entry to tnsnames request description – P.Scotto 19-Jul-2011
2.6 Changed references to Merckury to Remedy Work Orders – P.Scotto 02-Nov-2011
2.6 Added Division parameter to CMDB request description – P.Scotto 02-Nov-2011
2.7 Added SYSAUX and AUDIT_DATA to Database Parameters attachment 11-Jan-2012
(for reverence only) – P.Scotto
2.7 Added Quality Gate and IQOQ steps to Post Database Creation section – 11-Jan-2012
P.Scotto
2.8 Added check for EM Agent 12-Jan-2012
2.9 Moved step for password function ahead of modifying users 24-Jan-2012
3.0 Made 11.2.0.3 PSU 1 the default version – P.Scotto 15-Feb-2012
3.0 Replaced ftp with sftp – P.Scotto 15-Feb-2012
3.0 Removed NUMA parameters and password function which are now 15-Feb-2012
imbedded in the create scripts – P.Scotto
3.0 Fixed typo (extra space) in post install password scripts – P.Scotto 15-Feb-2012
3.1 Added NOTE to check for Purge of Audit script & set Recycle bin to OFF - 29-Feb-2012
2.3.6 – S. Romano
2
Rev. # Reason Date (dd-Mmm-
yyyy)
3.2 Removed tnsnames Remedy Work Order creation for tnsnames 12-Jul-2012
3.3 Removed PASSWORD_<owner>_listener=<password> - P Bekal 27-Aug-2012
3.4 Added SECURE_REGISTER_ormerck_listener = (IPC) – P. Bekal 27-Aug-2012
3.5 Added chmod to grant permissions to dbmerck on admin subdirectories 26-Oct-2012
so that oraepm can remove trace files. – P.Scotto
3.6 Made 11.2.0.3 PSU 5 the default version – P.Scotto 10-May-2013
3.7 Renamed document – P. Bekal 28-May-2013

3
2. Oracle Database Creation Procedures
2.1. Creation Prerequisites

2.1.1. Code Tree Verification

Step Activity Expected Results


2.1.1.1 Review the "Publication Record" at the beginning of this Changes reviewed
document for recent changes.

2.1.1.2 Account ormerck exists on [Server_name] UNIX Account Exists


2.1.1.3 Code tree exists: Oracle Code Tree exists

/opt/oracle/ormerck/product/11.2.0.3.5

2.1.2. File System Verification

Step Activity Expected Results


2.1.2.1 Start a UNIX session and login to server [Server_name] Connected to server as ormerck
as ormerck

2.1.2.2 Verify the following file systems for the data files: (the File systems verified.
number of file systems depends on the size of the
database) exists

/ormerck/dataxxx/oradata/[SID]
([Size in GB] GB)

If the database will run in archive mode :

/ormerck/arch001/oradata/[SID]
([Size in GB] GB)

Verify by using bdf|grep [SID]

2.1.2.3 For all the filesystems created here, make sure the File System ownership verified.
ownership is ormerck and the group to dbmerck.

If any file systems are owned by "root" you will need to


get a UNIX System Administrator to change the
ownership.

4
2.1.3. Environment Verification

Step Activity Expected Results


2.1.3.1 If no DNS alias called [SID] exists open a Remedy Work DNS alias exists or is requested
Order to create a DNS alias for the new database server
and assign it to the with
"ACCESS_ADMINISTRATION/INF_DATA" support
organization/group.

Check for existing database DNS alias

> nslookup [SID]

Remedy Work Order Notes:


"Please create a DNS alias called [SID] for
[Server_name].merck.com"

2.1.3.2 Check EM Agent /


> ps –fu oraepm|grep emagent opt/oracle/oraepm/product/agent10g/bin/ema
gent
If emagent is not available then send an e-mail to
Prasanna Bekal to install the agent.
2.1.3.3 Check if /etc/oratab contains the line: Line present in /etc/oratab as specified.

[SID]:/opt/oracle/ormerck/product/11.2.0.3.5:N.

If not add or change the line.


2.1.3.4 cd /opt/oracle/ormerck Directories verified or created.

Verify if the directories ./admin/network exist. If not


create them with following command:

mkdir –p admin/network
2.1.3.5 Change the environment to [SID] by running: Environment set and directory changed.

. oraenv

and change directory to

/opt/oracle/ormerck/admin/network

5
Step Activity Expected Results
2.1.3.6 If this is the first database for the user ormerck, Files and links are created

Create the files listener.ora, sqlnet.ora and ldap.ora using or


attachments in the ATTACHMENTS.
N/A
AND

cd ${ORACLE_HOME}/network/admin

Create symbolic links for these files:

ln –s /opt/oracle/ormerck/admin/network/listener.ora .

ln –s /opt/oracle/ormerck/admin/network/tnsnames.ora .

ln –s /opt/oracle/ormerck/admin/network/sqlnet.ora .

lns –s /opt/oracle/ormerck/admin/network/ldap.ora .
2.1.3.7 If this is not the first database for ormerck, add to the New DB entry added to listener.ora
listener.ora the new database being created and leave
sqlnet.ora as is. or

N/A
2.1.3.8 If there are other 11g databases in the listener.ora, add the Parameter added to listener.ora
ENVS parameter to each SID_DESC for an 11g database.

(ENVS =
"LD_LIBRARY_PATH=<ORACLE_HOME>/lib")

Note: The <ORACLE_HOME> should be the full path


name for the database specified in the SID_DESC. This
may be different than the new database.

2.1.3.9 If this is the first database for ormerck, start the listener Listener starts and tnsping returns OK
by issuing:
or
lsnrctl start ormerck_listener
N/A
tnsping [SID]
2.1.3.10 If this is not the first database for ormerck, test the Listener reloads and tnsping returns OK
listener by issuing:
or
lsnrctl reload ormerck_listener
N/A
tnsping [SID]
2.1.3.11 cd $ORACLE_BASE/admin Directory [SID] created successfully.

mkdir –p [SID]/create

2.2. Create 11.2.0.3.5 Database

6
Step Activity Expected Results
2.2.1 Logon to [Server_name] as ormerck User ormerck logged on.
2.2.2 Change directory to Directory changed
/opt/oracle/ormerck/admin/[SID]/create
2.2.3 Copy the tar file containing all the DB creation scripts Tar-file copied
from the Oracle Depot :

sftp ormerck@dbadepot

cd /opt/oracle/install/script_depot/Create_DB_UNIX
cd 11203
mget *
bye
2.2.4 Verify that the CreateDB.conf file entries correspond to CreateDB.conf modified to match
Database Parameter values in the APPENDIX and adjust environment settings/requirements
where appropriate.
Specify ARCHIVELOG=TRUE if the database should
have archive logging enabled
2.2.5 Grant execute permission on create script Create script is executable

chmod 744 cr11203db


2.2.6 Start the database creation: Database creation started

./cr11203db -p CreateDB.conf

2.3. Post Database Creation Steps


Step Activity Expected Results
2.3.1 Logon to [Server_name] as ormerck User ormerck logged on.
2.3.2 Enable Block Change Tracking for incremental backups: bctf_[SID].ora file created

sqlplus "/ as sysdba"

alter database enable block change tracking using file


'/opt/oracle/ormerck/product/11.2.0.3.
5/dbs/bctf_[SID].ora';
2.3.3 Change directory to Passwords/permissions changed.
/opt/oracle/ormerck/admin/[SID]/create

Then create/alter the standard database users


passwords/permissions:
sqlplus "/ as sysdba"

@ss_newdb_users.sql
2.3.4 For SOX databases only: Permissions changed.
sqlplus "/ as sysdba"

@ss_soxdb_users.sql

7
Step Activity Expected Results
2.3.5 Create standard Client-facing DBA account CF DBA account created with grants.
sqlplus "/ as sysdba"

@cfdba.sql

Exit sqlplus once script finishes executing

2.3.6 Run the post-creation configuration snapshot script. Date stamped output file listing database
configuration and parameters created.
sqlplus "/ as sysdba"
@dbparms.sql ***NOTE *** FOR AUDITING
Parameter audit_trail should be set to DB
AUD$ and FGA_LOG$ tables should NOT
be in SYSTEM tablespace
PURGE_AUDIT_DATA_PROC proceedure
should be installed
Job should be scheduled to execute
PURGE_AUDIT_DATA_PROC
set recyclebin parameter to OFF by
default
2.3.7 Review the log file from the post-creation snapshot and Issues resolved
resolve any issues.

> view parms_[SID]_<DDMONYYYY>.lis

If any issues are resolved, rerun the previous step.


2.3.8 Change startup database flag in /etc/oratab to "Y" : Oratab changed
[SID]:/opt/oracle/ormerck/product/11.2.0.3.5:Y
2.3.9 Change directory to /opt/oracle/ormerck/admin/network Directory changed
2.3.10 Verify the file usesqlnet.ctl exists and its permissions are File verified
set to 744
2.3.11 Verify the following line exists in the usesqlnet.ctl, or Entry verified
add it if the listener was newly created :

ormerck_listener
2.3.12 Grant permissions to dbmerck so that trace files can be Group permissions granted
removed via oraepm:

chmod -R g+rwx /opt/oracle/ormerck/admin/*

2.3.13 DB Integrity and Functional Tests: Content verified


Change directory to
/opt/oracle/ormerck/admin/[SID]/create/log
Verify the content of files:
1) cr11203db_[SID]_log_functionality.txt
2) cr11203db_[SID]_ test_integrity.txt

8
Step Activity Expected Results
2.3.14 If any errors are identified in step 15, investigate the Content verified
errors that are returned and take necessary actions to
correct the error (if possible).
If no solution is found to correct the error, contact Oracle
Support and log a case with them.

If any rows appear in the selection, try to compile the


invalid object(s) by executing:
alter <object_type> sys.<object_name> compile;
If any object does not compile correctly, manual
investigation needs to be done, and eventually logging a
case with Oracle Support will be necessary.
2.3.15 Execute Database Quality Gate against the newly created 11g 1) Reports saved to Teamsite folder
database [SID]. Refer to the below instructions 2) Email sent to Database Platform Engineering

Executing the Database Quality Gate Verification

2.3.16 IQOQ Required: [YES for Prod or Formal Test, 1) IQOQ document saved to Teamsite folder
2) Email sent to Database Platform Enginering
else NO]
If the SDLC classification of the database requires an IQOQ to
be generated, refer to the knowledge article for instructions.

Follow instructions for "---TESTER---"


Database IQOQ-KM

2.4. Names Resolution


Step Activity Expected Results
2.4.1 Create tnsnames and OID entries as per WI . Tnsnames and OID updated

Include the following information:


□ Instance name ([SID])
□ Server name ([Server_name])
□ Port (25881)
□ Division:
([AP,CORP,CHC,EMEA,MAH,MFC,MMD,M
RL,HH])
□ Formatted entry from Attachment 3.3

2.5. Setup of Enterprise Manager Monitoring and Backups


Step Activity Expected Results
2.4.2 Refer to EM10g SOP for the setup of monitoring and backups Monitoring and Backup SOP performed

EM10g Migration Scenarios.doc

9
2.6. Asset Management

Step Activity Expected Results


2.6.1 Open a Remedy Work Order to update REMEDY CMDB Asset management SOP performed
and assign it to the
"INFRASTRCTURE/DATABASE_SERVICES" support
organization/group.

Include the following information:


□ Database Creation
□ Instance name ([SID])
□ Server name ([Server_name])
□ Database owner (ormerck)
□ Date of database creation
□ New Version (11.2.0.3.5)
□ NLS Characterset (AL32UTF8)
□ Division:
([AP,CORP,CHC,EMEA,MAH,MFC,MMD,M
RL,HH])

10
3. Attachments
3.1. listener.ora

ormerck_listener=
(ADDRESS_LIST=
(ADDRESS=
(PROTOCOL=IPC)
(KEY=[SID]))
(ADDRESS=
(PROTOCOL=TCP)
(HOST=[Server_name])
(PORT=25881))
)
SID_LIST_ormerck_listener=
(SID_LIST=
(SID_DESC=
(GLOBAL_DBNAME= [SID].MERCK)
(ORACLE_HOME=/opt/oracle/ormerck/product/11.2.0.3.5)
(ENVS = "LD_LIBRARY_PATH=/opt/oracle/ormerck/product/11.2.0.3.5/lib")
(SID_NAME=[SID])
)
)

SECURE_REGISTER_ormerck_listener = (IPC)

3.2. tnsnames.ora (Local)

IFILE=/usr/local/bin/oracletns/tnsnames.ora
IFILE=/usr/local/bin/tnsnames_USHH.ora
IFILE=/usr/local/bin/tnsnames_MMD.ora

11
3.3. tnsnames.ora (Global ONLY) and OID

[SID] =
(DESCRIPTION=
(ADDRESS_LIST=
(ADDRESS=
(PROTOCOL=TCP)
(HOST=[Server_name])
(PORT=25881)
)
)
(CONNECT_DATA=
(SID=[SID])
)
)

3.4. sqlnet.ora

NAMES.DIRECTORY_PATH = (TNSNAMES, LDAP)


sqlnet.inbound_connect_timeout = 0
SQLNET.EXPIRE_TIME=10

3.5. ldap.ora

1) CTC/WHS based server:


DIRECTORY_SERVERS=(onruppr1.merck.com:389:636,onreppr1.merck.com:389:636,onrappr1.merck.com:389:636)
DEFAULT_ADMIN_CONTEXT = "dc=merck,dc=com"
DIRECTORY_SERVER_TYPE = OID

2) Brussels based server:


DIRECTORY_SERVERS=(onreppr1.merck.com:389:636,onruppr1.merck.com:389:636,onrappr1.merck.com:389:636)
DEFAULT_ADMIN_CONTEXT = "dc=merck,dc=com"
DIRECTORY_SERVER_TYPE = OID

3) Asia Pacific based server:


DIRECTORY_SERVERS=(onrappr1.merck.com:389:636,onreppr1.merck.com:389:636,onruppr1.merck.com:389:636)
DEFAULT_ADMIN_CONTEXT = "dc=merck,dc=com"
DIRECTORY_SERVER_TYPE = OID

12
3.6. Database Parameters

File Location Variables Value


/ormerck/data001/oradata/[SID]/ {DF1}
/ormerck/data002/oradata/[SID]/ {DF2}
/ormerck/arch001/oradata/[SID]/ {AF1}

Options Yes/No Associated tablespace


Oracle Data Mining No SYSAUX
Oracle Text No SYSAUX
Oracle OLAP No SYSAUX
Oracle Spatial No SYSAUX
Oracle Ultra Search No SYSAUX
Oracle Label Security No SYSTEM
Example Schemas No SYSAUX
Enterprise Manager Repository No SYSAUX

Character Sets Value


Database Character Set AL32UTF8
National Character Set AL16UTF16

TABLESPACE TABLE
Segment Space Extent Allocation Uniform
Tablespace Name Type
Management Management Type Size
AUDIT_DATA Permanent Auto Local Autoallocate
SYSAUX Permanent Auto Local Autoallocate
SYSTEM Permanent Auto Local Autoallocate
TEMP Temporary Auto Local Autoallocate
TOOLS Permanent Auto Local Autoallocate
USERS Permanent Auto Local Autoallocate
UNDOTBS1 Undo Auto Local Autoallocate

DATAFILES TABLE
Tablespace
Datafile Name Size (M)
Name
{DF2}/audit_data_[SID]_01.dbf AUDIT_DATA 1000
{DF1}/sysaux_[SID]_01.dbf SYSAUX 1000
{DF1}/system_[SID]_01.dbf SYSTEM 750
{DF1}/temp_[SID]_01.dbf TEMP 2000
{DF2}/users_[SID]_01.dbf USERS 100
{DF2}/undotbs1_[SID]_01.dbf UNDOTBS1 1000

REDO LOGS TABLE


Redo File Name Redo File Path Group Member Size (M)
redo[SID]_1_1.rdo {FS1} 1 1 100
redo[SID]_2_1.rdo {FS2} 2 1 100
redo[SID]_3_1.rdo {FS1} 3 1 100

13

You might also like