Creating a Database with the CREATE DATABASE Statement

Using the CREATE DATABASE SQL statement is a more manual approach to creating a database than using Oracle Database Configuration Assistant (DBCA). One advantage of using this statement over using DBCA is that you can create databases from within scripts.

Kubernetes containerization training courses malaysia

  • About Creating a Database with the CREATE DATABASE Statement
    When you use the CREATE DATABASE statement, you must complete additional actions before you have an operational database. These actions include building views on the data dictionary tables and installing standard PL/SQL packages. You perform these actions by running the supplied scripts.

cloud computing training courses malaysia

  • Step 1: Specify an Instance Identifier (SID)
    The ORACLE_SID environment variable is used to distinguish this instance from other Oracle Database instances that you may create later and run concurrently on the same host computer.
  • Step 2: Ensure That the Required Environment Variables Are Set
    Depending on your platform, before you can start SQL*Plus (as required in a later step), you may have to set environment variables, or at least verify that they are set properly.
  • Step 3: Choose a Database Administrator Authentication Method
    You must be authenticated and granted appropriate system privileges in order to create a database.
  • Step 4: Create the Initialization Parameter File
    When an Oracle instance starts, it reads an initialization parameter file. This file can be a text file, which can be created and modified with a text editor, or a binary file, which is created and dynamically modified by the database. The binary file, which is preferred, is called a server parameter file. In this step, you create a text initialization parameter file. In a later step, you create a server parameter file from the text file.

ai artificial intelligence training courses malaysia

  • Step 5: (Windows Only) Create an Instance
    On the Windows platform, before you can connect to an instance, you must manually create it if it does not already exist. The ORADIM command creates an Oracle Database instance by creating a new Windows service.
  • Step 6: Connect to the Instance
    Start SQL*Plus and connect to your Oracle Database instance with the SYSDBA administrative privilege.
  • Step 7: Create a Server Parameter File
    The server parameter file enables you to change initialization parameters with the ALTER SYSTEM command and persist the changes across a database shutdown and startup. You create the server parameter file from your edited text initialization file.
  • Step 8: Start the Instance
    Start an instance without mounting a database.
  • Step 9: Issue the CREATE DATABASE Statement
    To create the new database, use the CREATE DATABASE statement.
  • Step 10: Create Additional Tablespaces
    To make the database functional, you must create additional tablespaces for your application data.
  • Step 11: Run Scripts to Build Data Dictionary Views
    Run the scripts necessary to build data dictionary views, synonyms, and PL/SQL packages, and to support proper functioning of SQL*Plus.
  • Step 12: (Optional) Run Scripts to Install Additional Options
    You may want to run other scripts. The scripts that you run are determined by the features and options you choose to use or install.
  • Step 13: Run Datapatch
    Run Datapatch to update information stored in the database to the correct patch level.
  • Step 14: Back Up the Database
    Take a full backup of the database to ensure that you have a complete set of files from which to recover if a media failure occurs.
  • Step 15: (Optional) Enable Automatic Instance Startup
    You might want to configure the Oracle instance to start automatically when its host computer restarts.

lean it certification training courses malaysia

Comments

Leave a Reply

Your email address will not be published. Required fields are marked *