Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.misc -> Re: Renaming a Database
Neil Boemio wrote:
> Hello,
>
> I know this question has already been asked and answered, but I don't
> remember what it was. So could someone be so kind as to tell me the
> general procedure for renaming a database. BACKUP
> CONTROLFILE TO TRACE is involved somewhere, no?
>
> And a totally unrelated question .... if you have an index on column X
>
> and you do a SELECT with a
> GROUP BY clause on column X, and there is no WHERE clause, will Oracle
>
> use the index?
>
> Thanks a bunch!
Neil,
Once an Oracle database is larger than 1-2 gig in size then coping and
renaming is the
only way. I just copied a 8 gig database in 90 minutes. Break out the
beer!
Here are the steps:
spool hr_trace1.log
connect internal
STARTUP NOMOUNT;
CREATE CONTROLFILE SET DATABASE "HRPTO51" RESETLOGS NOARCHIVELOG
MAXLOGFILES 16
MAXLOGMEMBERS 2
MAXDATAFILES 200
MAXINSTANCES 1
MAXLOGHISTORY 100
LOGFILE
GROUP 1 (
'/data3/HRPTO51/HRPTO51log1.dbf'
) SIZE 50M,
GROUP 2 (
'/data3/HRPTO51/HRPTO51log2.dbf'
) SIZE 50M,
GROUP 3 (
'/data3/HRPTO51/HRPTO51log3.dbf'
) SIZE 50M,
DATAFILE
'/data9/HRPTO51/HRPTO51sys1.dbf', '/data9/HRPTO51/HRPTO51hrrbs1.dbf', '/data9/HRPTO51/HRPTO51hrtemp1.dbf', '/data9/HRPTO51/HRPTO51hrindex1.dbf', '/data9/HRPTO51/HRPTO51hrtable1.dbf',
# Recovery is required if any of the datafiles are restored backups, # or if the last shutdown was not normal or immediate. # RECOVER DATABASE # All data9 need archiving and a log switch is needed. # ALTER SYSTEM ARCHIVE LOG ALL; # Database can now be opened normally.
Sylvan Creach
Oracle DBA
Cobe Labs
Lakewood CO 80215
303-239-2206
Received on Tue Oct 07 1997 - 00:00:00 CDT
![]() |
![]() |