Backup SQL Server 2008 R2 Restore on SQL 2008

本文档提供了一种从SQL Server 2008 R2实例迁移到另一个装有SQL Server 2008实例的方法。主要步骤包括:在源数据库中生成脚本文件,调整插入顺序以解决外键约束问题,并在目标数据库中执行该脚本。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

1.Install an instance of SQL 2008 R2 on one machine and SQL 2008 on another
2.Open SQL Server Management Studio R2
3.Select your source Database
4.Select Tasks>Generate Scripts.
5.Select 'Script entire database and all database objects', press 'Next'
6.Select 'Save to File' and click on the 'Advanced' button
7.Select 'Script for Server Version' and select the version you want: 200/2005/2008
8.Select 'Type of data to Script' and select Schema/Data/both
9.Click 'OK',Next and do it!
10.Copy the resulting file to the target machine with SQL 2008 [or whatever]
11.Log onto your SQL Management Studio and open the copied .sql file... be aware that there may be limitations on the file size.
There may also be issues with the order that the .SQL file inserts the data into the target database and if there are FK constraints in place, this could be an issue.... simply re-order the insert lists.
12.Once the .sql file is organised, parse it [just to sure], and then execute.
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值