Dear Readers,
This article will see the following Change DBID in Oracle.
NID is the tool that is used to change DBID or database name. Before changing the NID safer side take the backup of the database, and related files dependent on DB.
1 2 3 4 5 6 7 8 9 |
[root@detedb1 ~]$ ora_env List of instances oracle : { test1 dbdr11 dbcs16 } Environnement oracle ~~~~~~~~~~~~~~~~~~~~ ORACLE_SID ...... : dbcs16 ORACLE_HOME ..... : /u01/app/oracle/11.2.0.3/db_home TNS_ADMIN ....... : /u01/app/oracle/product/11.2.0.3/db_home/network/tnsadmin NLS_LANG ........ : american_america.AL32UTF8 listener...: LISTENER_DBCS |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 |
[root@detedb1 ~]$ nid TARGET=SYS DBNEWID: Release 11.2.0.3.0 - Production on Thu Feb 4 19:23:28 2019 Copyright (c) 1982, 2011, Oracle and/or its affiliates. All rights reserved. Password: Connected to database DBCS16 (DBID=3216085472) Connected to server version 11.2.0 Control Files in database: /u01/app/oracle/11.2.0.3/db_home / dbcs16 /control01.ctl /u01/app/oracle/11.2.0.3/db_home / dbcs16 /control02.ctl Change database ID of database DBCS16? (Y/[N]) => Y Proceeding with operation Changing database ID from 3216085472 to 2519222153 Control File /u01/app/oracle/11.2.0.3/db_home / dbcs16 /control01.ctl - modified Control File /u01/app/oracle/11.2.0.3/db_home / dbcs16 /control02.ctl - modified Datafile File /u01/app/oracle/11.2.0.3/db_home / dbcs16 /system_01.db - dbid changed Datafile File /u01/app/oracle/11.2.0.3/db_home / dbcs16/ sysaux_01.db - dbid changed Datafile File /u01/app/oracle/11.2.0.3/db_home / dbcs16 /undo1_01.db - dbid changed Datafile File /u01/app/oracle/11.2.0.3/db_home / dbcs16 /ttools_01.db - dbid changed Datafile /u01/app/oracle/11.2.0.3/db_home / dbcs16 /sbg_d1_01.db - dbid changed Datafile /u01/app/oracle/11.2.0.3/db_home / dbcs16 /sbg_i1_01.db - dbid changed Datafile /u01/app/oracle/11.2.0.3/db_home / dbcs16 /temp1_01.db - dbid changed Control File /u01/app/oracle/11.2.0.3/db_home / dbcs16 /control01.ctl - dbid changed Control File /u01/app/oracle/11.2.0.3/db_home / dbcs16 /control02.ctl - dbid changed Instance shut down Database ID for database DBCS16 changed to 2519222153. All previous backups and archived redo logs for this database are unusable. Database has been shutdown, open database with RESETLOGS option. Succesfully changed database ID. DBNEWID - Completed succesfully. |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 |
[root@detedb1 ~]$ sqlplus "/as sysdba" SQL*Plus: Release 11.2.0.3.0 Production on Thu Feb 4 19:24:28 2019 Copyright (c) 1982, 2011, Oracle. All rights reserved. Connected to an idle instance. SQL> startup mount; ORACLE instance started. Total System Global Area 2672361472 bytes Fixed Size 2231352 bytes Variable Size 2248147912 bytes Database Buffers 402653184 bytes Redo Buffers 19329024 bytes Database mounted. |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 |
SQL> alter database open RESETLOGS; Database altered. SQL> select name,open_mode,dbid from v$database; NAME --------- OPEN_MODE -------------------------------------------------------------------------------- DBID ---------- DBCS16 READ WRITE 2519222153 |
Thank you for giving your valuable time to read the above information. Please click here to subscribe for further updates
KTEXPERTS is always active on below social media platforms.
Facebook : https://www.facebook.com/ktexperts/
LinkedIn : https://www.linkedin.com/company/ktexperts/
Twitter : https://twitter.com/ktexpertsadmin
YouTube : https://www.youtube.com/c/ktexperts