error in shutting down the dB [message #464842] |
Fri, 09 July 2010 19:44 |
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 #464882 is a reply to message #464858] |
Sat, 10 July 2010 04:19 |
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 #465375 is a reply to message #464886] |
Tue, 13 July 2010 21:10 |
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
/
|
|
|
|