Contents:-
Rename a database name
Steps
Current
db name=clondb
Rename
name=clone
$> . oraenv
Clonedb
Sql>shut immediate
$>nid
target=clonedb dbname=clone
Sql> y
Change parameter file
$> vi /u01/app/oracle/admin/clonedb/pfile/initclonedb.ora
:1,$ s#clonedb#clone#g
Create
Directory Structure
$>mkdir –p /u01/app/oracle/admin/clone/adump
$>mkdir –p /u01/app/oracle/admin/clone/dbdump
$>mkdir –p /u01/app/oracle/admin/clone/pfile
$> . oraenv
+ASM
$>asmcmd
Asmcmd> cd data
Asmcmd> mkdir clone
Asmcmd> cd ..
Asmcmd> cd flash
Asmcmd>mkdir clone
Add
entry of new sid CLONE into /etc/oratab file.
Create
spfile from newly created pfile.
$> . oraenv
Clone
$>sqlplus sys as sysdba
Sql> create spfile=’+data/clone/spfileclone.ora’ from
pfile=’/u01/app/oracle/admin/clone/pfile/initclone.ora’;
Create
pfile into dbs folder to call spfile.
$> vi $ORACLE_HOME/dbs/initclone.ora
Spfile=’+data/clone/spfileclone.ora’;
:wq
Set environment
to newly database name
$> . oraenv
Clone
Login
into database and start the database.
$>sqlplus sys as sysdba
Sql>startup mount;
Sql>alter database open resetlogs;
Sql>select name,dbid from v$database;
No comments:
Post a Comment