
Installgen
Features and Benefits
Installgen
Demo Available for download...
Bookmark This Page

-- script: 37_macosx_prod1_rebuild_controlfile_1.sql
-- Features: This sql script rebuilds the control file.
-- NOTE: The contents of this file can only be used to rebuild the
-- control file if no datafiles have been added/moved since
-- the database was originally created.
-- The best option is to use the latest backed up version of
-- of the control file backed up to trace (generally done nightly).
-- In order to use the tracefile information, replace the #'s with --
-- for comments.
--
-- Script Sequence#: 37
-- Used By: run manually using Oracle SYS user account
-- Usage: /Users/oracle/v920/bin/sqlplus /nolog @37_macosx_prod1_rebuild_controlfile_1.sql
-- Copyright 2002 by .com Solutions Inc.
--
-- ---------------------- Revision History ---------------
-- Date By Changes
-- 10-1-2001 dsimpson Initial Release
-- This output file was created by Installgen version 1.38 on Sat Nov 23 07:13:32 2002. By .com Solutions Inc. www.dotcomsolutionsinc.net
-- make sure the database is shut down before starting
-- The following commands will create a new control file and use it
-- to open the database.
-- Data used by the recovery manager will be lost. Additional logs may
-- be required for media recovery of offline data files. Use this
-- only if the current version of all online logs are available.
connect / as sysdba
set echo on;
STARTUP NOMOUNT
CREATE CONTROLFILE REUSE DATABASE "PROD1" NORESETLOGS ARCHIVELOG
MAXLOGFILES 5
MAXLOGMEMBERS 5
MAXDATAFILES 100
MAXINSTANCES 1
MAXLOGHISTORY 454
LOGFILE
GROUP 1 ('/Volumes/u01/prod1/redo01.log' ,'/Volumes/u03/prod1/redo01g1f2.log') SIZE 10M,
GROUP 2 ('/Volumes/u02/prod1/redo02.log' ,'/Volumes/u01/prod1/redo02g2f2.log') SIZE 10M,
GROUP 3 ('/Volumes/u03/prod1/redo03.log' ,'/Volumes/u02/prod1/redo03g3f2.log') SIZE 10M
-- STANDBY LOGFILE
DATAFILE
'/Volumes/u01/prod1/system01.dbf',
'/Volumes/u02/prod1/tools01.dbf',
'/Volumes/u02/prod1/users01.dbf',
'/Volumes/u02/prod1/indx01.dbf',
'/Volumes/u03/prod1/xdb01.dbf',
'/Volumes/u03/prod1/drsys01.dbf',
'/Volumes/u03/prod1/example01.dbf'
CHARACTER SET US7ASCII
;
-- Recovery is required if any of the datafiles are restored backups,
-- or if the last shutdown was not normal or immediate.
RECOVER DATABASE
-- Database can now be opened normally.
ALTER DATABASE OPEN;
-- Commands to add tempfiles to temporary tablespaces.
-- Online tempfiles have complete space information.
-- Other tempfiles may require adjustment.
ALTER TABLESPACE TEMP ADD TEMPFILE '/Volumes/u03/prod1/temp01.dbf' REUSE;
-- End of tempfile additions.
--
shutdown immediate
exit;

