Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Mailing Lists -> Oracle-L -> RE: ora -01122

RE: ora -01122

From: <DBarbour_at_austin.isd.tenet.edu>
Date: Fri, 15 Feb 2002 13:59:16 -0800
Message-ID: <F001.004118D9.20020215135823@fatcity.com>

You can't restore a datafile from a full export. Tables and tablespaces, yes. That's why I asked about the availability of redo logs. Unfortunately, 1242 is generally a hardware error, usually a defective drive. On Sun, it sometimes is a hiccup, the drive either doesn't start or isn't seen properly for a short period, but the datafile header becomes corrupted as a result. If you're sure the drive is operating properly (get it replaced anyway), can you do a startup mount?

Your datafile recovery will go as follows: (Got this some time ago from Metalink I think - might have been off this list, or from the "Backup and Recovery Handbook" - anyway, it works, but I didn't invent it)

I'd back up the database first - and in the step to recreate the datafile, change the name and location, using:

                                                                                       
                  
                                                                   SVRMGR> alter 
database create         
                                                                   datafile            
                  
                                                                               2>      
                  
                                                                   
'/dev1/oracle/dbs/mybadfile.dbf'      
                                                                               3> as   
                  
                                                                            4>         
                  
                                                                   
'/dev2/oracle/dbs/mygoodnewfile.dbf'; 
                                                                                       
                  
                                                                                       
                  




                                                                                       
             
                                                                    SVRMGR>startup 
mount            
                                                                                       
             
                                                                    SVRMGR> select * 
from           
                                                                   v$recover_file;     
             
                                                                                       
             
                                                                                       
             
                                                                     SAMPLE:           
             
                                                                                       
             
                                                                     FILE#      ONLINE 
 ERROR       
                                                                   CHANGE#    TIME     
             
                                                                     ---------- 
-------             
                                                                   ------------------ 
----------    
                                                                   
--------------------             
                                                                     11 OFFLINE FILE 
NOT FOUND      
                                                                   0 01/01/88 00:00:00 
             
                                                                                       
             

(Noting the file
number that was reported in the error) SVRMGR> select * from v$datafile where FILE#=11; SAMPLE: FILE# STATUS ENABLED CHECKPOINT BYTES CREATE_BYT NAME ---------- ------- ---------- ---------- ---------- ---------- -------- 11 RECOVER READ WRITE 4.9392E+12 0 10240 /tmp/sample.dbf
(Note the status
is RECOVER and the CREATE_BYTE size)
(Note the NAME)
Recreate the datafile. SVRMGR> alter database create datafile '/tmp/sample.dbf' as '/tmp/sample.dbf' size 10240 reuse. (Note that the file "created" and the file created "as" are the same file. The "size" needs to be the same size as it was when it was created.) Check to see that it was successful. SVRMGR> select * from v$datafile where FILE#=11; Bring the file online. SVRMGR> alter database datafile '/tmp/sample.dbf' online; Recover the datafile. SVRMGR> Recover database; Then - SVRMGR> alter database open;

David A. Barbour
Oracle DBA, OCP
AISD
512-414-1002

                                                                                       
                             
                    Hamid Alavi                                                        
                             
                    <hamid.alavi_at_qu       To:     Multiple recipients of list ORACLE-L 
<ORACLE-L_at_fatcity.com>       
                    ovadx.com>            cc:                                          
                             
                    Sent by:              Subject:     RE: ora -01122                  
                             
                    root_at_fatcity.co                                                    
                             
                    m                                                                  
                             
                                                                                       
                             
                                                                                       
                             
                    02/14/2002                                                         
                             
                    05:03 PM                                                           
                             
                    Please respond                                                     
                             
                    to ORACLE-L                                                        
                             
                                                                                       
                             
                                                                                       
                             




Here is the result of all trace file & log file:

/u01/app/oracle/admin/HNCMS/bdump/hncms_ckpt_3130.trc Oracle8i Enterprise Edition Release 8.1.6.0.0 - Production With the Partitioning option
JServer Release 8.1.6.0.0 - Production
ORACLE_HOME = /u01/app/oracle

System name:         SunOS
Node name:           hollywood
Release:        5.7
Version:        Generic_106541-11
Machine:        sun4u

Instance name: HNCMS
Redo thread mounted by this instance: 1
Oracle process number: 5
Unix process pid: 3130, image: oracle_at_hollywood (CKPT)

Really appreciate your help.
I just want to open the database, then I can restore the file from full export.

-----Original Message-----
Sent: Thursday, February 14, 2002 1:19 PM To: Multiple recipients of list ORACLE-L

[Hamid Alavi]
> Database shutdown by itseld(don't know why) then I try to started get the > error for datafile.

Anything helpful in the alert log? Like, I/O errors during archiving so once all online redo logs needed archiving, the instance stopped accepting transactions? Just a guess

--
James Manning <jmm_at_sublogic.com>
GPG Key fingerprint = B913 2FBD 14A9 CE18 B2B7  9C8E A0BF B026 EEBB F6E4
--
Please see the official ORACLE-L FAQ: http://www.orafaq.com
--
Author: James Manning
  INET: oracle_at_sublogic.com

Fat City Network Services    -- (858) 538-5051  FAX: (858) 538-5051
San Diego, California        -- Public Internet access / Mailing Lists
--------------------------------------------------------------------
To REMOVE yourself from this mailing list, send an E-Mail message
to: ListGuru_at_fatcity.com (note EXACT spelling of 'ListGuru') and in
the message BODY, include a line containing: UNSUB ORACLE-L
(or the name of mailing list you want to be removed from).  You may
also send the HELP command for other information (like subscribing).
The information contained in this message and any attachments is intended
only for the use of the individual or entity to which it is addressed, and
may contain information that is PRIVILEGED, CONFIDENTIAL and exempt from
disclosure under applicable law. If you have received this message in
error,
you are prohibited from copying, distributing, or using the information.
Please contact the sender immediately by return e-mail and delete the
original message from your system.
--
Please see the official ORACLE-L FAQ: http://www.orafaq.com
--
Author: Hamid Alavi
  INET: hamid.alavi_at_quovadx.com

Fat City Network Services    -- (858) 538-5051  FAX: (858) 538-5051
San Diego, California        -- Public Internet access / Mailing Lists
--------------------------------------------------------------------
To REMOVE yourself from this mailing list, send an E-Mail message
to: ListGuru_at_fatcity.com (note EXACT spelling of 'ListGuru') and in
the message BODY, include a line containing: UNSUB ORACLE-L
(or the name of mailing list you want to be removed from).  You may
also send the HELP command for other information (like subscribing).




-- 
Please see the official ORACLE-L FAQ: http://www.orafaq.com
-- 
Author: 
  INET: DBarbour_at_austin.isd.tenet.edu

Fat City Network Services    -- (858) 538-5051  FAX: (858) 538-5051
San Diego, California        -- Public Internet access / Mailing Lists
--------------------------------------------------------------------
To REMOVE yourself from this mailing list, send an E-Mail message
to: ListGuru_at_fatcity.com (note EXACT spelling of 'ListGuru') and in
the message BODY, include a line containing: UNSUB ORACLE-L
(or the name of mailing list you want to be removed from).  You may
also send the HELP command for other information (like subscribing).
Received on Fri Feb 15 2002 - 15:59:16 CST

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US