如何将旧数据从一个数据库移动到另一个数据库(所有表) [英] How to Move Old Data From one Data Base To another Database(All Tables)

查看:566
本文介绍了如何将旧数据从一个数据库移动到另一个数据库(所有表)的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

嗨..

我正在开展一些X项目,它已经运行了近6年,现在我想将数据分成两个数据库。即2009年至2012年数据在一个Db和从2013年到另一个数据库

Plz帮助..在此先感谢。

解决方案

我将如何这样做:



备份并将Db恢复到另一个Db - 所以一个变为'旧',一个变为'新'



标识事务表



写sql按日期删除,<在一个Db中,> =在另一个中。



这假设您在交易数据上有某种交易日期,当然!


检查这些

存档数据SQL Server [ ^ ]

Auto Maintain Archive,Purge&清除SQL Server中的源表 [ ^ ]

Hi..
Im Working On Some 'X' Project, It is Running From Last 6 Years, Now I Want To Split Data Into Two Data Base. i.e 2009 to 2012 Data In one Db & from 2013 to another Database
Plz Help.. Thanks In Advance.

解决方案

How I would do it:

backup and restore the Db to another Db - so one becomes the 'old' and one the 'new'

identify the transactional tables

write sql to delete by date, < in one Db and >= in the other.

This assumes that you have some sort of transaction date on the transactional data, of course!


Check these
Archiving Data in SQL Server[^]
Auto Maintain Archive, Purge & Purge on Source Table in SQL Server[^]


这篇关于如何将旧数据从一个数据库移动到另一个数据库(所有表)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆