PROBLEMAS EN EL CAMBIO DE NOMBRE CON NID.
Cuando cambiamos el nombre de la base despues de un restore, que generalmente sucede cuando nos solicitan rearmar un ambiente de testeo los pasos que seguimos son sencillos, usar NID y listo.
Ahora, que sucede cuando la base no se cierra ordenamente ?
No vamos a poder hacer el cambio de nombre.
Supongamos que yo bajo la base de apuro o por otro problemas con SHUTDOWN ABORT.
ORA-01013: user requested cancel of current operation SQL> shutdown abort ORACLE instance shut down. SQL> startup nomount ORACLE instance started. Total System Global Area 536870912 bytes Fixed Size 2085288 bytes Variable Size 192941656 bytes Database Buffers 335544320 bytes Redo Buffers 6299648 bytes
La Base en el proximo STARTUP, va a querer aplicar el recovery para que todo los datos queden consistentemente.
Y nosotros para poder aplicar NID, tenemos que tener la base en modo mount.
Ahi vamos a tener un conflicto, NID-00135: There are number active threads.
[oracle@copernico01lx bin]$ nid target=sys as sysdba dbname=DARP1 DBNEWID: Release 10.2.0.4.0 - Production on Wed Mar 24 10:55:21 2010 Copyright (c) 1982, 2007, Oracle. All rights reserved. Password:Connected to database DARP1 (DBID=442532441) NID-00135: There are 1 active threads Change of database name failed during validation - database is intact. DBNEWID - Completed with validation errors.
Adjunto la referencia oficial del error.
Re: NID-00135: There are number active threadsAnswer# 1 Cause: is that the database crashed the last time it wasshut down. Action: Ensure that all threads are closed before retryingthe operation. Start and open the database to perform crashrecovery, then shut down with the NORMAL or IMMEDIATE options to close it cleanly. Finally, try running theutility again.
Abrimos la base en forma ordenada, asi aplica todo lo que se almaceno en los REDO.
[oracle@copernico01lx bin]$ nid target=sys as sysdba dbname=DARP1 SQL> alter database open; Database altered.
Una vez que el proceso concluyo bien procedemos a bajar la base y ponerla en modo MOUNT.
SQL> shutdown immediate Database closed.Database dismounted. ORACLE instance shut down. SQL> startup mountORACLE instance started. Total System Global Area 536870912 bytes Fixed Size 2085288 bytes Variable Size 192941656 bytes Database Buffers 335544320 bytes Redo Buffers 6299648 bytes
Ahora podemos comprobar que podemos ejecutar NID sin problemas.
[oracle@copernico01lx bin]$ nid target=sys as sysdba dbname=DARP1 DBNEWID: Release 10.2.0.4.0 - Production on Wed Mar 24 11:03:48 2010 Copyright (c) 1982, 2007, Oracle. All rights reserved. Password:Connected to database DARP1 (DBID=442532441) Connected to server version 10.2.0 Control Files in database:+DATA/DARP1/controlfile/current.1427.714421289 Change database ID and database name DARP1 to DARP1? (Y/[N]) => Y
Siamo spiacenti, ho eliminato il problema
LikeLike
Hello fellas! How will you be today?
LikeLike