행위

"오라클 sid 변경"의 두 판 사이의 차이

DB CAFE

(오라클 sid 변경)
 
(같은 사용자의 중간 판 하나는 보이지 않습니다)
1번째 줄: 1번째 줄:
 
= 오라클 sid 변경 =
 
= 오라클 sid 변경 =
 
+
* Since 9i dbnewid utility (nid) can be used to change database name(and DBID if required).
Since 9i dbnewid utility (nid) can be used to change database name
+
* If database name being changed only then resetlogs is not required:
(and DBID if required).
 
If database name being changed only then resetlogs is not required:
 
  
 
1. startup database in mount mode
 
1. startup database in mount mode
      shutdown immediate
+
<source lang=sql>
      startup mount
+
shutdown immediate
 +
startup mount
 +
</source>
  
 
2. run nid to change database name:
 
2. run nid to change database name:
      nid target=sys/syspassword@dbtns dbname=newname setname=YES
+
<source lang=sql>
 +
nid target=sys/syspassword@dbtns dbname=newname setname=YES
 +
</source>
  
 
3. shutdown and start database in mount mode:
 
3. shutdown and start database in mount mode:
 +
<source lang=sql>
 
       shutdown immediate
 
       shutdown immediate
 
       startup mount
 
       startup mount
 
+
</source>
 
4. change db_name in spfile (or in pfile editing the file):
 
4. change db_name in spfile (or in pfile editing the file):
      alter system set db_name=newname scope=spfile;
+
<source lang=sql>
 
+
alter system set db_name=newname scope=spfile;
 +
</source>
 
5. recreate password file:
 
5. recreate password file:
      orapwd file=orapwnewname password=syspassword
+
<source lang=sql>
 
+
orapwd file=orapwnewname password=syspassword
 +
</source>
 
6. startup the database
 
6. startup the database
      startup
+
<source lang=sql>
     
+
startup
 +
</source>     
 
7. post rename steps:
 
7. post rename steps:
 +
<source lang=sql>
 
       change SID in listener.ora
 
       change SID in listener.ora
 
       correct tnsnames.ora
 
       correct tnsnames.ora
 
       remove old trace directories
 
       remove old trace directories
 
       change /etc/oratab (UNIX) or rename windows service using oradim
 
       change /etc/oratab (UNIX) or rename windows service using oradim
 +
</source>
 
[[Category:oracle]]
 
[[Category:oracle]]

2023년 4월 4일 (화) 00:02 기준 최신판

thumb_up 추천메뉴 바로가기


오라클 sid 변경[편집]

  • Since 9i dbnewid utility (nid) can be used to change database name(and DBID if required).
  • 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/syspassword@dbtns dbname=newname 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=newname 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 oradim