Creating Database

From Outrun Wiki
Jump to navigation Jump to search


Creating Oracle databases

This article shows how to create a database on Outrun. It assumes the system is prepared for this, which means we have clusterware + ASM up and running, we created storage volumes and ASM diskgroups.

As a minimum we need one diskgroup, +DATA, but if +TEMP and +REDO exist they will be used to place the TEMP tablespace and redo logs, respectively.

If +FRA exists, the archive destination will be set to it.

The database setup tool creates databases with a very small footprint (less than 1GiB in size, less than 1GiB SGA, small number of users and processes) so it can be scaled up later.

Running db-setup

To create a database, run db-setup create with the required options.

# Create a database DEMO using default settings
db-setup create DEMO

ORACLE instance started.

Total System Global Area  805306368 bytes
Fixed Size		    8625856 bytes
Variable Size		  234881344 bytes
Database Buffers	  553648128 bytes
Redo Buffers		    8151040 bytes

Database created.


File created.


Session altered.

---



Synonym created.


Session altered.

Database closed.
Database dismounted.
ORACLE instance shut down.


# If the Oracle version is at least 12, you can create a container database:
db-setup create DEMO CONTAINER=Y

# The database creation takes some time (typically around 10-15 minutes so be patient.Administrator@vsphere.local

Starting the database

The created database is stopped when finished. An entry in /etc/oratab is created. To start the database, use the database command:

# Start all databases that are enabled in oratab
database start

After a reboot, the database start command is also executed, starting all databases in oratab that are enabled (have a Y as last field.