Documenti di Didattica
Documenti di Professioni
Documenti di Cultura
08-Jan-2014 Paul Scotto 3.0 Copied from 11g. Updated for 12c.
28-Mar-2014 Paul Scotto 3.0 Updated for 12.1.0.1:
- Changed ftp to sftp
- Added comments to highlight using correct script
versions
- Removed step to create password function since it is done
in the scripts
- Removed reference to opening a Remedy case for asset
management.
- Added custom variables for version numbers
04-Feb-2015 Paul Scotto 3.0 - Added check for OEM 12c agent
- Modified reverences fro EM10g to EM
- Removed Appendix B - Disk Backup configuration
This document describes the creation of an Oracle 12.1.0.x.x database using Oracle Managed
Files and Oracle ASM.
9 LINUX account <Oracle owner e.g. ormerck>, group <Unix Group e.g. dbmerck> must exist.
9 Oracle Software needs to be installed for user <Oracle owner e.g. ormerck>.
9 Oracle ASM instance available and Disk groups DG1 and FRA1 mounted
1.
Start an ssh session and login to server as User <Oracle owner
[Oracle_Owner i.e. ormerck] e.g. ormerck> logged
on.
2. Change the environment to +ASM by running: Environment set
. oraenv
4. Verify that DG1 and FRA1 disk groups exist and are Disk groups verified.
mounted using script in Appendix A.
5. Verify that there is sufficient free space available Sufficient free space
using script in Appendix A. available.
1.
Check EM Agent 12c agent processes
> ps -fu oraepm|grep agent running under oraepm
like:
Check for 12c agent /opt/oracle/oraepm/agen
If emagent is not available then send an e-mail to t/core/12.1.0.3.0/perl/bi
Prasanna Bekal to install the agent. n/perl
2.
Add the following line to /etc/oratab: Line added to
/etc/oratab as
<SID>:/opt/oracle/<Oracle owner e.g. specified.
ormerck>/product/ <Oracle Version>:N.
3.
Change the environment to +ASM by running:
. oraenv
4.
Add the new database being created to the New DB entry added
listener.ora. to listener.ora
Ex:
1.
Change the environment to <SID> by running: Environment set
. oraenv
2.
cd $ORACLE_BASE/admin Directory <SID> created
successfully.
mkdir -p $ORACLE_SID/create
3. Change directory to /opt/oracle/<Oracle owner e.g. Directory changed
ormerck>/admin/<Oracle Instance>/create
4. Copy the DB creation scripts from the Oracle Depot. Please note the Scripts copied
directory name is based on the Oracle DB version. Make sure to
download the correct version!
sftp ormerck@dbadepot
cd /opt/oracle/install/script_depot/Create_DB_Linux
cd 12101_ASM Use correct version
mget *
bye
chmod 700 *
5.
Verify that the CreateDB.conf file entries correspond to Database CreateDB.conf modified to
Parameter values in APPENDIX A and modify if necessary. match environment
settings/requirements
Validate version and PSU
6.
Start the database creation: Database creation started
export PATH=$ORACLE_HOME/perl/bin/:$PATH
Make sure to use the correct version!
Ex:
./cr12101db_asm -p CreateDB.conf
8.
Verify all log files for unexpected errors Log files verified
9.
Create SPFILE from PFILE SPFILE created successfully
10.
Source the ASM $OH, and execute asmcmd from the command line File name captured
and then navigate to the
+DG1/$ORACLE_SID/PARAMETERFILE directory and capture
the spfile.%.% filename
Ex:
cd +DG1/TESTDB01/PARAMETERFILE
ls -l sp*
11.
Next create an ASM alias pointing to the SPFILE in step 1) as Create ASM alias for spfile
follows:
cd +DG1/$ORACLE_SID
mkalias +DG1/$ORACLE_SID/PARAMETERFILE/spfile.%. %
spfile$ORACLE_SID.ora
Example:
cd +DG1/TESTDB01
mkalias
+DG1/TESTDB01/PARAMETERFILE/spfile.269.731254989
spfileTESTDB01.ora
12.
Source the $ORACLE_SID $ORACLE_HOME Proper environment sourced
.oraenv $ORACLE_SID
echo
"SPFILE=+DG1/${ORACLE_SID}/spfile${ORACLE_SID}.ora" >
init${ORACLE_SID}.ora
14.
Shutdown and restart database, so that the spfile is used Database restarted and spfile
parameter is used
sqlplus "/ as sysdba"
shutdown immediate
startup
15.
Enable Block Change Tracking (if not already enabled): Block Change Tracking
enabled.
select * from v$block_change_tracking;
alter database enable block change tracking using file '+DG1';
@ss_newdb_users.sql
2.
For SOX databases only: Permissions changed.
sqlplus "/ as sysdba"
@ ss_soxdb_users.sql
3.
Create standard Client-facing DBA account CF DBA account created
sqlplus "/ as sysdba" with grants.
@cfdba.sql
1.
Source the ASM $OH and then register service as follows: replace all Database Registered with
occurrences of <SID> with proper $ORACLE_SID: Oracle Restart
2.
Verify configuration: Configuration Verified.
sqlplus “/ as sysdba”
shutdown immediate
4.
Start database using CRS: Database started
successfully using CRS.
srvctl start database -d ${ORACLE_SID}
1.
Execute db Quality Gate verification against newly created database as per Work Quality Gate
Instructions: executed
http://webview.merck.com:80/webview/drl.html?objectId=090030f980dc141a
2.
Rectify verification items which have a 'FAIL' status. If the verifications fails due to Verification
an exception, document the item # and the reason (for exemption). Completed.
3.
Complete IQ/OQ as per instructions in step 4 if the newly created database is: Perform
1) A production database IQ/OQ in
2) A Formal Test database (Validated environments only) step 4 if
necessary
4.
If required, complete IQ/OQ following the following documents: Complete
IQ/OQ as per
Database IQOQ-KM KM
http://webview.merck.com:80/webview/drl.html?objectId=090030f980dc1419
and
ITSOP-0006.002_DB_SERVICES_Instance-Based_IQOQ_Template
http://webview.merck.com:80/webview/drl.html?objectId=090030f980dc141b
1.
Refer to EM SOP for the setup of monitoring and Monitoring and
backups Backup SOP
performed
EM Migration Scenarios.doc
See details below
1.
Add the new database asset to REMEDY: Asset management
updated
Include the following information:
□ Instance name
□ Server name
□ Database owner
□ Date of creation
□ Oracle Version
□ NLS Characterset
□ Relate to Oracle Code Tree
□ Relate to Application System
SELECT group_number,
name,
type
FROM v$asm_diskgroup
ORDER by 1,2;
• Database Parameters
TABLESPACE TABLE
Segment Space Extent Allocation Uniform
Tablespace Name Type
Management Management Type Size
AUDIT_DATA Permanent Auto Local Autoallocate
SYSTEM Permanent Auto Local Autoallocate
SYSAUX 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
{+DG1}/<SID>/DATAFILES/audit_data_%.dbf AUDIT_DATA 1000
{+DG1}/<SID>/DATAFILES/system_%.dbf SYSTEM 1500
{+DG1}/<SID>/DATAFILES//sysaux_%.dbf SYSAUX 2000
{+DG1}/<SID>/DATAFILES/temp_%1.dbf TEMP 1000
{+DG1}/<SID>/DATAFILES/tools_%1.dbf TOOLS 100
{+DG1}/<SID>/DATAFILES/users_%1.dbf USERS 100
{+DG1}/<SID>/DATAFILES/undotbs1_%1.dbf UNDOTBS1 1000
• CreateDB.conf Parameters
######################################################################################
# Name: CreateDB.conf
# Version: 1.0
# Author: P.Scotto
# Date: 02/Dec/2013
# Description: Configuration Variables/Settings for 12.1
# Dependencies: None
# Parameters: N/A
#
# Revisions:
#
# Ver Date Author Description
# --------- ---------- --------------- -----------------------
# 1.0 02/Dec/2013 P.Scotto 1. created file
# 1.0 06/Jan/2014 P.Scotto 1. Made PLUGGABLE default "NO"
# 1.0 03/Mar/2014 P.Scotto 1. Made default version 12.1.0.1.2
#
#######################################################################################
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# Environment Settings:
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
export PLUGGABLE="NO"
#export PLUGGABLE="YES"
export ORACLE_USER="`id -un`"
export ORACLE_SID="${ORACLE_SID}"
export ORACLE_BASE="/opt/oracle/${ORACLE_USER}"
export ORACLE_VER="12.1.0.1"
# PSU0: Nov 2013
# PSU2: Jan 2014
export ORACLE_PSU="2"
export ORACLE_HOME="${ORACLE_BASE}/product/${ORACLE_VER}.${ORACLE_PSU}"
export PERL5LIB=${ORACLE_HOME}/rdbms/admin:${PERL5LIB}
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# Physical Database Settings:
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# Create DB Parameters:
export MAXDF="1024"
export MAXINST="8"
export MAXLF="100"
export MAXLM="2"
export MAXLH="1800"
WI – Linux Database Creation Process 11.2.0.x.x on Oracle ASM 20
# Tablespace Sizes:
export SIZEAUX="2000M"
export SIZESYS="1500M"
export SIZEUNDO="1000M"
export SIZETEMP="1000M"
export SIZEUSERS="100M"
export SIZETOOLS="100M"
export SIZEAUDIT="1000M"
# SYS/SYSTEM Password
export DBPWD="manager"
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# Init.ora Settings:
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
export memory_target="1520M"
export compatible="12.1.0"
export db_block_size="8192"
export db_file_multiblock_read_count="16"
export db_files="1024"
export db_block_checking="FALSE"
export db_block_checksum="TRUE"