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

Home -> Community -> Usenet -> c.d.o.server -> Re: renaming a database

Re: renaming a database

From: Valery Yourinsky <vsu_at_bill.mts.ru>
Date: Tue, 09 Jan 2001 18:35:39 +0300
Message-ID: <3A5B2FCB.C023A286@bill.mts.ru>

Choung Chao wrote:
> Can someone tell me how I can rename a database? Is there a way to do it > through the GUI?  

   Hi Choung,

   To rename database you must recreate controlfiles.

   Through the GUI (DBAstudio) you can only BACKUP CONTROLFILE TO TRACE;    Then find created trace file in your USER_DUMP_DESTINATION catalog.    It will be sometning like this:

--

# 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.
#
STARTUP NOMOUNT
#
CREATE CONTROLFILE REUSE DATABASE "GUAMOKO" NORESETLOGS NOARCHIVELOG MAXLOGFILES 32 MAXLOGMEMBERS 2 MAXDATAFILES 254 MAXINSTANCES 1 MAXLOGHISTORY 2722 LOGFILE GROUP 1 'D:\ORACLE\ORADATA\GUAMOKO\REDO01.ORA' SIZE 4M, GROUP 2 'D:\ORACLE\ORADATA\GUAMOKO\REDO02.ORA' SIZE 4M, GROUP 3 'D:\ORACLE\ORADATA\GUAMOKO\REDO03.ORA' SIZE 4M DATAFILE 'D:\ORACLE\ORADATA\GUAMOKO\SYSTEM_01.ORA', 'D:\ORACLE\ORADATA\GUAMOKO\RBS_01.ORA', 'D:\ORACLE\ORADATA\GUAMOKO\USERS_01.ORA', 'D:\ORACLE\ORADATA\GUAMOKO\TOOLS_01.ORA', 'D:\ORACLE\ORADATA\GUAMOKO\INDX01.ORA', 'D:\ORACLE\ORADATA\GUAMOKO\DR01.DBF', 'C:\ORACLE\ORADATA\GUAMOKO\VSU_DATA_01.ORA', 'D:\ORACLE\ORADATA\GUAMOKO\VSU_INDX_01.ORA', 'D:\ORACLE\ORADATA\GUAMOKO\OEM_REPOSITORY.ORA' CHARACTER SET CL8MSWIN1251 ;
# 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 'D:\ORACLE\ORADATA\GUAMOKO\TEMP_01.ORA' REUSE;
#
# End of tempfile additions.
#
-- Change database name in CREATE CONTROLFILE REUSE DATABASE "GUAMOKO" NORESETLOGS NOARCHIVELOG ^^^^^^^ shutdown your database and execute script via svrmgrl or SQL*plus DON'T FORGET BACKUP YOUR DATABASE BEFORE SCRIPT EXECUTION! See also. Oracle8i Administrator’s Guide "5. Managing Control Files" Creating Control Files New Control Files Valery Yourinsky -- Oracle8 Certified DBA
Received on Tue Jan 09 2001 - 09:35:39 CST

Original text of this message

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