©2015 - 2022 Chad’s Technoworks. Disclaimer and Terms of Use

Chad’s TechnoWorks My Journal On Technology

Information Technology

How To Create An Oracle 12c Database - page 4

Prev< 1 2 3 4

At this point, the database is being created as shown through the progress bar.

When all is done, a dialog windows shows some additional summary of what was created. Note the database express URL as this will be one of the tools you’ll use to manage the database.

Finally, your database creation has completed. You may close the window now.

Here’s a sample look of the database express management console.

A BRIEF OVERVIEW OF THE DATABASE


Here are some important points to understand after the database has been created through these procedures.

            $ORACLE_BASE/oradata/<your db name>/controlfile         - this is where your control files reside

            $ORACLE_BASE/oradata/<your db name>/datafile             - this is where the files of your data reside

            $ORACLE_BASE/oradata/<your db name>/onlinelog           - this is where your online redo logs reside

            Note that the directory path may be different for the database files if you had chosen to create a “Custom” database in the dbca.


s111oem:~$ adrci


ADRCI: Release 12.1.0.1.0 - Production on Mon Aug 4 07:20:55 2014


Copyright (c) 1982, 2013, Oracle and/or its affiliates.  All rights reserved.


ADR base = "/oem/app/oraemdb"

adrci> help


 HELP [topic]

   Available Topics:

        CREATE REPORT

        ECHO

        EXIT

        HELP

        HOST

        IPS

        PURGE

        RUN

        SET BASE

        SET BROWSER

        SET CONTROL

        SET ECHO

        SET EDITOR

        SET HOMES | HOME | HOMEPATH

        SET TERMOUT

        SHOW ALERT

        SHOW BASE

        SHOW CONTROL

        SHOW HM_RUN

        SHOW HOMES | HOME | HOMEPATH

        SHOW INCDIR

        SHOW INCIDENT

        SHOW LOG

        SHOW PROBLEM

        SHOW REPORT

        SHOW TRACEFILE

        SPOOL


 There are other commands intended to be used directly by Oracle, type

 "HELP EXTENDED" to see the list


adrci> exit



One thing to note that the SHOW ALERT is the widely used command since this log shows you the status of the database and it also reveals if there were errors encountered.


HOW TO STARTUP A DATABASE


1. Connect to the server as the oracle database user and set your environment variables.

Example:

s111oem:~/.env$ . ./oraenv_oemdb.sh

------- DATABASE ENV -------

ORACLE_BASE=/oem/app/oraemdb

ORACLE_HOME=/oem/app/oraemdb/product/12.1.0.1/db

ORACLE_SID=OMRDB

ORACLE_UNQNAME=OMRDB

ORAINST=/oem/app/oraemdb/product/12.1.0.1/db/oraInst.loc

TNS_ADMIN=/oem/app/oraemdb/product/12.1.0.1/db/network/admin

TMPDIR=/oem/app/oraemdb/tmp


2. Start the database listener.

If you don’t know or don’t remember the listener name for the database, the file $ORACLE_HOME/network/admin/listener.ora has a list of all listener names and their configuration.

 

Example:

s111oem:~/.env$ lsnrctl start OMRDB


LSNRCTL for Solaris: Version 12.1.0.1.0 - Production on 05-AUG-2014 10:14:12


Copyright (c) 1991, 2013, Oracle.  All rights reserved.


Starting /oem/app/oraemdb/product/12.1.0.1/db/bin/tnslsnr: please wait...


TNSLSNR for Solaris: Version 12.1.0.1.0 - Production

System parameter file is /oem/app/oraemdb/product/12.1.0.1/db/network/admin/listener.ora

Log messages written to /oem/app/oraemdb/diag/tnslsnr/s111oem/omrdb/alert/log.xml

Listening on: (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=s111oem)(PORT=1601)))

Listening on: (DESCRIPTION=(ADDRESS=(PROTOCOL=ipc)(KEY=EXTPROC1601)))


Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=s111oem)(PORT=1601)))

STATUS of the LISTENER

------------------------

Alias                     OMRDB

Version                   TNSLSNR for Solaris: Version 12.1.0.1.0 - Production

Start Date                05-AUG-2014 10:14:13

Uptime                    0 days 0 hr. 0 min. 0 sec

Trace Level               off

Security                  ON: Local OS Authentication

SNMP                      OFF

Listener Parameter File   /oem/app/oraemdb/product/12.1.0.1/db/network/admin/listener.ora

Listener Log File         /oem/app/oraemdb/diag/tnslsnr/s111oem/omrdb/alert/log.xml

Listening Endpoints Summary...

  (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=s111oem)(PORT=1601)))

  (DESCRIPTION=(ADDRESS=(PROTOCOL=ipc)(KEY=EXTPROC1601)))

The listener supports no services

The command completed successfully

s111oem:~/.env$


3. Start the database.

Use sqlplus command line tool to start the database.


Example:


s111oem:~/.env$ sqlplus /nolog


SQL*Plus: Release 12.1.0.1.0 Production on Tue Aug 5 10:15:10 2014


Copyright (c) 1982, 2013, Oracle.  All rights reserved.


SQL> connect / as sysdba

Connected to an idle instance.

SQL> startup

ORACLE instance started.


Total System Global Area 3206836224 bytes

Fixed Size                  2366216 bytes

Variable Size             771753208 bytes

Database Buffers         2415919104 bytes

Redo Buffers               16797696 bytes

Database mounted.

Database opened.

SQL> exit



HOW TO SHUTDOWN A DATABASE


1. Login to the server as the Oracle database user and set your environment variables.

Example:

s111oem:~/.env$ . ./oraenv_oemdb.sh

------- DATABASE ENV -------

ORACLE_BASE=/oem/app/oraemdb

ORACLE_HOME=/oem/app/oraemdb/product/12.1.0.1/db

ORACLE_SID=OMRDB

ORACLE_UNQNAME=OMRDB

ORAINST=/oem/app/oraemdb/product/12.1.0.1/db/oraInst.loc

TNS_ADMIN=/oem/app/oraemdb/product/12.1.0.1/db/network/admin

TMPDIR=/oem/app/oraemdb/tmp


2. Use sqlplus command line tool to shutdown the database.

There are 3 types of shutdown levels.


Example:


s111oem:~/.env$ sqlplus /nolog


SQL*Plus: Release 12.1.0.1.0 Production on Tue Aug 5 10:15:10 2014


Copyright (c) 1982, 2013, Oracle.  All rights reserved.


SQL> connect / as sysdba

Connected to an idle instance.

SQL> startup

ORACLE instance started.


Total System Global Area 3206836224 bytes

Fixed Size                  2366216 bytes

Variable Size             771753208 bytes

Database Buffers         2415919104 bytes

Redo Buffers               16797696 bytes

Database mounted.

Database opened.

SQL> exit

Disconnected from Oracle Database 12c Enterprise Edition Release 12.1.0.1.0 - 64bit Production

With the Partitioning, OLAP, Advanced Analytics and Real Application Testing options

oraem@s111oem:~/.env$ sqlplus /nolog


SQL*Plus: Release 12.1.0.1.0 Production on Tue Aug 5 10:46:54 2014


Copyright (c) 1982, 2013, Oracle.  All rights reserved.


SQL>

SQL> connect / as sysdba

Connected.

SQL> shutdown immediate

Database closed.

Database dismounted.

ORACLE instance shut down.

SQL> exit


3. You may optionally stop the listener if there were no other database service running on it.


Example:


s111oem:~/.env$ lsnrctl stop OMRDB


LSNRCTL for Solaris: Version 12.1.0.1.0 - Production on 05-AUG-2014 11:03:15


Copyright (c) 1991, 2013, Oracle.  All rights reserved.


Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=s111oem)(PORT=1601)))

The command completed successfully

s111oem:~/.env$