Database Journal
MS SQL Oracle DB2 Access MySQL PostgreSQL Sybase PHP SQL Etc SQL Scripts & Samples Tips Database Forum Rss Feed

» Database Journal Home
» Database Articles
» Database Tutorials
MS Access
SQL Scripts & Samples
» Database Forum
» Slideshows
Free Newsletters:

News Via RSS Feed

Rss Feed

Database Journal |DBA Support |SQLCourse |SQLCourse2

Featured Database Articles

SQL Scripts & Samples

Posted Jun 18, 2004

Create the Control File

By DatabaseJournal.com Staff

>>Script Language and Platform: Oracle
This is brief information about control file.
Take the controlfile information from trace file and does changes accordingly.

Author: keepquite@yahoo.com

alter database create standby controlfile as '/path';
alter database backup controlfile to trace;

create controlfile REUSE
set database orders_2
logfile group 1 (d:\orawin\orawin\gopal\g.log1)
group 2 (d:\orawin\orawin\gopal\g.log2)
Datafile 'c:\windows\gopal\go.data1' size 2m,
'd:\orawin95\database\gopal\go.data2' size 2m
maxlog files 50
maxlog member
maxlog history
max datafiles
max instances
Archivelog/No Archivelog
character set f7dec;

Note: you must have OSDBA role enabled. The database must not be mounted
by any instance.

part1 = Contains information about db. Total no.of Datafiles,logfiles,and
threads are enabled and open (If you are not using parallel server, you
will have only 1 thread)

part2 = Redo log threads -> Privately or publicly enabled. Each log group
and the current log group that "LGWR" is writing

part3 = Each log member of each log group, size of each log file, its
fullpath, name, the log sequence number, low and high scn values and the
threads to whcih each logfile belongs.

part4 = Datafile information,suchas online/offline,
readable,writable,whether media recovery required, stop scn.

part5 = Log History information

LOG-HISTORY : The controlfile can be configured to contain loghistroy
records for every redo logfile that is used by the database.
Each record in this table gives information of one redologfile.
Each history record contains *)The thread no *)Log sequence no *)Low scn
& High scn

Disclaimer: We hope that the information on these script pages is valuable to you. Your use of the information contained in these pages, however, is at your sole risk. All information on these pages is provided "as -is", without any warranty, whether express or implied, of its accuracy, completeness, or fitness for a particular purpose... Disclaimer Continued

Back to Database Journal Home

SQL Scripts & Samples Archives

Latest Forum Threads
SQL Scripts & Samples Forum
Topic By Replies Updated
sql help!! add 1 August 22nd, 11:58 AM
How To Combine These 2 Queries into 1 Query ? tarek_land 1 June 7th, 08:37 AM
solving query svibuk 1 February 3rd, 06:08 AM
converting from a character string to uniqueidentifier saturnius 4 January 4th, 05:56 AM