标签云
asm恢复 bbed bootstrap$ dul kcbzib_kcrsds_1 kccpb_sanity_check_2 kcratr_nab_less_than_odr MySQL恢复 obet ORA-00312 ORA-00704 ORA-00742 ORA-01110 ORA-01200 ORA-01555 ORA-01578 ORA-01595 ORA-600 2662 ORA-600 2663 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-600 kcratr_nab_less_than_odr 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 比特币加密文章分类
- MongoDB (1)
- MongoDB恢复 (1)
- Others (2)
- 中间件 (2)
- WebLogic (2)
- 操作系统 (112)
- 数据库 (1,882)
- DB2 (22)
- MySQL (82)
- Oracle (1,707)
- Data Guard (53)
- EXADATA (8)
- GoldenGate (24)
- ORA-xxxxx (168)
- ORACLE 12C (72)
- ORACLE 18C (6)
- ORACLE 19C (15)
- ORACLE 21C (3)
- Oracle 23ai (8)
- Oracle ASM (72)
- Oracle Bug (8)
- Oracle RAC (56)
- Oracle 安全 (6)
- Oracle 开发 (28)
- Oracle 监听 (29)
- Oracle备份恢复 (661)
- Oracle安装升级 (108)
- Oracle性能优化 (62)
- 专题索引 (5)
- 勒索恢复 (91)
- PostgreSQL (37)
- pdu工具 (7)
- PostgreSQL恢复 (13)
- SQL Server (34)
- SQL Server恢复 (14)
- TimesTen (7)
- 达梦数据库 (5)
- 达梦恢复 (3)
- 生活娱乐 (2)
- 至理名言 (11)
- 虚拟化 (2)
- VMware (2)
- 软件开发 (51)
- Asp.Net (9)
- JavaScript (12)
- PHP (2)
- 小工具 (34)
- MongoDB (1)
-
最近发表
- 断电引起ORA-600 3005故障处理
- 记录一次云存储资源到期之后引起的数据库恢复
- Firebird 损坏数据库数据抢救工具—firebirdext
- Oracle 19c 202610补丁(RUs+OJVM)-19.33
- 由于con$.con#值达到极限,触发数据库增加约束报ORA-600 12807错误
- MongoDB 离线提取工具—mongoext
- .bres勒索病毒加密数据库dmp文件可恢复
- ORA-600 krsm_mrp_rebuild_lf_list.lno_mismatch
- 记录一次0丢失的ORA-00354: 损坏重做日志块标头故障恢复
- 不当数据库恢复操作导致一个月数据丢失
- obet快速修复oracle 位图损坏块
- 不太常见的10.2.0.1的oracle redo损坏恢复
- obet forcecopy功能抢救硬件故障中的数据文件
- kcratr_nab_less_than_odr和system坏块故障处理
- 通过obet 恢复system坏块,打开数据库
- obet dbv功能完整说明
- 分享一例运行在aix上的sap系统数据库恢复过程
- OBET-Oracle Block Editor Tool使用说明
- 几乎动用了所有手段的Oracle故障恢复
- Oracle Block Edit Tool (obet) 功能增强–2026.07
分类目录归档:Oracle
windows rman自动备份并传输到远程服务器处理方法
在linux中,要使用rman备份后传输到远程服务器上,可以选择ftp,scp,nfs等方式实现,在win主机上可以配置ftp或者共享实现.linux的解决方法已经很多,这里重点提供win上面实现rman备份且传输到远程服务器的解决方法,简单实现异地备份方法:
1.win配置共享目录,而且设置远程服务器有写权限,如果省事可以配置everyone有读写权限
2.创建相关备份目录,这里主要是rmanfile,rmanscript,rmanlog
3.编写rman备份脚本
CONFIGURE RETENTION POLICY TO REDUNDANCY = 7; CONFIGURE DEVICE TYPE DISK PARALLELISM 4; CONFIGURE DEFAULT DEVICE TYPE TO DISK; backup as compressed backupset database format 'E:\backup_db\rmanfile\full_%T_%U.rman'; sql 'alter system archive log current'; backup as compressed backupset archivelog all format 'E:\backup_db\rmanfile\arch_%T_%U.rman' delete input; DELETE noprompt OBSOLETE; crosscheck backup; delete noprompt expired backup; backup format 'E:\backup_db\rmanfile\ctl_%T_%U.rman' current controlfile; backup spfile format 'E:\backup_db\rmanfile\spfile_%T_%U.rman' ; exit;
4.调用rman备份脚本
rman target / cmdfile=E:\backup_db\scriptfile\backup_db.rman log=E:\backup_db\logfile\rmanlog_%date:~0,4%%date:~5,2%%date:~8,2%.log
5.拷贝到远程脚本
需要注意是按照备份集中的日期作为标记来删除的,也就是说,一次备份最好不要跨天
copy /y e:\backup_db\rmanfile\*_%date:~0,4%%date:~5,2%%date:~8,2%_*.RMAN \\192.168.13.40\oracle_backup
6.删除远程服务器N天前备份脚本
需要注意是按照备份集中的日期作为标记来删除的,也就是说,一次备份最好不要跨天
@echo off set DaysAgo=5 call :DateToDays %date:~0,4% %date:~5,2% %date:~8,2% PassDays set /a PassDays-=%DaysAgo% call :DaysToDate %PassDays% DstYear DstMonth DstDay del \\192.168.13.40\oracle_backup\*_%DstYear%%DstMonth%%DstDay%_*.RMAN goto :eof :DateToDays %yy% %mm% %dd% days setlocal ENABLEEXTENSIONS set yy=%1&set mm=%2&set dd=%3 if 1%yy% LSS 200 if 1%yy% LSS 170 (set yy=20%yy%) else (set yy=19%yy%) set /a dd=100%dd%%%100,mm=100%mm%%%100 set /a z=14-mm,z/=12,y=yy+4800-z,m=mm+12*z-3,j=153*m+2 set /a j=j/5+dd+y*365+y/4-y/100+y/400-2472633 endlocal&set %4=%j%&goto :EOF :DaysToDate %days% yy mm dd setlocal ENABLEEXTENSIONS set /a a=%1+2472632,b=4*a+3,b/=146097,c=-b*146097,c/=4,c+=a set /a d=4*c+3,d/=1461,e=-1461*d,e/=4,e+=c,m=5*e+2,m/=153,dd=153*m+2,dd/=5 set /a dd=-dd+e+1,mm=-m/10,mm*=12,mm+=m+3,yy=b*100+d-4800+m/10 (if %mm% LSS 10 set mm=0%mm%)&(if %dd% LSS 10 set dd=0%dd%) endlocal&set %2=%yy%&set %3=%mm%&set %4=%dd%&goto :EOF
7.配置计划任务,让定时执行相关脚本
升级数据库到10.2.0.5遭遇ORA-00918: column ambiguously defined
一个数据库从10201升级到10205之后,出现ORA-00918错误,查询mos发现在以前版本中是bug,Oracle好像在10205中把它修复了,结果就是以前应用的sql无法正常执行.这次升级的结果就是客户晚上3点联系开发商紧急修改程序。再次提醒:再小的系统数据库升级都需要做,功能测试,SPA测试,确保升级后功能和性能都正常.
SQL> select * from v$version; BANNER ---------------------------------------------------------------- Oracle Database 10g Enterprise Edition Release 10.2.0.5.0 - 64bi PL/SQL Release 10.2.0.5.0 - Production CORE 10.2.0.5.0 Production TNS for 64-bit Windows: Version 10.2.0.5.0 - Production NLSRTL Version 10.2.0.5.0 - Production
执行报错ORA-00918
多个表JOIN连接,由于在select中的列未指定表名,而且该列在多个表中有,因此在10205中报ORA-00918错误,Oracle认为在以前的版本中是 Bug 5368296: SQL NOT GENERATING ORA-918 WHEN USING JOIN. 升级到10.2.0.5, 11.1.0.7 and 11.2.0.2版本,需要注意此类问题。修复bug没事,但是修复了之后导致系统需要修改sql才能够运行,确实让人很无语
SQL> set autot trace
SQL> set lines 100
SQL> SELECT yz_id, item_code, DECODE (yzlx, 0, '长期医嘱', '临时医嘱') yzlx,
2 item_name, gg, sl || sldw sl, zyjs, yf, a.pc, zbj, zbh,
3 TO_CHAR (dcl, 'fm9999990.009') || dcldw dcl, a.bz, lb, zyh,ch,xm,
4 bq, cfh, lrysdm, lrysxm, lrrq, hdrdm, hdrxm, hdrq, sender_code,
5 sender_name, send_date, tzysdm, tzysxm, tzrq, ksrq, zxfy,
6 lb_yp_yl, zsq_code
7 FROM op.yz a LEFT OUTER JOIN op.pc b
8 ON NVL (TRIM (UPPER (a.pc)), ' ') = NVL (TRIM (UPPER (b.pc)), ' ')
9 LEFT JOIN op.zy p ON a.zyh = p.zyh
10 WHERE p.cy='在院' AND p.new_patient='1'
11 AND upper(nvl(p.bj,1))<> 'Y'
12 AND (state = '已核对')
13 AND is_in_bill IS NULL
14 ORDER BY ksrq, yz_id ;
bq, cfh, lrysdm, lrysxm, lrrq, hdrdm, hdrxm, hdrq, sender_code,
*
ERROR at line 4:
ORA-00918: column ambiguously defined
SQL> select COLUMN_NAME,TABLE_NAME from DBA_tab_columns where column_name='BQ'
2 AND TABLE_NAME IN('YZ','ZY','PC');
COLUMN_NAME TABLE_NAME
------------------------------ ------------------------------
BQ ZY
BQ YZ
10.2.0.1中执行正常
E:\>sqlplus / as sysdba
SQL*Plus: Release 10.2.0.1.0 - Production on 星期六 1月 3 14:09:51 2015
Copyright (c) 1982, 2005, Oracle. All rights reserved.
连接到:
Oracle Database 10g Enterprise Edition Release 10.2.0.1.0 - 64bit Production
With the Partitioning, OLAP and Data Mining options
SQL> set autot trace
SQL> set lines 100
SQL> SELECT yz_id, item_code, DECODE (yzlx, 0, '长期医嘱', '临时医嘱') yzlx,
2 item_name, gg, sl || sldw sl, zyjs, yf, a.pc, zbj, zbh,
3 TO_CHAR (dcl, 'fm9999990.009') || dcldw dcl, a.bz, lb, zyh,ch,xm
,
4 bq, cfh, lrysdm, lrysxm, lrrq, hdrdm, hdrxm, hdrq, sender_code,
5 sender_name, send_date, tzysdm, tzysxm, tzrq, ksrq, zxfy,
6 lb_yp_yl, zsq_code
7 FROM op.yz a LEFT OUTER JOIN op.pc b
8 ON NVL (TRIM (UPPER (a.pc)), ' ') = NVL (TRIM (UPPER (b.pc)), '
')
9 LEFT JOIN op.zy p ON a.zyh = p.zyh
10 WHERE p.cy='在院' AND p.new_patient='1'
11 AND upper(nvl(p.bj,1))<> 'Y'
12 AND (state = '已核对')
13 AND is_in_bill IS NULL
14 ORDER BY ksrq, yz_id ;
已选择19804行。
执行计划
----------------------------------------------------------
ERROR:
ORA-00604: 递归 SQL 级别 2 出现错误
ORA-16000: 打开数据库以进行只读访问
SP2-0612: 生成 AUTOTRACE EXPLAIN 报告时出错
统计信息
----------------------------------------------------------
1 recursive calls
0 db block gets
41945 consistent gets
0 physical reads
0 redo size
2075973 bytes sent via SQL*Net to client
14989 bytes received via SQL*Net from client
1322 SQL*Net roundtrips to/from client
1 sorts (memory)
0 sorts (disk)
19804 rows processed
10.2.0.5库中同名列增加表名前缀执行OK
1
SQL> set autot trace
SQL> set lines 100
SQL> SELECT yz_id, item_code, DECODE (yzlx, 0, '长期医嘱', '临时医嘱') yzlx,
2 item_name, gg, sl || sldw sl, zyjs, yf, a.pc, zbj, zbh,
3 TO_CHAR (dcl, 'fm9999990.009') || dcldw dcl, a.bz, lb,zyh,ch,xm,
4 a.bq, cfh, lrysdm, lrysxm, lrrq, hdrdm, hdrxm, hdrq, sender_code,
5 sender_name, send_date, tzysdm, tzysxm, tzrq, ksrq, zxfy,
6 lb_yp_yl, zsq_code
7 FROM op.yz a LEFT OUTER JOIN op.pc b
8 ON NVL (TRIM (UPPER (a.pc)), ' ') = NVL (TRIM (UPPER (b.pc)), ' ')
9 LEFT JOIN op.zy p ON a.zyh = p.zyh
10 WHERE p.cy='在院' AND p.new_patient='1'
11 AND upper(nvl(p.bj,1))<> 'Y'
12 AND (state = '已核对')
13 AND is_in_bill IS NULL
14 ORDER BY ksrq, yz_id ;
20629 rows selected.
Execution Plan
----------------------------------------------------------
Plan hash value: 3468887510
--------------------------------------------------------------------------------------------
| Id | Operation | Name | Rows | Bytes | Cost (%CPU)| Time |
--------------------------------------------------------------------------------------------
| 0 | SELECT STATEMENT | | 10 | 2580 | 2968 (2)| 00:00:36 |
| 1 | SORT ORDER BY | | 10 | 2580 | 2968 (2)| 00:00:36 |
|* 2 | HASH JOIN OUTER | | 10 | 2580 | 2967 (2)| 00:00:36 |
|* 3 | TABLE ACCESS BY INDEX ROWID| YZ | 3 | 672 | 42 (0)| 00:00:01 |
| 4 | NESTED LOOPS | | 10 | 2390 | 2963 (2)| 00:00:36 |
|* 5 | TABLE ACCESS FULL | ZY | 3 | 45 | 2917 (2)| 00:00:36 |
|* 6 | INDEX RANGE SCAN | DZBLYZ_ZYH | 118 | | 2 (0)| 00:00:01 |
| 7 | TABLE ACCESS FULL | PC | 33 | 627 | 3 (0)| 00:00:01 |
--------------------------------------------------------------------------------------------
Predicate Information (identified by operation id):
---------------------------------------------------
2 - access(NVL(TRIM(UPPER("A"."PC")),' ')=NVL(TRIM(UPPER("B"."PC"(+))),' '))
3 - filter("A"."STATE"='已核对' AND "A"."IS_IN_BILL" IS NULL)
5 - filter("P"."CY"='在院' AND UPPER(NVL("P"."BJ",'1'))<>'Y' AND
"P"."NEW_PATIENT"='1')
6 - access("A"."ZYH"="P"."ZYH")
Statistics
----------------------------------------------------------
0 recursive calls
0 db block gets
42121 consistent gets
0 physical reads
0 redo size
2181383 bytes sent via SQL*Net to client
15617 bytes received via SQL*Net from client
1377 SQL*Net roundtrips to/from client
1 sorts (memory)
0 sorts (disk)
20629 rows processed
Bug 5368296: SQL NOT GENERATING ORA-918 WHEN USING JOIN
Bug 12388159 : SQL REPORTING ORA00918 AFTER UPGRADE TO 10.2.0.5.0
再次提醒:再小的系统数据库升级都需要做,功能测试,SPA测试,确保升级后功能和性能都正常.
主机断电系统回到N年前数据库报ORA-600 kcm_headroom_warn_1错误
主机断电导致系统时间回退到14年前,数据库启动报ORA-600[kcm_headroom_warn_1]错误
Sat Jun 21 17:49:12 2014 ---正常系统时间
Instance shutdown complete
Mon Aug 07 06:13:28 2000 ---重启后系统时间
Starting ORACLE instance (normal)
LICENSE_MAX_SESSION = 0
LICENSE_SESSIONS_WARNING = 0
Initial number of CPU is 64
Effective number of CPU for internal database sizing is 32
Number of processor cores in the system is 8
Number of processor sockets in the system is 1
CELL communication is configured to use 0 interface(s):
CELL IP affinity details:
NUMA status: non-NUMA system
cellaffinity.ora status: N/A
CELL communication will use 1 IP group(s):
Grp 0:
Picked latch-free SCN scheme 3
Autotune of undo retention is turned on.
IMODE=BR
ILAT =264
LICENSE_MAX_USERS = 0
SYS auditing is disabled
Starting up:
Oracle Database 11g Enterprise Edition Release 11.2.0.4.0 - 64bit Production
With the Partitioning, OLAP, Data Mining and Real Application Testing options.
ORACLE_HOME = /ora1/prod/db/tech_st/11.2.0
System name: SunOS
Node name: erpdb1-boot
Release: 5.10
Version: Generic_147147-26
Machine: sun4v
Using parameter settings in server-side spfile /ora1/prod/db/tech_st/11.2.0/dbs/spfileprod.ora
System parameters with non-default values:
processes = 1200
sessions = 2400
timed_statistics = TRUE
event = ""
shared_pool_size = 448M
shared_pool_reserved_size= 322122547
nls_language = "american"
nls_territory = "america"
nls_sort = "binary"
nls_date_format = "DD-MON-RR"
nls_numeric_characters = ".,"
nls_comp = "binary"
nls_length_semantics = "BYTE"
sga_target = 10G
control_files = "/data1/prod/db/apps_st/data/cntrl01.dbf"
control_files = "/data1/prod/db/apps_st/data/cntrl02.dbf"
control_files = "/data1/prod/db/apps_st/data/cntrl03.dbf"
db_block_checksum = "TRUE"
db_block_size = 8192
compatible = "11.1.0"
log_archive_dest_1 = "location=/arch1/prod/arch"
log_archive_format = "prod_%t_%s_%r.arc"
log_buffer = 10485760
log_checkpoint_interval = 100000
log_checkpoint_timeout = 1200
db_files = 512
log_checkpoints_to_alert = TRUE
dml_locks = 10000
undo_management = "AUTO"
undo_tablespace = "APPS_UNDOTS1"
db_block_checking = "FALSE"
_disable_fast_validate = TRUE
sec_case_sensitive_logon = FALSE
session_cached_cursors = 500
utl_file_dir = "/usr/tmp"
plsql_code_type = "INTERPRETED"
plsql_optimize_level = 2
job_queue_processes = 10
_system_trig_enabled = TRUE
cursor_sharing = "EXACT"
parallel_min_servers = 0
parallel_max_servers = 8
audit_file_dest = "/ora1/prod/db/tech_st/admin/prod/adump"
db_name = "prod"
open_cursors = 3600
_sort_elimination_cost_ratio= 5
_b_tree_bitmap_plans = FALSE
_fast_full_scan_enabled = FALSE
query_rewrite_enabled = "true"
_like_with_bind_as_equality= TRUE
pga_aggregate_target = 2G
workarea_size_policy = "AUTO"
_optimizer_autostats_job = FALSE
optimizer_secure_view_merging= FALSE
aq_tm_processes = 4
olap_page_pool_size = 4M
diagnostic_dest = "/ora1/prod/db/tech_st/11.2.0/admin/prod_erpdb1"
_trace_files_public = TRUE
max_dump_file_size = "20480"
Mon Aug 07 06:13:30 2000
PMON started with pid=2, OS id=3556
Mon Aug 07 06:13:30 2000
PSP0 started with pid=3, OS id=3557
Mon Aug 07 06:13:31 2000
VKTM started with pid=4, OS id=3558 at elevated priority
VKTM running at (10)millisec precision with DBRM quantum (100)ms
Mon Aug 07 06:13:31 2000
GEN0 started with pid=5, OS id=3562
Mon Aug 07 06:13:32 2000
DIAG started with pid=6, OS id=3564
Mon Aug 07 06:13:32 2000
DBRM started with pid=7, OS id=3565
Mon Aug 07 06:13:32 2000
DIA0 started with pid=8, OS id=3566
Mon Aug 07 06:13:32 2000
MMAN started with pid=9, OS id=3567
Mon Aug 07 06:13:32 2000
DBW0 started with pid=10, OS id=3568
Mon Aug 07 06:13:32 2000
DBW1 started with pid=11, OS id=3569
Mon Aug 07 06:13:32 2000
DBW2 started with pid=12, OS id=3570
Mon Aug 07 06:13:32 2000
DBW3 started with pid=13, OS id=3571
Mon Aug 07 06:13:32 2000
LGWR started with pid=14, OS id=3572 at elevated priority
Mon Aug 07 06:13:32 2000
CKPT started with pid=15, OS id=3575
Mon Aug 07 06:13:32 2000
SMON started with pid=16, OS id=3576
Mon Aug 07 06:13:32 2000
RECO started with pid=17, OS id=3577
Mon Aug 07 06:13:32 2000
MMON started with pid=18, OS id=3578
Mon Aug 07 06:13:32 2000
MMNL started with pid=19, OS id=3579
ORACLE_BASE not set in environment. It is recommended
that ORACLE_BASE be set in the environment
Reusing ORACLE_BASE from an earlier startup = /ora1/prod/db/tech_st
Mon Aug 07 06:13:32 2000
ALTER DATABASE MOUNT
Successful mount of redo thread 1, with mount id 4111810188
Database mounted in Exclusive Mode
Lost write protection disabled
Completed: ALTER DATABASE MOUNT
Mon Aug 07 06:13:36 2000
ALTER DATABASE OPEN
************************************************************
Warning: The SCN headroom for this database is only -51464 hours!
************************************************************
Errors in file /ora1/prod/db/tech_st/11.2.0/admin/prod_erpdb1/diag/rdbms/prod/prod/trace/prod_ora_3583.trc (incident=441878):
ORA-00600: internal error code, arguments: [kcm_headroom_warn_1], [], [], [], [], [], [], [], [], [], [], []
Incident details in: /ora1/prod/db/tech_st/11.2.0/admin/prod_erpdb1/diag/rdbms/prod/prod/incident/incdir_441878/prod_ora_3583_i441878.trc
Use ADRCI or Support Workbench to package the incident.
See Note 411.1 at My Oracle Support for error and packaging details.
Errors in file /ora1/prod/db/tech_st/11.2.0/admin/prod_erpdb1/diag/rdbms/prod/prod/trace/prod_ora_3583.trc:
ORA-00600: internal error code, arguments: [kcm_headroom_warn_1], [], [], [], [], [], [], [], [], [], [], []
ORA-600 signalled during: ALTER DATABASE OPEN...
Dumping diagnostic data in directory=[cdmp_20000807061339], requested by (instance=1, osid=3583), summary=[incident=441878].
Mon Aug 07 06:14:35 2000
Sweep [inc][441878]: completed
Sweep [inc2][441878]: completed
在数据库出现莫名其妙问题不能启动之时,请注意主机时间,另外还有一例:记录一次ORA-00600[2252]故障解决

加我微信(17813235971)
加我QQ(107644445)

