scn format (scn格式)

scn(system change number) 结构主要维护 oracle数据库内部的数据一致性,SCN 有两部分组成: Base and wrap,wrap 是16bit的数字,base是32bit的数字,这样其实就可以算scn的有效范围,它的格式(redo dump trace)是wrap.base,当base超过了2的32次方,然后wrap 就会加1,其实用sql 很好验证。

Goldengate source and target table differ in column structure part-1(ogg同步不同的表结构数据)

昨天一朋友问如果用GOLDENGATE同步数据(ETL),如果目标端比源端多出一个时间字段表示最后的修改日期,OGG可以实现么?可以的,下面是我step-by-step 的演示.耗时两天做个总结,在这特殊日子也祝 各位 库友中秋团圆! source db sid:icme tablename:test_t ————- |id ,name | ————- target db sid:ggs tablename:test_t —————————————- |id ,name, create_date, last_update_date| —————————————– create_date 取记录的生成时间 last_update_date 取最后DML的时间 Source DB — 建立新表 icme@ICME>create table test_s(id int,name varchar2(20)); — ogg 的配置文件,这是我之前配置源和目标库表结构一样的环境,有启用DDL同步,后面我会陆续修改,OGG安装参考以前的文章 GGSCI (icme-db) 2> view params eicmec extract eicmec —————————————— — local extract for icme schema change … Read more

Sql Server 2008 简单搭建主从复制

通过将主服务器上备份出来的transaction log 传送到辅助服务器上并进行恢复,实现主从库的同步,有些类似mysql 的主从和oracle 的OGG,不过sqlserver 的日志传输当主服务器宕机的时候,日志传送功能并不能实现从主服务器到辅助服务器的自动故障转移功能,需要手动将辅助服务器切换到联机状态,使得辅助服务器上数据库来提供服务,从而实现数据库的高可用性。 Parimary DB ——————– IP: 192.168.217.240 OS: windows 2003 x64 DB: Sql server 2008 ——————– Secondly DB ——————– IP: 192.168.217.240 OS: windows 2003 x32 DB: Sql server 2008 ——————– Transaction Log data flow ————————- primary db –>backup e:\db_backup –> shared e:\db_backup as \\192.168.217.240\db_bacup | |secondly copy \\192.168.217.240\db_bacup to local e:\db_restore … Read more

ORA-07445 [kggchk()+77] [SIGSEGV] [Address not mapped to object]

今天有个项目系统负载突然变大,查到top sql是一个存储过程,执行计划缺少合理的索引,SQL是个update操作,于是kill 调用的几个session 建立一个索引,结果发现kill几个用户进程后实例挂了.下面是alert日志,可见instance crash前出现过死锁,就是那个update sql Thu Aug 15 11:08:04 2013 ORA-00060: Deadlock detected. More info in file /oracle/admin/icme/udump/icme_ora_24011.trc. Thu Aug 15 11:27:00 2013 ORA-00060: Deadlock detected. More info in file /oracle/admin/icme/udump/icme_ora_26527.trc. Thu Aug 15 11:27:03 2013 ORA-00060: Deadlock detected. More info in file /oracle/admin/icme/udump/icme_ora_26912.trc. Thu Aug 15 11:32:46 2013 ORA-00060: Deadlock detected. More info … Read more

Enabling Listener Trace ,TNS-01251

Enabling Listener Trace ,TNS-01251 Oracle version 11g introduced the ADR or Automatic Diagnostic Repository feature,Trying to change the log file using the Lsnrctl utility fails with: TNS-01251: Cannot set trace/log directory under ADR. oracle@db231 trace]$ lsnrctl status LSNRCTL for Linux: Version 11.2.0.3.0 – Production on 15-AUG-2013 14:15:59 Copyright (c) 1991, 2011, Oracle. All rights reserved. … Read more

Know more about Oracle ASH

《Know More about Oracle AWR》 姐妹篇,oracle 10g引入,ASH 是性能诊断工具,不像sql trace总是默认打开, 保存历史上发生了什么, 提供比AWR更细粒度的数据,即使当系统负载很高时,它也工作的很好,因为使用类似memcopy的数据收集,不会有太大的额外负担,没用任何类型的数据库lock。 Active(‘Active’ == Non-idle sessions) Session History Licensed as part of the Diagnostic pack,