If database name being changed only then resetlogs is not required:
1. startup database in mount mode
shutdown immediate
startup mount
2. run nid to change database name:
nid target=sys/0racle@DB01 dbname=DB01NAME setname=YES
3. shutdown and start database in mount mode:
shutdown immediate
startup mount
4. change db_name in spfile (or in pfile editing the file):
alter system set db_name=DB01NAME scope=spfile;
5. recreate password file:
orapwd file=orapwnewname password=syspassword
6. startup the database
startup
7. post rename steps:
change SID in listener.ora
correct tnsnames.ora
remove old trace directories
change /etc/oratab (UNIX) or rename windows service using oradm
example:
Add missing tempfile for temporary tablespace:
SQL> alter tablespace TMP add tempfile '/u01/app/DB01NAME/oradata/datafiles/tmp01.dbf' size 2048M;
Change oratab entry:
$ vi /etc/oratab
...
#### set
...
crmd:/u01/app/DB01NAME/product/11.2.0/db_1:N
1. startup database in mount mode
shutdown immediate
startup mount
2. run nid to change database name:
nid target=sys/0racle@DB01 dbname=DB01NAME setname=YES
3. shutdown and start database in mount mode:
shutdown immediate
startup mount
4. change db_name in spfile (or in pfile editing the file):
alter system set db_name=DB01NAME scope=spfile;
5. recreate password file:
orapwd file=orapwnewname password=syspassword
6. startup the database
startup
7. post rename steps:
change SID in listener.ora
correct tnsnames.ora
remove old trace directories
change /etc/oratab (UNIX) or rename windows service using oradm
example:
Add missing tempfile for temporary tablespace:
SQL> alter tablespace TMP add tempfile '/u01/app/DB01NAME/oradata/datafiles/tmp01.dbf' size 2048M;
Change oratab entry:
$ vi /etc/oratab
...
#### set
...
crmd:/u01/app/DB01NAME/product/11.2.0/db_1:N
No comments:
Post a Comment