Search This Blog

Thursday, March 24, 2011

NID-00111: Oracle error reported from target database

I was restoring an Oracle 10g database using RMAN from our production environment to a development environment. I had completed most of the necessary steps, and the database was restored and recovered up to the point in time that I wanted.

The next step was to run the NID command in order to change the name of the database. I made sure that I was using the Oracle 10g NID utility and not the 9i version and ran it. I got the following error:

NID-00111: Oracle error reported from target database while executing
begin dbms_backup_restore.nidprocessdf(:fno, :istemp, :skipped, :idchged, :nmchged); end;
ORA-01116: error in opening database file R:\ORACLE\DATA\TEMP01.DBF
ORA-27041: unable to open file
OSD-04002: unable to open file
O/S-Error: (OS 3) The system cannot find the path specified.
ORA-06512: at "SYS.X$DBMS_BACKUP_RESTORE", line 6185
ORA-06512: at line 1

In order to get the NID utility to run successfully, I had to log into the database and manually drop the TEMP files, then add TEMP files again using the following commands:

SQL> ALTER DATABASE TEMPFILE 'R:\ORACLE\DATA\TEMP01.DBF' DROP;
SQL> !rm 'R:\ORACLE\DATE\TEMP01.DBF'
SQL> ALTER TABLESPACE TEMP1 ADD TEMPFILE 'R:\ORACLE\DATA\TEMP01.DBF' SIZE 100M;

You can also read my article on how to drop TEMP files for more details on dropping TEMP files.

It seemed very odd that I had to do this because I’ve never had to do it with a 9i database, and I didn’t think that the TEMP files were needed. RMAN certainly doesn’t back them up. So, if you have a NID command scripted into anywhere and you come across this, make sure that you put the extra step in of dropping the TEMP files first.

No comments:

Post a Comment

leave your message if you need help ...

Related Posts with Thumbnails