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: Holman, Rodney <rodney.holman_at_lodgenet.com>
Date: Tue, 14 Nov 2000 14:54:17 -0600
Message-Id: <10680.122044@fatcity.com>


Also after you start up the new database issue the following command to change the global dbname:

alter databasae rename global_name to NEWDB;

This helps avoid having duplicate global names reporting on your system.

Rodd Holman
Enterprise Data Systems Engineer
LodgeNet Entertainment Corporation
rodney.holman_at_lodgenet.com
Comments made are my own opinions and views. They do not represent views, policies, or procedures of LodgeNet Entertainment Corporation

-----Original Message-----
From: Kristen Cameron [mailto:cameronkgd_at_inac.gc.ca] Sent: Tuesday, November 14, 2000 2:21 PM To: Multiple recipients of list ORACLE-L Subject: Re: Production Issue: How to change the database name (sid)

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

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

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? Received on Tue Nov 14 2000 - 14:54:17 CST

Original text of this message

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