Home » RDBMS Server » Server Administration » error in shutting down the dB (Oracle 10g R2, 10.2.0.4.0, Solaris 10)
error in shutting down the dB [message #464842] Fri, 09 July 2010 19:44 Go to next message
reym21
Messages: 241
Registered: February 2010
Location: Philippines
Senior Member

I was surprised when I shutdown our production dB. I got this error:

$ . oraenv
ORACLE_SID = [abcd] ?

SQL> shutdown
ORA-01116: error in opening database file 26
ORA-01110: data file 26: '/VOL03/oradata/qxyz/data/qxyz_data01.dbf'
ORA-27041: unable to open file
SVR4 Error: 2: No such file or directory
Additional information: 3
SQL> shutdown abort
ORACLE instance shut down.

2 days ago i rename this file QXYZ_DATA01.dbf from it's original name of QXYZ01.dbf without knowing that I was in the 'abcd' instance. When I backup a controlfile I noticed that it was part of the 'abcd' data files, so I just delete it (from OS level).

What should I do now? Is there any risk involved in the 'abcd' instance? How do I get rid of that file 'qxyz_data01.dbf' in the 'abcd' instance.

Thanks again.
Re: error in shutting down the dB [message #464844 is a reply to message #464842] Fri, 09 July 2010 19:54 Go to previous messageGo to next message
BlackSwan
Messages: 26766
Registered: January 2009
Location: SoCal
Senior Member
Which part of the Posting Guidelines ( http://www.orafaq.com/forum/t/88153/0/ ) did you NOT read & follow?
Was it the part about using SEARCH ( http://www.orafaq.com/forum/s/136107/ ) or GOOGLE ( http://google.com ) before posting?

http://www.mydigitallife.info/2007/08/04/how-drop-tablespace-and-recover-oracle-database-when-accidentally-delete-datafile/
Re: error in shutting down the dB [message #464846 is a reply to message #464842] Fri, 09 July 2010 21:13 Go to previous messageGo to next message
reym21
Messages: 241
Registered: February 2010
Location: Philippines
Senior Member

I'm sorry for this. For now, ORAFAQ have been helping me alot in terms of immediate response from experienced DBAs like you. It will not happened again.

Many thanks for posting the link.

But would it be possible of just copying (OS level) the original files to its original path then restart the dB?

Thanks again.
Re: error in shutting down the dB [message #464847 is a reply to message #464846] Fri, 09 July 2010 21:16 Go to previous messageGo to next message
BlackSwan
Messages: 26766
Registered: January 2009
Location: SoCal
Senior Member
>But would it be possible of just copying (OS level) the original files to its original path then restart the dB?
SCN will not match rest of DB.
Is DB running with archive mode enabled?
Re: error in shutting down the dB [message #464848 is a reply to message #464847] Fri, 09 July 2010 21:30 Go to previous messageGo to next message
reym21
Messages: 241
Registered: February 2010
Location: Philippines
Senior Member

Regarding the ARCHIVE MODE I think it is set to TRUE.
If NOT (FALSE), what's the implications? Btw, what is SCN?

Thanks for your help.
Re: error in shutting down the dB [message #464849 is a reply to message #464848] Fri, 09 July 2010 22:09 Go to previous messageGo to next message
BlackSwan
Messages: 26766
Registered: January 2009
Location: SoCal
Senior Member
> Btw, what is SCN?
Which part of the Posting Guidelines ( http://www.orafaq.com/forum/t/88153/0/ ) did you NOT read & follow?
Was it the part about using SEARCH ( http://www.orafaq.com/forum/s/136107/ ) or GOOGLE ( http://google.com ) before posting?


http://www.orafaq.com/wiki/SCN

[Updated on: Fri, 09 July 2010 22:23]

Report message to a moderator

Re: error in shutting down the dB [message #464853 is a reply to message #464849] Fri, 09 July 2010 23:44 Go to previous messageGo to next message
reym21
Messages: 241
Registered: February 2010
Location: Philippines
Senior Member

Ok sir. Now if the SCN is not synchronized or not matched, is this critical for the affected db itself (althought the said datafile is not a part of the said db)?
Re: error in shutting down the dB [message #464854 is a reply to message #464853] Sat, 10 July 2010 00:01 Go to previous messageGo to next message
BlackSwan
Messages: 26766
Registered: January 2009
Location: SoCal
Senior Member
I am unclear exactly what your goal is now.

The easier task is to get the database open & online accepting the fact that data within qxyz_data01.dbf will not be available.

The more difficult task & potentially impossible task is to recover the data within qxyz_data01.dbf.

Re: error in shutting down the dB [message #464856 is a reply to message #464854] Sat, 10 July 2010 00:23 Go to previous messageGo to next message
reym21
Messages: 241
Registered: February 2010
Location: Philippines
Senior Member

Ok, actually qxyz_data01.dbf belongs to 'QXYZ' instance that was newly created a week ago (we just awaiting directions from the Project Manager on the structures & data involved on it). There is no associated critical files or users on it right now, it's part of a newly created datafiles.

'ABCD' instance is the critical one, but as I mentioned, it was a mistake that I rename a datafile belonging to QXYZ while I'm in the ABCD instance.

Thanks for your patience.
Re: error in shutting down the dB [message #464858 is a reply to message #464856] Sat, 10 July 2010 00:32 Go to previous messageGo to next message
BlackSwan
Messages: 26766
Registered: January 2009
Location: SoCal
Senior Member
>'ABCD' instance is the critical one, but as I mentioned, it was a mistake that I rename a datafile belonging to QXYZ while I'm in the ABCD instance.
post extract from alert_ABCD.log that show error that needs to be resolved.
Re: error in shutting down the dB [message #464882 is a reply to message #464858] Sat, 10 July 2010 04:19 Go to previous messageGo to next message
suntrupth
Messages: 13
Registered: July 2010
Junior Member
If you do not know exactly what you are looking for and how to resolve the issue.
Do you have a complete cold backup of your database?

If yes, go ahead and restore it. As simple as it can get.

Thanks,
Suntrupth
Re: error in shutting down the dB [message #464886 is a reply to message #464858] Sat, 10 July 2010 04:50 Go to previous messageGo to next message
reym21
Messages: 241
Registered: February 2010
Location: Philippines
Senior Member

alert_ABCD.log
===============================================================
Sat Jul 10 08:27:03 2010
Shutting down instance: further logons disabled
Sat Jul 10 08:27:06 2010
Errors in file /appl1/home/oracle/admin/abcd/udump/abcd_ora_28707.trc:
ORA-01110: data file 26: '/VOL03/oradata/qxyz/data/qxyz_data01.dbf'
ORA-01116: error in opening database file 26
ORA-01110: data file 26: '/VOL03/oradata/qxyz/data/qxyz_data01.dbf'
ORA-27041: unable to open file
SVR4 Error: 2: No such file or directory
Additional information: 3
Sat Jul 10 08:27:56 2010
Shutting down instance: further logons disabled
Sat Jul 10 08:27:56 2010
Errors in file /appl1/home/oracle/admin/abcd/udump/abcd_ora_28934.trc:
ORA-01110: data file 26: '/VOL03/oradata/qxyz/data/qxyz_data01.dbf'
ORA-01116: error in opening database file 26
ORA-01110: data file 26: '/VOL03/oradata/qxyz/data/qxyz_data01.dbf'
ORA-27041: unable to open file
SVR4 Error: 2: No such file or directory
Additional information: 3
Sat Jul 10 08:29:03 2010
Shutting down instance: further logons disabled
Sat Jul 10 08:29:03 2010
Errors in file /appl1/home/oracle/admin/abcd/udump/abcd_ora_28974.trc:
ORA-01110: data file 26: '/VOL03/oradata/qxyz/data/qxyz_data01.dbf'
ORA-01116: error in opening database file 26
ORA-01110: data file 26: '/VOL03/oradata/qxyz/data/qxyz_data01.dbf'
ORA-27041: unable to open file
SVR4 Error: 2: No such file or directory
Additional information: 3
Sat Jul 10 08:36:22 2010
Shutting down instance: further logons disabled
Sat Jul 10 08:36:22 2010
Errors in file /appl1/home/oracle/admin/abcd/udump/abcd_ora_29209.trc:
ORA-01110: data file 26: '/VOL03/oradata/qxyz/data/qxyz_data01.dbf'
ORA-01116: error in opening database file 26
ORA-01110: data file 26: '/VOL03/oradata/qxyz/data/qxyz_data01.dbf'
ORA-27041: unable to open file
SVR4 Error: 2: No such file or directory
============================================================

I started the dB by this command:

SQL> startup mount;
ORA-01081: cannot start already-running ORACLE - shut it down first
SQL> alter database datafile '/VOL03/oradata/qxyz/data/qxyz_data01.dbf' offline drop;

Database altered.

SQL> alter database open;

Database altered.

SQL> select * from v$instance;

INSTANCE_NUMBER INSTANCE_NAME
--------------- ----------------
HOST_NAME
----------------------------------------------------------------
VERSION STARTUP_T STATUS PAR THREAD# ARCHIVE LOG_SWITCH_WAIT
----------------- --------- ------------ --- ---------- ------- ---------------
LOGINS SHU DATABASE_STATUS INSTANCE_ROLE ACTIVE_ST BLO
---------- --- ----------------- ------------------ --------- ---
1 abcd
xxx-xxx
10.2.0.4.0 10-JUL-10 OPEN NO 1 STARTED
ALLOWED NO ACTIVE PRIMARY_INSTANCE NORMAL NO

The ABCD is now open and accessible to users...
What should I do next (maybe next week) is to drop the qxyz datafile that doesn't belong to ABCD db.
Re: error in shutting down the dB [message #465375 is a reply to message #464886] Tue, 13 July 2010 21:10 Go to previous messageGo to next message
trantuananh24hg
Messages: 744
Registered: January 2007
Location: Ha Noi, Viet Nam
Senior Member
reym21 wrote on Sat, 10 July 2010 16:50


I started the dB by this command:
SQL> startup mount;
ORA-01081: cannot start already-running ORACLE - shut it down first
SQL> alter database datafile '/VOL03/oradata/qxyz/data/qxyz_data01.dbf' offline drop;

Database altered.

SQL> alter database open;

Database altered.



Well, you drop the datafile QXYZ_DATA01, and, of course, you would opened database. But, any data located on the datafile was disappeared.

Quote:

The ABCD is now open and accessible to users...
What should I do next (maybe next week) is to drop the qxyz datafile that doesn't belong to ABCD db.


Recheck what datafile belong to what tablespace. v$datafile, v$tablespace or dba_tablespaces, dba_data_files.

Use the script to check them
SELECT   /*+ ordered */
            d.tablespace_name TABLESPACE, d.file_name filename,
            d.BYTES filesize, d.autoextensible autoextensible,
            d.increment_by * e.VALUE increment_by, d.maxbytes maxbytes
       FROM SYS.dba_data_files d,
            v$datafile v,
            (SELECT VALUE
               FROM v$parameter
              WHERE NAME = 'db_block_size') e
      WHERE (d.file_name = v.NAME)
   UNION
   SELECT   d.tablespace_name TABLESPACE, d.file_name filename,
            d.BYTES filesize, d.autoextensible autoextensible,
            d.increment_by * e.VALUE increment_by, d.maxbytes maxbytes
       FROM SYS.dba_temp_files d,
            (SELECT VALUE
               FROM v$parameter
              WHERE NAME = 'db_block_size') e
   UNION
   SELECT   '[ ONLINE REDO LOG ]', a.MEMBER, b.BYTES, NULL, TO_NUMBER (NULL),
            TO_NUMBER (NULL)
       FROM v$logfile a, v$log b
      WHERE a.group# = b.group#
   UNION
   SELECT   '[ CONTROL FILE    ]', a.NAME, TO_NUMBER (NULL), NULL,
            TO_NUMBER (NULL), TO_NUMBER (NULL)
       FROM v$controlfile a
   ORDER BY 1, 2
/




Re: error in shutting down the dB [message #465398 is a reply to message #465375] Wed, 14 July 2010 01:37 Go to previous message
Michel Cadot
Messages: 68718
Registered: March 2007
Location: Saint-Maur, France, https...
Senior Member
Account Moderator
Your scritpt ages from Oracle8, you have to know that now each tablespace can have different block size, and so on...

Regards
Michel
Previous Topic: Disabling all DBMS_SCHEDULER jobs
Next Topic: Need to know in which tablespace/datafile my table is located
Goto Forum:
  


Current Time: Fri Nov 29 08:32:05 CST 2024