Oracle 到 SQL Server 的复制:在复制期间操作数据
我使用标准 SQL Server 快照和事务复制将可用的 Oracle (10g)“继承”到 SQL Server 2005 数据复制。
一切工作正常 - 只要 Oracle 不尝试发送 SQL Server DATETIME 范围之外的日期(1753/1/1 到 9999/12/31)。我希望能够以某种方式介入数据复制,检查该日期范围,并在必要时将要发布的 Oracle 日期调整为 SQL Server 2005 的 DATETIME
数据类型可以实现的日期处理。
有什么相当简单的方法可以做到这一点吗?我知道我可以将目标数据类型更改为 VARCHAR(19) 或类似的数据类型 - 而且我知道我可以升级到 SQL Server 2008 并使用 DATE
或 DATETIME2
数据类型解决这个问题 - 这两种选择现在都不可行(也许在 6、12 个月左右)。
我现在可以做些什么吗?而且很容易??不幸的是,我无法深入了解 Oracle 来修复它(这是另一家第三方公司,不喜欢其他人在他们的系统中摆弄)。
I've "inherited" a working Oracle (10g) to SQL Server 2005 data replication using standard SQL Server snapshot and transactional replication.
Everything works fine - as long as Oracle doesn't try to send a date that's outside the SQL Server DATETIME
range (1753/1/1 to 9999/12/31). I was hoping to be able to somehow get in the middle of the data replication, check for that date range, and if necessary, tweak the Oracle date being published to be something that SQL Server 2005's DATETIME
datatype can handle.
Is there any reasonably easy way to do this?? I know I could just change the target datatype to VARCHAR(19) or something like that - and I know I could upgrade to SQL Server 2008 and use the DATE
or DATETIME2
datatypes to solve the issue - both options aren't viable right now (maybe in 6, 12 months or so).
Is there something I can do right now? And easily?? I cannot get too deep into Oracle to fix it here, unforutnately (that's another third-party company that doesn't like other folks fiddling around in their system).
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
我不认为有解决方案 - 据我了解,复制过程类似于使用日志读取器进行事务复制,因此它是一个黑匣子 - 您不太可能在该过程中注入任何代码,并且如果你可以,这将是比 SQL 更低级别的代码。
I don't believe there's a solution to this - from what I understand, the replication process is similar to using the log reader for transactional replication, so it's a black box - it's unlikely that you could inject any code into the process, and if you could, it would be lower level code than SQL.