Thursday, 4 July 2013

how to change DBID using NID command?

 step to change  DBID using NID command

[oracle@oracle@example dupli]$ sqlplus

SQL*Plus: Release 11.2.0.1.0 Production on Thu Jul 4 16:13:26 2013

Copyright (c) 1982, 2009, Oracle.  All rights reserved.

Enter user-name: /as sysdba
Connected to an idle instance.

SQL> startup mount;
ORACLE instance started.

Total System Global Area  422670336 bytes
Fixed Size                  1336960 bytes
Variable Size             293603712 bytes
Database Buffers          121634816 bytes
Redo Buffers                6094848 bytes
Database mounted.
SQL> exit
Disconnected from Oracle Database 11g Enterprise Edition Release 11.2.0.1.0 - Production
With the Partitioning, OLAP, Data Mining and Real Application Testing options
[oracle@oracle@example dupli]$ nid target=/

DBNEWID: Release 11.2.0.1.0 - Production on Thu Jul 4 16:13:51 2013

Copyright (c) 1982, 2009, Oracle and/or its affiliates.  All rights reserved.

Connected to database DB11G (DBID=289552766)

Connected to server version 11.2.0

Control Files in database:
    /u01/app/oracle/oradata/db11g/control01.ctl
    /u01/app/oracle/oradata/db11g/control02.ctl

Change database ID of database DB11G? (Y/[N]) => Y

Proceeding with operation
Changing database ID from 289552766 to 289542527
    Control File /u01/app/oracle/oradata/db11g/control01.ctl - modified
    Control File /u01/app/oracle/oradata/db11g/control02.ctl - modified
    Datafile /u01/app/oracle/oradata/db11g/system01.db - dbid changed
    Datafile /u01/app/oracle/oradata/db11g/sysaux01.db - dbid changed
    Datafile /u01/app/oracle/oradata/db11g/undotbs01.db - dbid changed
    Datafile /u01/app/oracle/oradata/db11g/users01.db - dbid changed
    Datafile /u01/app/oracle/oradata/db11g/temp01.db - dbid changed
    Control File /u01/app/oracle/oradata/db11g/control01.ctl - dbid changed
    Control File /u01/app/oracle/oradata/db11g/control02.ctl - dbid changed
    Instance shut down

Database ID for database DB11G changed to 289542527.
All previous backups and archived redo logs for this database are unusable.
Database is not aware of previous backups and archived logs in Recovery Area.
Database has been shutdown, open database with RESETLOGS option.
Succesfully changed database ID.
DBNEWID - Completed succesfully.

[oracle@oracle@example dupli]$
[oracle@oracle@example dupli]$ sqlplus

SQL*Plus: Release 11.2.0.1.0 Production on Thu Jul 4 16:20:36 2013

Copyright (c) 1982, 2009, Oracle.  All rights reserved.

Enter user-name: /as sysdba
Connected to an idle instance.

SQL> startup mount;
ORACLE instance started.

Total System Global Area  422670336 bytes
Fixed Size                  1336960 bytes
Variable Size             293603712 bytes
Database Buffers          121634816 bytes
Redo Buffers                6094848 bytes
Database mounted.
SQL> alter database open resetlogs;

Database altered.

SQL>  select name,open_mode from v$database;

NAME      OPEN_MODE
--------- --------------------
DB11G     READ WRITE



                                                     ***********END*****************




No comments:

Post a Comment

work on autovacuum postgreSQL parameter

 In This blog, we are discussing the auto vacuum parameter on a small scale. we will understand the below parameters and will see how to mod...