标签云
asm恢复 bbed bootstrap$ dul In Memory kcbzib_kcrsds_1 kccpb_sanity_check_2 MySQL恢复 ORA-00312 ORA-00607 ORA-00704 ORA-00742 ORA-01110 ORA-01555 ORA-01578 ORA-01595 ORA-08103 ORA-600 2131 ORA-600 2662 ORA-600 3020 ORA-600 4000 ORA-600 4137 ORA-600 4193 ORA-600 4194 ORA-600 16703 ORA-600 kcbzib_kcrsds_1 ORA-600 KCLCHKBLK_4 ORA-15042 ORA-15196 ORACLE 12C oracle dul ORACLE PATCH Oracle Recovery Tools oracle加密恢复 oracle勒索 oracle勒索恢复 oracle异常恢复 Oracle 恢复 ORACLE恢复 ORACLE数据库恢复 oracle 比特币 OSD-04016 YOUR FILES ARE ENCRYPTED 勒索恢复 比特币加密文章分类
- Others (2)
- 中间件 (2)
- WebLogic (2)
- 操作系统 (103)
- 数据库 (1,767)
- DB2 (22)
- MySQL (77)
- Oracle (1,608)
- Data Guard (52)
- EXADATA (8)
- GoldenGate (24)
- ORA-xxxxx (166)
- ORACLE 12C (72)
- ORACLE 18C (6)
- ORACLE 19C (15)
- ORACLE 21C (3)
- Oracle 23ai (8)
- Oracle ASM (69)
- Oracle Bug (8)
- Oracle RAC (54)
- Oracle 安全 (6)
- Oracle 开发 (28)
- Oracle 监听 (29)
- Oracle备份恢复 (590)
- Oracle安装升级 (97)
- Oracle性能优化 (62)
- 专题索引 (5)
- 勒索恢复 (86)
- PostgreSQL (30)
- pdu工具 (6)
- PostgreSQL恢复 (9)
- SQL Server (32)
- SQL Server恢复 (13)
- TimesTen (7)
- 达梦数据库 (3)
- 达梦恢复 (1)
- 生活娱乐 (2)
- 至理名言 (11)
- 虚拟化 (2)
- VMware (2)
- 软件开发 (39)
- Asp.Net (9)
- JavaScript (12)
- PHP (2)
- 小工具 (22)
-
最近发表
- ORA-00756 ORA-10567故障数据0丢失恢复
- 数据库文件变成32k故障恢复
- tcp连接过多导致监听TNS-12532 TNS-12560 TNS-00502错误
- 文件系统格式化MySQL数据库恢复
- .sstop勒索加密数据库恢复
- 解决一次硬件恢复之后数据文件0kb的故障恢复case
- Error in invoking target ‘libasmclntsh19.ohso libasmperl19.ohso client_sharedlib’问题处理
- ORA-01171: datafile N going offline due to error advancing checkpoint
- linux环境oracle数据库被文件系统勒索加密为.babyk扩展名溯源
- ORA-600 ksvworkmsgalloc: bad reaper
- ORA-600 krccfl_chunk故障处理
- Oracle Recovery Tools恢复案例总结—202505
- ORA-600 kddummy_blkchk 数据库循环重启
- 记录一次asm disk加入到vg通过恢复直接open库的案例
- CHECKDB 发现了 N 个分配错误和 M 个一致性错误
- 达梦数据库dm.ctl文件异常恢复
- Oracle Recovery Tools修复ORA-00742、ORA-600 ktbair2: illegal inheritance故障
- 可能是 tempdb 空间用尽或某个系统表不一致故障处理
- 11.2.0.4库中遇到ORA-600 kcratr_nab_less_than_odr报错
- [MY-013183] [InnoDB] Assertion failure故障处理
月归档:十一月 2012
使用dbms_pumpdata执行expdp操作
使用dbms_pumpdata执行expdp操作
set serverout on declare h1 number; -- Datapump handle dir_name varchar2(30); -- Directory Name job_status VARCHAR2(30); begin dir_name := 'DATA_PUMP_DIR'; h1 := dbms_datapump.open( operation =>'EXPORT', --是export还是impport --导出表配置 job_mode =>'TABLE', --job_mode可以为SCHEMA/TABLE等 --导出用户配置 job_mode =>'SCHEMA', remote_link => NULL, --是否使用dblink导出(就是NETWORK_LINK) job_name =>'TABLE_XFF' --job_name expdpjob的名称 ); dbms_datapump.add_file(handle =>h1, filename => 'XIFENFEI.DMP', directory => dir_name, filetype => DBMS_DATAPUMP.KU$_FILE_TYPE_DUMP_FILE, reusefile => 1); -- value of 1 instructs to overwrite existing file dbms_datapump.add_file(handle =>h1, filename => 'XIFENFEI.LOG', directory => dir_name, filetype => DBMS_DATAPUMP.KU$_FILE_TYPE_LOG_FILE, reusefile => 1); --导出表配置 dbms_datapump.metadata_filter(handle =>h1, name => 'TABLE_FILTER', value => 'CHF.T_XIFENFEI'); --导出用户配置 dbms_datapump.metadata_filter (handle => dp_handle, name => 'SCHEMA_EXPR', value => 'IN (''CHF'')'); -- Start the job. dbms_datapump.start_job(h1); dbms_datapump.wait_for_job (handle => dp_handle, job_state => job_status); dbms_output.put_line ('DataPump Export - '||to_char(sysdate,'DD/MM/YYYY HH24:MI:SS')||' Status '||job_status); begin dbms_datapump.detach(handle => h1); end; end; /
awrload导入awr数据出现两种常见错误说明
ORA-06502/ORA-06512错误
SQL> @?/rdbms/admin/awrload.sql ~~~~~~~~~~ AWR LOAD ~~~~~~~~~~ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ~ This script will load the AWR data from a dump file. The ~ ~ script will prompt users for the following information: ~ ~ (1) name of directory object ~ ~ (2) name of dump file ~ ~ (3) staging schema name to load AWR data into ~ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Specify the Directory Name ~~~~~~~~~~~~~~~~~~~~~~~~~~ Directory Name Directory Path ------------------------------ ------------------------------------------------- DATA_PUMP_DIR /u01/oracle/admin/ora11g/dpdump/ ORACLE_OCM_CONFIG_DIR /u01/oracle/oracle/product/11.2.0/db_1/ccr/state XMLDIR /u01/oracle/oracle/product/11.2.0/db_1/rdbms/xml Choose a Directory Name from the list above (case-sensitive). Enter value for directory_name: DATA_PUMP_DIR Using the dump directory: DATA_PUMP_DIR Specify the Name of the Dump File to Load ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Please specify the prefix of the dump file (.dmp) to load: Enter value for file_name: awrdat_70441_70885-vpos-primary Loading from the file name: awrdat_70441_70885-vpos-primary.dmp begin * ERROR at line 1: ORA-06502: PL/SQL: numeric or value error: character string buffer too small ORA-06512: at line 2
因为导出来的awr数据库的编码是AL32UTF8,而现在的编码是ZHS16GBK,所以解决方法是设置NLS_LANG为合适编码
[oracle@xifenfei ~]$ env|grep NLS_LANG NLS_LANG=AMERICAN_AMERICA.ZHS16GBK [oracle@xifenfei ~]$ export NLS_LANG=AMERICAN_AMERICA.AL32UTF8
ORA-31640
SQL> @?/rdbms/admin/awrload.sql ~~~~~~~~~~ AWR LOAD ~~~~~~~~~~ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ~ This script will load the AWR data from a dump file. The ~ ~ script will prompt users for the following information: ~ ~ (1) name of directory object ~ ~ (2) name of dump file ~ ~ (3) staging schema name to load AWR data into ~ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Specify the Directory Name ~~~~~~~~~~~~~~~~~~~~~~~~~~ Directory Name Directory Path ------------------------------ ------------------------------------------------- DATA_PUMP_DIR /u01/oracle/admin/ora11g/dpdump/ ORACLE_OCM_CONFIG_DIR /u01/oracle/oracle/product/11.2.0/db_1/ccr/state XMLDIR /u01/oracle/oracle/product/11.2.0/db_1/rdbms/xml Choose a Directory Name from the list above (case-sensitive). Enter value for directory_name: DATA_PUMP_DIR Using the dump directory: DATA_PUMP_DIR Specify the Name of the Dump File to Load ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Please specify the prefix of the dump file (.dmp) to load: Enter value for file_name: awrdat_70441_70885-vpos-primary <--注意输入 Loading from the file name: awrdat_70441_70885-vpos-primary.dmp ………… | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ | Loading the AWR data from the following | directory/file: | /u01/oracle/admin/ora11g/dpdump/ | awrdat_70441_70885-vpos-primar.dmp <--提示的文件名 | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ | | *** AWR Load Started ... | | This operation will take a few moments. The | progress of the AWR load operation can be | monitored in the following directory/file: | /u01/oracle/admin/ora11g/dpdump/ | awrdat_70441_70885-vpos-primar.log | DBMS_DATAPUMP.ADD_FILE(dump file) ORA-39001: invalid argument value Exception encountered in AWR_LOAD begin * ERROR at line 1: ORA-20115: datapump import encountered error: ORA-39001: invalid argument value ORA-39000: bad dump file specification ORA-31640: unable to open dump file "/u01/oracle/admin/ora11g/dpdump/awrdat_70441_70885-vpos-primar.dmp" for read ORA-27037: unable to obtain file status Linux Error: 2: No such file or directory Additional information: 3 ORA-06512: at "SYS.DBMS_SWRF_INTERNAL", line 1717 ORA-06512: at line 3 begin * ERROR at line 1: ORA-20106: AWR tables do not exist for the 'AWR_STAGE' user ORA-06512: at "SYS.DBMS_SWRF_INTERNAL", line 2920 ORA-00942: table or view does not exist ORA-06512: at line 3 ... Dropping AWR_STAGE user End of AWR Load
这里我们可以看到,dmp文件名为31个字符,而在提示文件名的时候是30个字符,从而出现了dmp文件不存在而导致的相关错误,解决方案重命名dmp文件,名称不超过30个字符
windows中使用dd程序
很多习惯了Linux和Uinx的人都困惑windows中没有dd这样的好命令,经过不懈的努力终于发现了win dd
帮助命令
E:\>dd --help rawwrite dd for windows version 0.6beta3. Written by John Newbigin <jn@it.swin.edu.au> This program is covered by terms of the GPL Version 2. dd [bs=SIZE] [count=BLOCKS] [if=FILE] [of=FILE] [seek=BLOCKS] [skip=BLOCKS] [--size] [--list] [--progress] SIZE and BLOCKS may have one of the following suffix: k = 1024 M = 1048576 G = 1073741824 default block size (bs) is 512 bytes skip specifies the starting offset of the input file (if) seek specifies the starting offset of the output file (of)
磁盘列表
E:\>dd --list rawwrite dd for windows version 0.6beta3. Written by John Newbigin <jn@it.swin.edu.au> This program is covered by terms of the GPL Version 2. Win32 Available Volume Information \\.\Volume{7cf2f59c-6207-11e1-b81a-806e6f6e6963}\ link to \\?\Device\HarddiskVolume1 fixed media Mounted on \\.\c: \\.\Volume{9ba58399-a85a-11e1-b19f-005056c00008}\ link to \\?\Device\HarddiskVolume5 removeable media Mounted on \\.\h: \\.\Volume{7cf2f59d-6207-11e1-b81a-806e6f6e6963}\ link to \\?\Device\HarddiskVolume2 fixed media Mounted on \\.\d: \\.\Volume{7cf2f59e-6207-11e1-b81a-806e6f6e6963}\ link to \\?\Device\HarddiskVolume3 fixed media Mounted on \\.\e: \\.\Volume{7cf2f59f-6207-11e1-b81a-806e6f6e6963}\ link to \\?\Device\HarddiskVolume4 fixed media Mounted on \\.\f: \\.\Volume{d0f53c6a-6272-11e1-8729-806e6f6e6963}\ link to \\?\Device\CdRom0 CD-ROM Mounted on \\.\g: NT Block Device Objects \\?\Device\CdRom0 size is 2147483647 bytes Virtual input devices /dev/zero (null data) /dev/random (pseudo-random data) - (standard input) Virtual output devices - (standard output) /dev/null (discard the data)
拷贝磁盘头(asm修复常见)
E:\>dd if=\\.\Volume{9ba58399-a85a-11e1-b19f-005056c00008} of=f:\usb.img bs=1M count=10 rawwrite dd for windows version 0.6beta3. Written by John Newbigin <jn@it.swin.edu.au> This program is covered by terms of the GPL Version 2. 10+0 records in 10+0 records out E:\>dir f:\usb.img 驱动器 F 中的卷没有标签。 卷的序列号是 000F-FFCB f:\ 的目录 2012/11/13 23:39 10,485,760 usb.img 1 个文件 10,485,760 字节 0 个目录 30,501,912,576 可用字节
拷贝文件
E:\>dd if=f:\usb.img of=f:\usb_new.img bs=1M count=5 rawwrite dd for windows version 0.6beta3. Written by John Newbigin <jn@it.swin.edu.au> This program is covered by terms of the GPL Version 2. 5+0 records in 5+0 records out E:\>dir f:\usb* 驱动器 F 中的卷没有标签。 卷的序列号是 000F-FFCB f:\ 的目录 2012/11/13 23:39 10,485,760 usb.img 2012/11/13 23:46 5,242,880 usb_new.img 2 个文件 15,728,640 字节 0 个目录 30,496,669,696 可用字节