Showing posts with label DATABASE. Show all posts
Showing posts with label DATABASE. Show all posts

Saturday, August 16, 2014

Oracle - automatic startup and shutdown scripts

DBAs can rest when server admins restart the server. Usually it engages both the teams when server is taken down for maintenance. By deploying the scripts, DBAs need not shutdown and startup the databases and services manually.

The scripts I have used have been taken from Tim Halls' oracle-base. The scripts from his site works when there is single database. I have modified the scripts so that they can be used when the server has multiple databases. The only requirement is that all database names should be available in /etc/oratab as shown below:



In the above picture, one database name is commented and one is given "N". The script ignores these unwanted databases and takes into account only active databases.

The scripts need not need any specific modification except that you may need to edit the script and place the location of your bash profile you want to use.

Download these 3 files:

dbora
startup.sh
shutdown.sh

copy dbora file to /etc/init.d/ 

and then execute:

chmod 750 /etc/init.d/dbora
 
  
Add dbora to the run level as below :

chkconfig --add dbora
 

This ensures the script runs when the host server goes for startup or shutdown.

 Note: the above 2 steps dealing with dbora file is done by root user


copy startup.sh and shutdown.sh to /app/oracle/scripts/  or any other desired location and test by restarting the server. Check the log startup_shutdown.log in the same location.


Cheers!!
 
 

Tuesday, July 22, 2014

oracle 12c Installation and Database creation

I have installed Oracle 12c (12.1.0) in Oracle Linux 6. Below are the steps:

Set ORACLE_HOME to the location where the files will be installed and set the port no for the EM:
export $ORACLE_HOME=/u01/app/oracle/product/12.1.0/db_1
export $DBEXPRESS_HTTPS_PORT=5500
 

 


  


























Wednesday, August 31, 2011

STORAGE STRUCTURE

DATABASE STORAGE STRUCTURE:

The database is just a set of files present on disk. These files are created when we create the Database using the 'CREATE DATABASE' statement.



When looking at server level, we may find the files as .log .trc .trm .dbf .ctl. Oracle uses the logical structure to organize the files internally.

The data dictionary maintains the relationship between the physical and logical structure


I) Physical Database Structure:

CONTROL FILES