在SQL Server实例之间传输数据库

时间:2022-12-22 09:06:36

I have mdf & ldf files from another machine and want to add these databases to my machine, how can I do that?......Thanks

我有来自另一台机器的mdf和ldf文件,并希望将这些数据库添加到我的机器上,我该怎么办?......谢谢

When I try to attach the database I get the following error:

当我尝试附加数据库时,我收到以下错误:

Error 602: could not find row in sysindexes for database id 7 object id 1. Run DBCC CHECKTABLE

错误602:在sysindexes中找不到数据库id 7对象id的行1.运行DBCC CHECKTABLE

2 个解决方案

#1


If you're trying to attach files created by a newer version of SQL Server, that may be your problem

如果您尝试附加由较新版本的SQL Server创建的文件,那可能是您的问题

#2


Second question - use sp_attach_db.

第二个问题 - 使用sp_attach_db。

#1


If you're trying to attach files created by a newer version of SQL Server, that may be your problem

如果您尝试附加由较新版本的SQL Server创建的文件,那可能是您的问题

#2


Second question - use sp_attach_db.

第二个问题 - 使用sp_attach_db。