0

我们公司准备下周搬迁,目前我们的所有数据库都使用 SQL Server 2000,托管在我们自己的大楼中。出于多种原因,他们决定将数据转移到本地公司,但他们运行的是 SQL Server 2008。

我想对一些事情提出建议:

  1. 我们正在尝试为我们的几个数据库设置一个测试,以查看我们的应用程序(连接字符串等)出现了什么问题。在不丢失数据或不必重新创建表等的情况下,将数据库从我们的 SQL Server 2000 机器获取到新机器的最佳方法是什么?我尝试了数据库复制向导,但我们网络内的限制不允许这样做。如果我在 SQL Server 2008 上创建一个数据库并RESTORE从 SQL Server 2000 .bak 文件执行一个数据库,我将丢失所有事务,对吗?如果我稍后替换事务文件怎么办?我认为那行不通。

  2. 如何将 SQL Server 2000 数据库正确升级到 SQL Server 2008?我已经针对我们的大多数数据库运行了该向导,除了一些我可以解决的小问题外,它都很干净。

我们的 SQL Server 2000 是我们的生产服务器,因此它在任何时候都无法复制文件……直到搬家。我们的客户已被告知在某些日期之间会有一个短暂的中断期,所以没关系,但我想我的意思是我现在不能停止 SQL Server 代理,只是为了复制日志文件等用于测试目的.

非常感谢任何帮助/建议!

4

3 回答 3

1

创建 SQL Server 2000 的数据库备份并将其还原到 SQL Server 2008。

设置复制,将 SQL Server 2000 作为发布者,将 SQL Server 2008 作为订阅者。

于 2012-04-05T13:45:40.427 回答
0

Just back up 2000, and then restore it. You won't lose transactions, no difefrent to doing a full backup on your current server.

You'll need to add any SQl logins and set the permissions etc. You'll need to to do fix users for them as well. If you only use integrated access then you don't need to.

e.g.

Use MyDataBase
EXEC sp_change_users_login Auto_Fix, 'MyUser'

And you'll need to set the compatibility level

Use
exec sp_bcp_dbcmptlevel 'model'
to get it
and then

EXEC sp_dbcmptlevel 'MyDatabase', ??

to set it.

Another option, would be to install 2000 on your new machine restore a back from the old one and then do an inplace upgrade through the 2008 installation wizard. That sort of thing tends to give my sphincters palpitations though.

于 2012-04-05T14:07:35.693 回答
0

不确定哪个是最好的方法。我认为数据库备份和恢复将是一个好主意。不过,您会同时丢失一些数据。

如果您在 2005 或 2008 的 2 个版本之间迁移,我建议您进行日志备份以减少丢失的数据,但我认为此选项在 2000 上不可用

我可以给您的一条建议是,在这些链接上查看 2000 年和 2005 年以及 2005 年和 2008 年已停产的功能:

于 2012-04-05T13:54:01.173 回答