0% found this document useful (0 votes)
126 views13 pages

HPI DB Creation 12c

This document provides instructions for creating an Oracle 12c database. It outlines prerequisites like verifying the code tree, file systems, and environment. It then describes steps to create the database, configure post-creation settings, and set up monitoring and backups.

Uploaded by

Vinu3012
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
126 views13 pages

HPI DB Creation 12c

This document provides instructions for creating an Oracle 12c database. It outlines prerequisites like verifying the code tree, file systems, and environment. It then describes steps to create the database, configure post-creation settings, and set up monitoring and backups.

Uploaded by

Vinu3012
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 13

HPI DB Creation 12c

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/12.1.0.1.2
Requires IQOQ: [YES for Prod or Formal Test, else NO]
1. Publication Records ........................................................................................................................... 2
2. Oracle Database Creation Procedures .............................................................................................. 3
2.1. Creation Prerequisites ............................................................................................................................3
2.1.1. Code Tree Verification ...........................................................................................................................3
2.1.2. File System Verification..........................................................................................................................3
2.1.3. Environment Verification.......................................................................................................................3
2.2. Create 12.1.0.1.2 Database .....................................................................................................................5
2.3. Post Database Creation Steps ................................................................................................................6
2.4. Names Resolution ....................................................................................................................................8
2.5. Setup of Enterprise Manager Monitoring and Backups .....................................................................8
3. Attachments ...................................................................................................................................... 10
3.1. listener.ora .............................................................................................................................................10
3.2. tnsnames.ora (Local) .............................................................................................................................10
3.3. tnsnames.ora (Global ONLY) and OID ..............................................................................................11
3.4. sqlnet.ora................................................................................................................................................11
3.5. ldap.ora ..................................................................................................................................................11
3.6. Database Parameters ............................................................................................................................12

1
1. Publication Records

Rev. # Reason Date (dd-Mmm-


yyyy)
1.0 First Draft: Copied from Linux 11g db creation document – P.Scotto 01-Apr-2014
1.0 Added set of LD_LIBRARY_PATH before create script – P.Scotto 01-Apr-2014
1.0 Removed block change tracking file create which is incorporated in the 01-Apr-2014
create script. – P.Scotto
1.0 Updated check for 12c OEM – P.Scotto 24-Oct-2014
1.0 Modified name of link from “EM10g …” to just “EM …” – P.Scotto 24-Oct-2014

2
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/12.1.0.1.2

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.

2.1.3. Environment Verification

Step Activity Expected Results

3
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 12c agent processes running under oraepm


> ps -fu oraepm|grep agent like:
/opt/oracle/oraepm/agent/core/12.1.0.3.0/perl
Check for 12c agent /bin/perl
If emagent is not available then send an e-mail to
Prasanna Bekal to install the agent.

Note: It is acceptable to have both 10g and 12c agents


running.

2.1.3.3 Check if /etc/oratab contains the line: Line present in /etc/oratab as specified.

[SID]:/opt/oracle/ormerck/product/12.1.0.1.2: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

4
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 .
ln -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 Parameter added to listener.ora
the 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 12.1.0.1.2 Database

Step Activity Expected Results


2.2.1 Logon to [Server_name] as ormerck User ormerck logged on.

5
Step Activity Expected Results
2.2.2 Change directory to Directory changed
/opt/oracle/ormerck/admin/[SID]/create
2.2.3 Copy all of the DB creation scripts from the Oracle Tar-file copied
Software Depot:
Be sure to use the correct database version directory!

sftp ormerck@dbadepot

cd /opt/oracle/install/script_depot/Create_DB_UNIX
cd 12101  Use correct version
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 cr12101db


2.2.6 Start the database creation: Database creation started

export LD_LIBRARY_PATH=$ORACLE_HOME/lib

./cr12101db -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 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.3 For SOX databases only: Permissions changed.
sqlplus "/ as sysdba"

@ss_soxdb_users.sql
2.3.4 Create standard Client-facing DBA account CF DBA account created with grants.
sqlplus "/ as sysdba"

@cfdba.sql

Exit sqlplus once script finishes executing

6
Step Activity Expected Results
2.3.5 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***
Starting with version 11.2.0.4
 Parameter audit_trail = DB
 AUD$ and FGA_LOG$ tables SHOULD
BE in SYSTEM tablespace
 PURGE_AUDIT_DATA_PROC
procedure should be installed in
DBAUDIT schema.
 Job should be scheduled to execute
PURGE_AUDIT_DATA_PROC by
DBAUDIT.
 set recyclebin parameter to OFF
by default
2.3.6 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.7 Change startup database flag in /etc/oratab to "Y" : Oratab changed
[SID]:/opt/oracle/ormerck/product/12.1.0.1.2:Y
2.3.8 Change directory to /opt/oracle/ormerck/admin/network Directory changed

2.3.9 Verify the file usesqlnet.ctl exists and its permissions are File verified
set to 744
2.3.10 Verify the following line exists in the usesqlnet.ctl, or Entry verified
add it if the listener was newly created :

ormerck_listener
2.3.11 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.12 DB Integrity and Functional Tests: Content verified


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

7
Step Activity Expected Results
2.3.13 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.14 Update the REMEDY CMDB Asset management SOP performed.
Include the following information:
□ Database Creation Note: Cloud hosted databases should have
□ Instance name ([SID]) “Amazon EC2” in the “Mnaufacturer” field.
□ Server name ([Server_name])
□ Database owner (ormerck)
□ Date of database creation
□ New Version (12.1.0.1.2)
□ NLS Characterset (AL32UTF8)
□ Division:
([AP,CORP,CHC,EMEA,MAH,MFC,MMD,M
RL,HH])
□ Regulatory Indicator (should not be empty)
□ Relate the database to the Application System
CI
Remedy CMDB Updates for Oracle
2.3.15 Execute Database Quality Gate / IQOQ against the newly 1) Reports saved to Teamsite folder
created 12c database [SID]. Refer to the below instructions 2) Email sent to Database Service Management

Database IQOQ - Executing.doc

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

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

EM Migration Scenarios.doc

9
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/12.1.0.1.2)
(ENVS = "LD_LIBRARY_PATH=/opt/oracle/ormerck/product/12.1.0.1.2/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

10
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

11
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 2000
{DF1}/system_[SID]_01.dbf SYSTEM 1500
{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

12

You might also like