0

I'm trying to create a snapshot of a database that I will use for reporting. The requirements are to capture specific tables in the production database. Afterwards, I need to execute a stored procedure that will normalize a particular table column (also captured from the snapshot) that has XML data. I also need to keep track of that normalized data to the snapshot using a primary key.

I have no issues in parsing the XML, I do XQuery a lot. The challenge for me is to execute this in a scheduled task that runs on specific hours. So I'm reading through documentation about Transactional Replication. I hope I'm on the right track.

Another limitation is to support MS SQL 2005 databases, so I would need a solution that is backward compatible to that as well. Most of the solutions I've seen on the web requires a lot of physical tinkering in the management studio, perhaps, you can guide me how I could script that for automated deployment?

I hope you guys can guide me to the best solution. I can always use MERGE scripts but if there's a more standardized way, I'm up to it.

4

1 回答 1

0

我不认为事务复制是正确的工具。

我会创建一个计划的 SSIS 包 ( http://technet.microsoft.com/en-us/library/dd440761(v=sql.100).aspx ) 在您想要的时间运行。

该任务的元素可能包括复制数据、根据需要对其进行转换以及执行存储过程(使用 Execute SQL 任务)。

于 2014-06-06T14:44:16.523 回答