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: Production Issue: How to change the database name (sid)

Re: Production Issue: How to change the database name (sid)

From: Kristen Cameron <cameronkgd_at_inac.gc.ca>
Date: Tue, 14 Nov 2000 15:16:17 -0500
Message-Id: <10680.122033@fatcity.com>


Hannah,

If I understand you correctly, you are using a procedure very similar to = the one I use to refresh development databases. I copy all the datafiles = from last night's cold backup, backup the production controlfile to trace, = and then run a 'create controlfile script'. =20

The key to changing the database name is the SET DATABASE "NEWDB" line. = Use whatever database name you like in place of NEWDB.

# The following commands will create a new control file and use it
# to open the database.
# No data other than log history 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.
STARTUP NOMOUNT
CREATE CONTROLFILE REUSE
    SET DATABASE "NEWDB"
    RESETLOGS
    ARCHIVELOG
    MAXLOGFILES 15
    MAXLOGMEMBERS 5
    MAXDATAFILES 254
    MAXINSTANCES 1
    MAXLOGHISTORY 100
LOGFILE
  GROUP 1 '/oracle/oradata/log1.rdo' SIZE 1M,   GROUP 2 '/oracle/oradata/log2.rdo' SIZE 1M DATAFILE

  '/oracle/oradata/f01.dbs',
  '/oracle/oradata/f02.dbs',
  '/oracle/oradata/t01.dbs',
  '/oracle/oradata/i01.dbs'

;

# Database can now be opened normally.

ALTER DATABASE OPEN RESETLOGS; Email me directly if you need more information on creating the controlfile = script.

Hope that helps.



Kristen Cameron
Database Administrator
Indian and Northern Affairs Canada
P.O. Box 1500
Yellowknife NT X1A 2R3=20

867-669-2536



<>< Micah 6:8

>>> Hannah.M.Doran_at_sb.com 11/14/2000 >>>

... I used to be able to quickly replicate the prod data by just copying over the database base files and bringing up the instance. Taaa = daaaaa!
Very quick for a 3 GB db.....

... Anyone know fo a way to change the db name in a control file? =20 Received on Tue Nov 14 2000 - 14:16:17 CST

Original text of this message

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