Recover a database using file-scan characters. txt

Source: Internet
Author: User

Analog failure CD/U01/ORACLE/ORADATA/ORCL Delete all cqwr_tb files [[email protected] orcl]$ RM-FR cqwr_tb_m* sql> Conn cqwr/ Cqwrconnected.sql> SELECT * from   t_lte_card_info;select * from   T_LTE_CARD_INFO                 *error at line 1:ora-01116:error in Opening database file 7ora-01110:data file 7: '/u01/oracle/oradata/orcl/cqwr_tb_m2.dbf ' ora-27041:unable to open Filelin ux-x86_64 error:2: No such file or directoryadditional information:3  found/u01/oracle/oradata/orcl/directory cqwr_tb_ M2.dbf  select a.file#,a.name,a.ts# from  v$datafile A where NAME like '%cqwr_tb% '  6  & nbsp /u01/oracle/oradata/orcl/cqwr_tb_m1.dbf    77   /u01/oracle/oradata/orcl/cqwr_TB_ m2.dbf    78   /u01/oracle/oradata/orcl/cqwr_tb_m3.dbf    79    /U01/ORACLE/ORADATA/ORCL/CQWR_TB_M4.DBF  &NBSp 7  ----!!! Don't close the database at this time!!!! ----- [[email protected] ~]$ Ps-ef | grep dBW | Grep-v greporacle   24560     1  0 11:47?         00:00:04 ora_dbw0_orcl[[email protected] ~]$ ls/proc/245624560/24562/24564/24566/24568/[[email  Protected] ~]$ ls/proc/24560/fd0  1  10  11  12  13  14  15  16  17  18   19  2  20  21  22  23  24  25  26  27  28  29  3  4  5  6  7  8  9[[email protected] ~]$ cd/proc/24560/fd[[email protected] fd]$ ls-l | grep oraclelr-x------1 Oracle oinstall jan  8 12:42 0/dev/nulllr-x------1 Oracle Oinstall jan  8 12:42 1-/dev/nulllrwx------1 Oracle Oinstall jan  8 12:42,/u01/oracle/product/10.2.0/db_1/dbs/hc_ ORCL.DATLR-X------1 Oracle Oinstall jan  8 12:42/dev/zerolr-x------1 Oracle Oinstall jan  8 12:42/dev/zerolr-x------1 Oracle Oinstall jan  8 12:42/U01/ORACLE/PRODUCT/10. 2.0/DB_1/RDBMS/MESG/ORAUS.MSBLRWX------1 Oracle Oinstall jan  8 12:42/u01/oracle/product/10.2.0/db_1/ DBS/HC_ORCL.DATLRWX------1 Oracle Oinstall jan  8 12:42/u01/oracle/product/10.2.0/db_1/dbs/ LKORCLLRWX------1 Oracle Oinstall jan  8 12:42/u01/oracle/oradata/orcl/control01.ctllrwx------1 Oracle Oinstall jan  8 12:42/u01/oracle/oradata/orcl/control02.ctllrwx------1 Oracle Oinstall jan  8 /U01/ORACLE/ORADATA/ORCL/CONTROL03.CTLLRWX------12:42 1 Oracle oinstall jan  8 12:42/u01/oracl E/ORADATA/ORCL/SYSTEM01.DBFLR-X------1 Oracle Oinstall jan  8 12:42 2/dev/nulllrwx------1 Oracle Oinstall jan  8 12:42/u01/oracle/oradata/orcl/undotbs01.dbflrwx------1 Oracle Oinstall jan  8 12:42 21 /u01/oracle/oradata/orcl/sysaux01.DBFLRWX------1 Oracle Oinstall jan  8 12:42/u01/oracle/oradata/orcl/users01.dbflrwx------1 Oracle Oi Nstall jan  8 12:42/u01/oracle/oradata/orcl/example01.dbflrwx------1 Oracle Oinstall jan  8 12: /U01/ORACLE/ORADATA/ORCL/CQWR_TB_M1.DBF (Deleted) lrwx------1 Oracle Oinstall jan  8 12:42/U 01/ORACLE/ORADATA/ORCL/TEMP01.DBFLR-X------1 Oracle Oinstall jan  8 12:42/u01/oracle/product/10.2.0/ DB_1/RDBMS/MESG/ORAUS.MSBLRWX------1 Oracle Oinstall jan  8 12:42/u01/oracle/oradata/orcl/cqwr_tb_ M2.DBF (Deleted) lrwx------1 Oracle Oinstall jan  8 12:42/u01/oracle/oradata/orcl/cqwr_tb_m3.dbf (delete d) lrwx------1 Oracle Oinstall jan  8 12:42/u01/oracle/oradata/orcl/cqwr_tb_m4.dbf (deleted) lr-x------1 Oracle Oinstall jan  8 12:42 3-/dev/nulllr-x------1 Oracle Oinstall jan  8 12:42 4-/dev/null L-WX------1 Oracle Oinstall 64jan  8 12:42 5-/U01/ORACLE/ADMIN/ORCL/UDUMP/ORCL_ORA_24549.TRCL-WX------1 Oracle Oinstall jan  8 12:42 6-/u01/oracle/admin/orcl/bdump/alert_orcl.loglrwx------1 Oracle Oinstall jan  8 12:42 7/u01/oracle/ PRODUCT/10.2.0/DB_1/DBS/LKINSTORCL (Deleted) L-WX------1 Oracle Oinstall jan  8 12:42 8/u01/oracle/admin/o RCL/BDUMP/ALERT_ORCL.LOGL-WX------1 Oracle Oinstall jan  8 12:42 9 pipe:[1280144]  You can see a few character representations ( deleted) lrwx------1 Oracle Oinstall jan  8 12:42/u01/oracle/oradata/orcl/cqwr_tb_m1.dbf (deleted) lrwx- -----1 Oracle Oinstall jan  8 12:42/u01/oracle/oradata/orcl/cqwr_tb_m2.dbf (deleted) lrwx------1 Oracle Oinstall jan  8 12:42/u01/oracle/oradata/orcl/cqwr_tb_m3.dbf (deleted) lrwx------1 Oracle Oinstall J an  8 12:42/u01/oracle/oradata/orcl/cqwr_tb_m4.dbf (deleted)   first create a new directory to copy files to the new directory Mkdir-p/u01/ ORACLE/ORADATA/ORCL/CQWR_TB copy files to the newly allocated space CP/proc/24560/fd/24/u01/oracle/oradata/orcl/cqwr_tb/cqwr_tb_m1.dbfcp/proc/24560/fd/27/u01/oracle/oradata/orcl/ CQWR_TB/CQWR_TB_M2.DBFCP/PROC/24560/FD/28/U01/ORACLE/ORADATA/ORCL/CQWR_TB/CQWR_TB_M3.DBFCP/PROC/24560/FD/29/ u01/oracle/oradata/orcl/cqwr_tb/cqwr_tb_m4.dbf  will correspond to the file offlinesql> alter database  datafile 6 offline; Sql> alter database  datafile 7 offline; Sql> alter database  datafile 8 offline; Sql> alter database  datafile 9 offline;  rename Way change data File location  alter database rename file '/u01/oracle/ Oradata/orcl/cqwr_tb_m1.dbf ' to  '/U01/ORACLE/ORADATA/ORCL/CQWR_TB/CQWR_TB_M1.DBF '; Alter DATABASE rename file ' /u01/oracle/oradata/orcl/cqwr_tb_m2.dbf ' to  '/u01/oracle/oradata/orcl/cqwr_tb/cqwr_tb_m2.dbf '; alter Database rename file '/u01/oracle/oradata/orcl/cqwr_tb_m3.dbf ' to  '/u01/oracle/oradata/orcl/cqwr_tb/cqwr_tb_ M3.DBF '; Alter DATABASE rename file '/u01/oracle/oradata/orcl/cqwr_tb_m4.dbf ' to  '/u01/oracle/oradata/orCL/CQWR_TB/CQWR_TB_M4.DBF '; recover  datafile 6;recover  datafile 7;recover  datafile 8; recover& nbsp DataFile 9;   alter database  datafile 6 online; alter database  datafile 7 online; Alter DATABASE&NBS P DataFile 8 online; alter database  datafile 9 online;  This database recovery is successful  
How----Find files [[email protected] fd]$ lsof-p 24560lsof:warning:can ' t stat () Fuse.gvfs-fuse-daemon file system/root/ .gvfs      Output information may be incomplete. command   pid   user   fd   type  device   SIZE/OFF     NODE nameoracle  24560 oracle  cwd    dir     8,3        4096  785092/u01/oracle/product/10.2.0/db_1/dbsoracle  24560 oracle  rtd    dir     8,3       4096        2/oracle  24560 oracle  txt    reg     8,3  112467986  801946/u01/oracle/product/10.2.0/db_1/bin/oracleoracle  24560 oracle  DEL     reg     0,4            3473429/ Sysv3f327308oracle  24560 oracle  mem    reg     8,3     156928 1712755/lib64/ld-2.12.sooracle  24560 oracle  mem    reg     8,3        5624 1712800/lib64/libaio.so.1.0.1oracle  24560 oracle  mem     reg     8,3    1926800 1712756/lib64/libc-2.12.sooracle  24560 Oracle   mem    reg     8,3     145896 1712757/lib64/ libpthread-2.12.sooracle  24560 oracle  mem    reg     8,3       22536 1712759/lib64/libdl-2.12.sooracle  24560 oracle  mem    REG & nbsp;   8,3      38872 1311734/usr/lib64/libnuma.so.1oracle  24560 Oracle   mem    reg     8,3    116368 1700662/lib64/libnsl-2.12.sooracle  24560 oracle  mem    CHR      1,5               3802/dev/ zerooracle  24560 oracle  mem    reg     8,3       65928 1700638/lib64/libnss_files-2.12.sooracle  24560 oracle  mem    REG      8,3     599384 1712779/lib64/libm-2.12.sooracle  24560 oracle  mem & nbsp;  reg     8,3       1552  802290/u01/oracle/ product/10.2.0/db_1/dbs/hc_orcl.datoracle  24560 oracle  mem    REG      8,3    3796601  793326/u01/oracle/product/10.2.0/db_1/lib/libnnz10.sooracle  24560 oracle  mem    reg     8,3     123345&nbsP 789754/u01/oracle/product/10.2.0/db_1/lib/libdbcfg10.sooracle  24560 oracle  mem    REG      8,3      64041  792777/u01/oracle/product/10.2.0/db_1/lib/ libclsra10.sooracle  24560 oracle  mem    reg     8,3   11385162  787604/u01/oracle/product/10.2.0/db_1/lib/libjox10.sooracle  24560 oracle  mem     reg     8,3     516097  792743/u01/oracle/product/10.2.0 /db_1/lib/libocrutl10.sooracle  24560 oracle  mem    reg     8,3      691049  792742/u01/oracle/product/10.2.0/db_1/lib/libocrb10.sooracle  24560 Oracle   mem    reg     8,3     681761  792741/u01/oracle /product/10.2.0/db_1/lib/libocr10.sooracle  24560 oracle  mem    Reg     8,3       8545  789865/u01/oracle/product/10.2.0/db _1/lib/libskgxn2.sooracle  24560 oracle  mem    reg     8,3     1772385  792776/u01/oracle/product/10.2.0/db_1/lib/libhasgen10.sooracle  24560 oracle  mem    reg     8,3     177809  792850/u01/oracle/ product/10.2.0/db_1/lib/libskgxp10.sooracle  24560 oracle    0r   CHR      1,3        0t0    3800/dev/nulloracle  24560 oracle    1r   chr     1,3        0t0    3800/dev/nulloracle  24560 oracle    2r   CHR      1,3        0t0    3800/dev/nulloracle  24560 oracle    3r   chr     1,3         0t0    3800/dev/nulloracle  24560 oracle    4r   CHR      1,3        0t0    3800/dev/nulloracle  24560 oracle    5w   reg     8,3         637  922898/u01/oracle/admin/orcl/udump/orcl_ora_24549.trcoracle  24560 oracle    6w   reg     8,3     565684  916573/u01/oracle/admin/orcl/ bdump/alert_orcl.logoracle  24560 oracle    7u   REG     8,3           0  801099/u01/oracle/product/10.2.0/db_1/dbs/ LKINSTORCL (Deleted) oracle  24560 oracle    8w   reg     8,3     565684  916573/u01/oracle/admin/orcl/bdump/alert_orcl.logoracle  24560 oracle    9w  fifo     0,8        0t0 1280144 pipeoracle  24560 oracle   10u   reg     8,3        1552  802290/u01/oracle/product/10.2.0/db_1/dbs/hc_orcl.datoracle  24560 Oracle    11r   chr     1,5        0t0     3802/dev/zerooracle  24560 oracle   12r   chr     1,5         0t0    3802/dev/zerooracle  24560 oracle    13r   reg     8,3     849408  792810/u01/oracle/ product/10.2.0/db_1/rdbms/mesg/oraus.msboracle  24560 oracle   14u   REG     8,3       1552  802290/u01/oracle/product/10.2.0/db_1/ dbs/hc_orcl.datoracle  24560 oracle   15ur  reg     8,3          24  802291/u01/oracle/product/10.2.0/db_1/dbs/lkorcloracle  24560 Oracle    16u   reg     8,3    7847936  916583/u01/oracle/ oradata/orcl/control01.ctloracle  24560 oracle   17u   REG     8,3     7847936  916584/u01/oracle/oradata/orcl/control02.ctloracle  24560 oracle   18u   reg     8,3    7847936  916585/u01/oracle/oradata/orcl/ control03.ctloracle  24560 oracle   19uw  reg     8,3  534781952  916577/u01/oracle/oradata/orcl/system01.dbforacle  24560 oracle   20uW  reg     8,3 7119839232  916579/u01/oracle/oradata/orcl/undotbs01.dbforacle  24560 oracle   21uw  reg     8,3  304095232  916578/u01/oracle/oradata/orcl/ sysaux01.dbforacle  24560 oracle   22uw  reg     8,3    5251072  916580/u01/oracle/oradata/orcl/users01.dbforacle  24560 oracle   23uW  REG      8,3  104865792  916603/u01/oracle/oradata/orcl/example01.dbforacle  24560 Oracle    24u  IPv4 1332239        0t0     UDP * : 60343 oracle  24560 oracle   25uw  reg     8,3  214966272  916599/ u01/oracle/oradata/orcl/temp01.dbforacle  24560 oracle   26r   REG      8,3     849408  792810/u01/oracle/product/10.2.0/db_1/rdbms/mesg/oraus.msboracle  24560 oracle   27uw  reg     8,3  524296192   923105/u01/oracle/oradata/orcl/cqwr_tb_m1.dbforacle  24560 oracle   28uW  REG      8,3  524296192  923106/u01/oracle/oradata/orcl/cqwr_tb_m2.dbforacle  24560 Oracle    29uw  reg     8,3  524296192  923107/u01/oracle/oradata/orcl/cqwr_ tb_m3.dbforacle  24560 oracle   30uw  reg     8,3  524296192  923108/u01/oracle/oradata/orcl/cqwr_tb_m4.dbf [[email protected] fd]$ ls0  1  10  11  12  13  14  15  16  17  18  19  2  20  21  22  23  24&nbs P 25  26  27  28  29  3  30  4  5  6  7  8  9  The corresponding FD number is 27 2 8 29 30



From for notes (Wiz)

Recover a database using file-scan characters. txt

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.