OCA 03 - Creating an Oracle Database
-
Upload
muhammad-asghar-khan -
Category
Documents
-
view
227 -
download
0
Transcript of OCA 03 - Creating an Oracle Database
-
7/29/2019 OCA 03 - Creating an Oracle Database
1/12
03 - Creating an Oracle Database
By Muhammad Asghar Khan
Reference: OCA Oracle Database 11g - Admin I Exam Guide by John Watson
-
7/29/2019 OCA 03 - Creating an Oracle Database
2/12
Agenda
http://asghars.blogspot.com
Create a Database by Using the DBCA Understanding the Instance, Database, and the Data
Dictionary
EXERCISE 3-1: Use the DBCA to Create a Database
Scripts and Other Files Created by the DBCA
1/1
-
7/29/2019 OCA 03 - Creating an Oracle Database
3/12
Create a Database by Using the DBCA
http://asghars.blogspot.com
Understanding the Instance, Database, and theData Dictionary
An Oracle server is an instance and a database
The instance is memory structures and processes, in
your RAM and on your CPU(s) and is defined by aninstance parameter file
The database is files on disk
Creating an instance is nothing more than building
the memory structures and starting the processes All parameters, either specified by the parameter file
or implicit, have defaults, except for one: theparameter DB_NAME
1/8
-
7/29/2019 OCA 03 - Creating an Oracle Database
4/12
Create a Database by Using the DBCA
http://asghars.blogspot.com
Creating a database is done by the instance
The data dictionary describes all the logical andphysical structures in the database, including all thesegments that store user data
The data dictionary itself is created by running a setof SQL scripts that exist in theORACLE_HOME/rdbms/admin directory
EXERCISE 3-1: Use the DBCA to Create a Database
1. Invoke the dbca2. On the DBCA Welcome dialog box, click Next
3. Select the Create A Database radio button, and clickNext
2/8
-
7/29/2019 OCA 03 - Creating an Oracle Database
5/12
Create a Database by Using the DBCA
http://asghars.blogspot.com
4. Select the Custom Database radio button, as thiswill present all possible options. Click Next
5. In the Database Identification dialog box, enter a
global database name, and a System Identifier (a
SID), which will be used as the instance name
3/8
-
7/29/2019 OCA 03 - Creating an Oracle Database
6/12
Create a Database by Using the DBCA
http://asghars.blogspot.com
6. The Management Options dialog box has a checkbox for configuring the database with Enterprise
Manager. Select this. Then there are radio buttons
for either Grid Control or Database Control. The
Grid Control radio button will be grayed out if theDBCA does not detect a Grid Control agent running
on the machine. Select Database Control.
4/8
-
7/29/2019 OCA 03 - Creating an Oracle Database
7/12
Create a Database by Using the DBCA
http://asghars.blogspot.com
7. The Database Credentials dialog box prompts forpasswords for four users in the database: SYS (who
owns the data dictionary), SYSTEM (used for most
DBA work), DBSNMP (used for external monitoring),
and SYSMAN (used by Enterprise Manager). Selectthe radio button for Use The Same Password For All
Accounts. Enter oracle
as the password,
twice, and click Next
5/8
-
7/29/2019 OCA 03 - Creating an Oracle Database
8/12
Create a Database by Using the DBCA
http://asghars.blogspot.com
8. Select Storage Types as File System, then select theUse Common Locations for All Database Files
9. In the Recovery Configuration dialog box, accept the
default configuration for the flash recovery area and
do not enable archiving. Click Next
10. In the Database Content dialog box, deselect all
options except Enterprise Manager Repository. The
others are not needed for this database and will
make the creation take much longer
6/8
-
7/29/2019 OCA 03 - Creating an Oracle Database
9/12
Create a Database by Using the DBCA
http://asghars.blogspot.com
11. Click the Standard Database Components button,and deselect these as well. Dont worry about a
warning that the XML DB is used by other
components. Click Next
12. The Initialization Parameters dialog box has fourtabs. Leave everything on default, but look at all the
tabs
13. The Database Storage dialog box shows, via a
navigation tree on the left, the files that will becreated. Navigate around this, and see the names
and sizes of the files
7/8
-
7/29/2019 OCA 03 - Creating an Oracle Database
10/12
Create a Database by Using the DBCA
http://asghars.blogspot.com
14. In the Creation Options dialog box, select the checkboxes for Create Database and Generate Database
Creation Scripts. Note the path for the scripts; it will
be ORACLE_BASE/admin/ocp11g/scripts. Click
Finish15. When the DBCA completes, it will present the
dialog box shown in the illustration that follows.
Take note of all the information given, in particular
the URL given for database control
8/8
-
7/29/2019 OCA 03 - Creating an Oracle Database
11/12
Scripts and Other Files Created by the DBCA
http://asghars.blogspot.com
Scripts generated will be in the directoryORACLE_BASE/admin/DB_NAME/scripts
The instance parameter file, named init.ora
There are about 300 parameters, but the file generatedby the DBCA sets only a few
The Database Creation Shell Script is the file the DBCAexecutes to launch the database creation process
The CreateDB.sql script consists of CREATE DATABASECommand
The other SQL scripts called by ocp11g.sql to completethe database creation will depend on the optionschosen when going through the DBCA
1/2
-
7/29/2019 OCA 03 - Creating an Oracle Database
12/12
Scripts and Other Files Created by the DBCA
http://asghars.blogspot.com
CreateDBfiles.sql
It creates a small tablespace USERS
CreateDBCatalog.sql
It runs a set of scripts in the $ORACLE_HOME/rdbms/admindirectory that construct views on the data dictionary and
create many PL/SQL packages emRepository.sql
This runs the script to create the objects needed byEnterprise Manager Database Control
postDBCreation.sql This generates a server parameter file from the init.ora file,
unlocks the DBSNMP and SYSMAN accounts used by EM,and runs the EM configuration Assistant (emca) to configureDatabase Control for the new database
2/2