Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Mailing Lists -> Oracle-L -> RE: Create controlfile syntax

RE: Create controlfile syntax

From: Sarah Satterthwaite <ssatterthwaite_at_cswcasa.com>
Date: Tue, 15 Nov 2005 15:10:07 -0500
Message-ID: <4FF77D01E13B214590F4FA3E2C3021D003DE041F@pecos.csw.alewife.net>


I did this yesterday. I think you have it correct. My script follows that I used to rebuild the control file.

Hope this helps.

Sarah

S:\oracle\admin\CASA2\adhoc>type casa2ctl.sql

# 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.

spool casa2CTL.log

STARTUP NOMOUNT pfile=c:\oracle\admin\casa2\pfile\initCASA2.ora CREATE CONTROLFILE set DATABASE "CASA2" RESETLOGS NOARCHIVELOG

    MAXLOGFILES 32
    MAXLOGMEMBERS 3
    MAXDATAFILES 254
    MAXINSTANCES 1
    MAXLOGHISTORY 1588
LOGFILE
  GROUP 5 (
    'F:\ORACLE\ORADATA\CASA2\CASA2_REDO511A.LOG',     'H:\ORACLE\ORADATA\CASA2\CASA2_REDO511B.LOG'   ) SIZE 512M,
  GROUP 6 (
    'F:\ORACLE\ORADATA\CASA2\CASA2_REDO512A.LOG',     'H:\ORACLE\ORADATA\CASA2\CASA2_REDO512B.LOG'   ) SIZE 512M,
  GROUP 7 (
    'F:\ORACLE\ORADATA\CASA2\CASA2_REDO513A.LOG',     'H:\ORACLE\ORADATA\CASA2\CASA2_REDO513B.LOG'   ) SIZE 512M,
  GROUP 8 (
    'F:\ORACLE\ORADATA\CASA2\CASA2_REDO514A.LOG',     'H:\ORACLE\ORADATA\CASA2\CASA2_REDO514B.LOG'   ) SIZE 512M
DATAFILE

  'F:\ORACLE\ORADATA\CASA2\CASA2_SYSTEM01.DBF',
  'H:\ORACLE\ORADATA\CASA2\CASA2_RBS01.DBF',
  'H:\ORACLE\ORADATA\CASA2\CASA2_RBS02.DBF',
... Lots of file names removed
  'I:\ORACLE\ORADATA\CASA2\CASA2_CR14.DBF',
  'F:\ORACLE\ORADATA\CASA2\CASA2_CASA08.DBF',
  'H:\ORACLE\ORADATA\CASA2\CASA2_IND_CASA06.DBF'
CHARACTER SET WE8ISO8859P1
;

# Database can now be opened normally.

ALTER DATABASE OPEN resetlogs;
# Commands to add tempfiles to temporary tablespaces.
# Online tempfiles have complete space information.
# Other tempfiles may require adjustment.
ALTER TABLESPACE TMP ADD TEMPFILE 'I:\ORACLE\ORADATA\CASA2\CASA2_TMP03.DBF' REUSE;
# ALTER TABLESPACE TMP ADD TEMPFILE

'I:\ORACLE\ORADATA\CASA2\CASA2_TMP02.DBF' REUSE;
# ALTER TABLESPACE TMP ADD TEMPFILE

'I:\ORACLE\ORADATA\CASA2\CASA2_TMP01.DBF' REUSE;
# End of tempfile additions.

#

alter database rename global_name to "CASA2.WORLD"; select * from v$instance;
select * from global_name;
grant sysdba to system;
select * from v$pwfile_users;

spool off

-----Original Message-----
From: J. Dex [mailto:cemail_219_at_hotmail.com] Sent: Tuesday, November 15, 2005 10:17 AM To: oracle-l_at_freelists.org
Subject: Create controlfile syntax

I have seen documentation saying different things so I was wondering if someone could just verify this for me. When trying to restore a copy of a database and give it a new name, in the create controlfile statement there shouldn't be any reference to "RESTORE DATABASE"? Is that correct?

My understanding is that the last line in the file should be "ALTER DATABASE

OPEN RESETLOGS". The first line should be CREATE CONTROLFILE SET DATABASE "new_SID" RESETLOGS NOARCHIVELOG

The restore was done from a clean shutdown immediate.

Thanks.



Express yourself instantly with MSN Messenger! Download today - it's FREE! http://messenger.msn.click-url.com/go/onm00200471ave/direct/01/
--
http://www.freelists.org/webpage/oracle-l

--
http://www.freelists.org/webpage/oracle-l
Received on Tue Nov 15 2005 - 14:12:11 CST

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US