In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-01-31 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Database >
Share
Shulou(Shulou.com)05/31 Report--
Editor to share with you how to change the database DBID, I believe that most people do not know much about it, so share this article for your reference, I hope you can learn a lot after reading this article, let's go to know it!
Change the database DBID
When cloning a database to another machine, with the same database name or if a new database name is through the reconstructed control file
Then you need to change the DBBID, especially if the new database is registered with the same rman catalog.
In particular, if only one DBID is allowed to be registered in rman catalog,rman catalog, and the same DBID cannot be registered in the same catalog, here is how to change the DBID:
1. Close the database and start to mount state
SYS@jzh > shu immediate
Database closed.
Database dismounted.
ORACLE instance shut down.
SYS@jzh > startup mount
ORACLE instance started.
Total System Global Area 626327552 bytes
Fixed Size 2230952 bytes
Variable Size 444597592 bytes
Database Buffers 176160768 bytes
Redo Buffers 3338240 bytes
Database mounted.
2. Confirm that sys users can connect
[oracle@jzh6 ~] $sqlplus sys/oracle@jzh as sysdba
SQL*Plus: Release 11.2.0.3.0 Production on Sun Sep 13 08:43:52 2015
Copyright (c) 1982, 2011, Oracle. All rights reserved.
Connected to:
Oracle Database 11g Enterprise Edition Release 11.2.0.3.0-64bit Production
With the Partitioning, OLAP, Data Mining and Real Application Testing options
3. Change DBID
[oracle@jzh6 ~] $cd $ORACLE_HOME/bin
[oracle@jzh6 bin] $. / nid target=sys/oracle@jzh
DBNEWID: Release 11.2.0.3.0-Production on Sun Sep 13 08:45:08 2015
Copyright (c) 1982, 2011, Oracle and/or its affiliates. All rights reserved.
Connected to database JZH (DBID=233255254)-current database DBID
Connected to server version 11.2.0
Control Files in database:
/ u01/app/oracle/oradata/jzh/control01.ctl
/ u01/app/oracle/fast_recovery_area/jzh/control02.ctl
Change database ID of database JZH? (y / [N]) = > y Murray Murray-whether to change DBID, enter Y
Proceeding with operation
Changing database ID from 233255254 to 249044244-DBID changed from 233255254 to 249044244
Control File / u01/app/oracle/oradata/jzh/control01.ctl-modified
Control File / u01/app/oracle/fast_recovery_area/jzh/control02.ctl-modified
Datafile / u01/app/oracle/oradata/jzh/system01.db-dbid changed
Datafile / u01/app/oracle/oradata/jzh/sysaux01.db-dbid changed
Datafile / u01/app/oracle/oradata/jzh/undotbs01.db-dbid changed
Datafile / u01/app/oracle/oradata/jzh/users01.db-dbid changed
Datafile / u01/app/oracle/oradata/jzh/test01.db-dbid changed
Datafile / u01/app/oracle/oradata/jzh/temp01.db-dbid changed
Control File / u01/app/oracle/oradata/jzh/control01.ctl-dbid changed
Control File / u01/app/oracle/fast_recovery_area/jzh/control02.ctl-dbid changed
Instance shut down
Database ID for database JZH changed to 249044244.
All previous backups and archived redo logs for this database are unusable.--- 's previous database and archive backups are now unavailable
Database is not aware of previous backups and archived logs in Recovery Area.
Database has been shutdown, open database with RESETLOGS option.---- database is opened by shutdown with resetlogs.
Succesfully changed database ID.
DBNEWID-Completed succesfully.
4. Open the database
SYS@jzh > startup mount
ORACLE instance started.
Total System Global Area 626327552 bytes
Fixed Size 2230952 bytes
Variable Size 444597592 bytes
Database Buffers 176160768 bytes
Redo Buffers 3338240 bytes
Database mounted.
SYS@jzh > alter database open resetlogs
Database altered.
5. Check the new DBID
[oracle@jzh6 ~] $rman target /
Recovery Manager: Release 11.2.0.3.0-Production on Sun Sep 13 08:50:45 2015
Copyright (c) 1982, 2011, Oracle and/or its affiliates. All rights reserved.
Connected to target database: JZH (DBID=249044244)-the new DBID
"because changing DBID invalidates previous backups, you also need to consider carefully when changing DBID."
The above is all the contents of the article "how to change the database DBID". Thank you for reading! I believe we all have a certain understanding, hope to share the content to help you, if you want to learn more knowledge, welcome to follow the industry information channel!
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.