在做异常恢复的时候,有时候会需要推进scn,网上已经有了非常多的相关资料,常见的scn推进方法比如12c之前的oradebug ,12.2之后的event 21307096等等,那么如果要恢复12.1的数据库该如何推进scn呢?
本文提供一种方法,使用gdb来推进scn
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 |
SYS@:>oradebug setmypid; Statement processed. SYS@:>oradebug dumpvar sga kcsgscn_ kcslf kcsgscn_ [06001AE70, 06001AEA0) = 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 6001AB50 00000000 gdb推进scn: [oracle@lx ~]$ ps -ef|grep -i local=yes oracle 1724 1680 0 14:32 ? 00:00:00 oraclelx (DESCRIPTION=(LOCAL=YES)(ADDRESS=(PROTOCOL=beq))) oracle 1838 1800 0 15:01 pts/1 00:00:00 grep -i local=yes [oracle@lx ~]$ gdb $ORACLE_HOME/bin/oracle 1724 GNU gdb (GDB) Red Hat Enterprise Linux (7.2-60.el6_4.1) Copyright (C) 2010 Free Software Foundation, Inc. License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html> This is free software: you are free to change and redistribute it. There is NO WARRANTY, to the extent permitted by law. Type "show copying" and "show warranty" for details. This GDB was configured as "x86_64-redhat-linux-gnu". For bug reporting instructions, please see: <http://www.gnu.org/software/gdb/bugs/>... Reading symbols from /u01/app/oracle/product/11.2/dbhome_1/bin/oracle...(no debugging symbols found)...done. Attaching to program: /u01/app/oracle/product/11.2/dbhome_1/bin/oracle, process 1724 Reading symbols from /u01/app/oracle/product/11.2/dbhome_1/lib/libodm11.so...(no debugging symbols found)...done. Loaded symbols for /u01/app/oracle/product/11.2/dbhome_1/lib/libodm11.so Reading symbols from /u01/app/oracle/product/11.2/dbhome_1/lib/libcell11.so...done. Loaded symbols for /u01/app/oracle/product/11.2/dbhome_1/lib/libcell11.so Reading symbols from /u01/app/oracle/product/11.2/dbhome_1/lib/libskgxp11.so...(no debugging symbols found)...done. Loaded symbols for /u01/app/oracle/product/11.2/dbhome_1/lib/libskgxp11.so Reading symbols from /lib64/librt.so.1...(no debugging symbols found)...done. Loaded symbols for /lib64/librt.so.1 Reading symbols from /u01/app/oracle/product/11.2/dbhome_1/lib/libnnz11.so...(no debugging symbols found)...done. Loaded symbols for /u01/app/oracle/product/11.2/dbhome_1/lib/libnnz11.so Reading symbols from /u01/app/oracle/product/11.2/dbhome_1/lib/libclsra11.so...done. Loaded symbols for /u01/app/oracle/product/11.2/dbhome_1/lib/libclsra11.so Reading symbols from /u01/app/oracle/product/11.2/dbhome_1/lib/libdbcfg11.so...(no debugging symbols found)...done. Loaded symbols for /u01/app/oracle/product/11.2/dbhome_1/lib/libdbcfg11.so Reading symbols from /u01/app/oracle/product/11.2/dbhome_1/lib/libhasgen11.so...done. Loaded symbols for /u01/app/oracle/product/11.2/dbhome_1/lib/libhasgen11.so Reading symbols from /u01/app/oracle/product/11.2/dbhome_1/lib/libskgxn2.so...(no debugging symbols found)...done. Loaded symbols for /u01/app/oracle/product/11.2/dbhome_1/lib/libskgxn2.so Reading symbols from /u01/app/oracle/product/11.2/dbhome_1/lib/libocr11.so...done. Loaded symbols for /u01/app/oracle/product/11.2/dbhome_1/lib/libocr11.so Reading symbols from /u01/app/oracle/product/11.2/dbhome_1/lib/libocrb11.so...done. Loaded symbols for /u01/app/oracle/product/11.2/dbhome_1/lib/libocrb11.so Reading symbols from /u01/app/oracle/product/11.2/dbhome_1/lib/libocrutl11.so...done. Loaded symbols for /u01/app/oracle/product/11.2/dbhome_1/lib/libocrutl11.so Reading symbols from /lib64/libaio.so.1...(no debugging symbols found)...done. Loaded symbols for /lib64/libaio.so.1 Reading symbols from /lib64/libdl.so.2...(no debugging symbols found)...done. Loaded symbols for /lib64/libdl.so.2 Reading symbols from /lib64/libm.so.6...(no debugging symbols found)...done. Loaded symbols for /lib64/libm.so.6 Reading symbols from /lib64/libpthread.so.0...(no debugging symbols found)...done. [Thread debugging using libthread_db enabled] Loaded symbols for /lib64/libpthread.so.0 Reading symbols from /lib64/libnsl.so.1...(no debugging symbols found)...done. Loaded symbols for /lib64/libnsl.so.1 Reading symbols from /lib64/libc.so.6...(no debugging symbols found)...done. Loaded symbols for /lib64/libc.so.6 Reading symbols from /lib64/ld-linux-x86-64.so.2...(no debugging symbols found)...done. Loaded symbols for /lib64/ld-linux-x86-64.so.2 Reading symbols from /usr/lib64/libnuma.so.1...(no debugging symbols found)...done. Loaded symbols for /usr/lib64/libnuma.so.1 Reading symbols from /lib64/libnss_files.so.2...(no debugging symbols found)...done. Loaded symbols for /lib64/libnss_files.so.2 Reading symbols from /u01/app/oracle/product/11.2/dbhome_1/lib/libnque11.so...(no debugging symbols found)...done. Loaded symbols for /u01/app/oracle/product/11.2/dbhome_1/lib/libnque11.so 0x0000003b0440e740 in __read_nocancel () from /lib64/libpthread.so.0 Missing separate debuginfos, use: debuginfo-install glibc-2.12-1.132.el6.x86_64 libaio-0.3.107-10.el6.x86_64 numactl-2.0.7-8.el6.x86_64 (gdb) (gdb) set *((int *) 0x06001AE70) = 0xffffffff --推base (gdb) set *((int *) 0x06001AE74) = 0x000a --推wrap SYS@:>oradebug dumpvar sga kcsgscn_ kcslf kcsgscn_ [06001AE70, 06001AEA0) = FFFFFFFF 0000000A 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 6001AB50 00000000 |