Wednesday, March 21, 2012

How can I attach database files from outside the local server?

Hi,all here,

I got a problem that I can only attach database files created on my local server, while database files from outside the local server cant be attached. So what is the problem then?

Thanks a lot in advance for any guidance and help.

Which error do you get ?

HTH, Jens Suessmeyer.

http://www.sqlserver2005.de
|||

Hi, Jens, the error I always got is as below:

could not find row in sysindexes for database ID 21, object ID 1, index ID 1, Run DBCC CHECKTABLE on sysindexes.

Thanks a lot.

|||Any help? Thank a lot.|||

it happened to me that I was not able to re-attach database when logged in to the server under login B, different from login A used to detach the database. Login A also happened to be a dbo for this database.

try this:

1) re-attach the files to their original server,

2) create a new login that log in using SQL authentication,

3) set this login a dbo for the database you are transferring

4) on the new PC, create the same login (with the same pwd), assign it a sysadmin role, and log into the server with this login

5) try again attaching the file(s).

|||Hi, Lolik, thanks a lot.

No comments:

Post a Comment