Create 12c ASM Based Database
TOC
Overview
What follows are the steps to create an ASM based Oracle database for an enterprise environment. It is a common practice to create your database in two major steps:
- Create the core database as shown in these instructions.
- Create custom components required by the business mission (tablespaces, settings, schema etc.).
In this way, you can ensure your core database is structurally sound and issue free. Think of it like building a house. The steps outlined here are the foundation. The Oracle Database Configuration Assistant (DBCA) is used in the below methods to create the database.
ASM Database Groups
- DATA: control, data, redo, parameter, password and temp files.
- FRA (Fast Recovery Area): archived logs, control and redo files.
Prerequisites
- Choose a database name that wont come back and bite you.
- You understand Oracle Managed Files (OMF).
- You have installed the Oracle Database Product?.
- You have created the BASH profile? for the oracle user account.
- You have installed GI\ASM for a Stand Alone Database (AKA Oracle Restart)?.
- You have created ASM groups for the GI and database data (ex: +GRID, +DATA, +FRA).
- ASM is running.
srvctl status asm
Procedure
Logged in as oracle user:
Run dbca.
cd $ORACLE_HOME/bin ./dbca &
Database Operation
Create Database
Creation Mode
Advanced Mode
Deployment Type
Database type: Oracle Single Instance database Custom Database
Database Identification
Global Database Name: oradb SID: oradb Create as Container database
Storage Option
Use following for the database storage attributes Database files Storage Type: Automatic Storage Management (ASM) Use Common Location for All Database Files +DATA/{DB_UNIQUE_NAME} Use Oracle-Managed Files OMF creates the following directories correspondingly: +DATA/ORADB +DATA/ORADB/CONTROLFILE +DATA/ORADB/DATAFILE +DATA/ORADB/ONLINELOG +DATA/ORADB/PARAMETERFILE +DATA/ORADB/TEMPFILE
This will be the: DB_CREATE_FILE_DEST
Fast Recovery Option
Specify Fast Recovery Area Recovery files storage type: Automatic Storage Management (ASM) Fast Recovery Area: +FRA Fast Recovery size: 25 GB => Determine FRA Size Enable archiving Archive log file format: %t_%s_%r.arc OMF creates the following directories correspondingly: +FRA/ORADB +FRA/ORADB/ARCHIVELOG +FRA/ORADB/CONTROLFILE +FRA/ORADB/ONLINELOG
This will be the: DB_RECOVERY_FILE_DEST
Network Configuration
Select Listener displayed: Name: LISTENER Port: 1521 Home: /u01/app/12.2.0.1/grid If prompted: Data Vault Option
Database components
Only select what you will actually be using. Example: Oracle JVM
Configuration Options
• MEMORY Use Automatic Shared Memory Management Set slider to about 50-80% of your RAM. 8 gb RAM example (3193): SGA Size: 2394 PGA Size: 799 Dont use Automatic Memory Management (AMM) for Linux Oracle systems.? • SIZING Block size: 8192 BYTES Processes: 300 • CHARACTER SETS <Use Defaults> • CONNECTION MODE Dedicated server mode • SAMPLE SCHEMAS Add sample schemas to the database
Management Options
Configure Enterprise (EM) Database Express EM Database Express Port: 5500
User Credentials
Use the same administrative password for all Accounts Password: ******** Confirm Password: ********
Creation Option
Create database For each where possible: Use Locally Managed Tablespace Allocation: (x) Automatic Use Bigfile Tablespace Caveats • A SYSTEM tablespace cannot use Automatic Segment Space Management. • A Temp tablespace cannot be automatically allocated, i.e. you have to use (x) Uniform and specify Bytes. Tablespace Minimum Size ----------- ------------ SYSAUX 1 gb SYSTEM 1 gb TEMP 5 gb UNDOTBS1 2 gb USERS 25 mb Datafiles Leave as is. They are being managed by OMF. Redo Log Groups Create a minimum 4 groups (default is 3). Example: Group #: 4 File Size: 200 M Bytes File Name: <OMF_4_REDOLOG_MEMBER_0>
Summary
Press Screen is initially blank for a moment...then process begins. To view the progress: tail -f /u01/app/oracle/diag/rdbms/oradb/oradb/trace/alert_oradb.log Once completed you will get a window that shows the creation status and Oracle Express connection info. Select
Note SPFILE Location: +DATA/ORADB/PARAMETERFILE/spfile.nnn.nnnnnnnnn
Status
- ASM
grid>srvctl status asm
- Database
oracle>srvctl status database -d [DBName]
- Instance
SELECT instance_name,status,database_status FROM v$instance ORDER BY instance_name;