Sunday, March 25, 2012

Attach and Detach DB

Hello,

MSSQLSERVER VER : 2000
Using - Attach and Detach Database to move the database from one Server to another server.
I did detached the database from Production and attached my test server, everything OK

Questions about - syslogins & sysdevices data dictionary tables
1. When I select * from sysdevices on production it shows all the database name size,phyname etc. After attaching to my test server I cannot see these things.. I know because it different master database but, how do I fix this.
2. syslogins - is there way to move all the syslogins after attaching to test server.

Please let me know if you guys have done anything on this.

Thanks.

Regards,
K.You can use the DTS Transfer Logins task to transfer logins from one server to another (an option allows you to narrow the selection of users to be moved to one or more databases).

You will still have to use sp_change_users_login (see BOL) to "link" the database user to the new login (the proc links the SID of the user to the SID of the login since the new login will have a different SID than the one on the old server).

There is also a white paper from MS on SQL Log shipping that specifies how to use BCP to transfer the syslogins table, but I don't think you need that.

Regards,

hmscott|||Thanks, I will try let you know.

Regards,
K.

No comments:

Post a Comment