Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2008 Forums
 SQL Server Administration (2008)
 database migration

Author  Topic 

pramod21
Yak Posting Veteran

64 Posts

Posted - 2012-08-30 : 03:51:57
Hi,

if i"m moving my mdf and ldf file to new server, will it move the login and users to a new server ? or it will move only the data ??

thnx..

lionofdezert
Aged Yak Warrior

885 Posts

Posted - 2012-08-30 : 05:21:56
It will move only data. Remaining would be shifted manually.

--------------------------
http://connectsql.blogspot.com/
Go to Top of Page

komkrit
Yak Posting Veteran

60 Posts

Posted - 2012-08-30 : 07:52:14
User is database level object
Login is instance level object

User will be moved together with data file.
Login won't.

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Komkrit Yensirikul
Welcome for all questions. Let us know if our solution solved your problem.
Go to Top of Page

komkrit
Yak Posting Veteran

60 Posts

Posted - 2012-08-30 : 08:00:45
You have to manually create login at new server.
Unfortunately, new login will not associate with existing user.
To associate user with login, try following command.

USE <your database name>
GO
ALTER USER WITH LOGIN='<your login name>'


- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Komkrit Yensirikul
Welcome for all questions. Let us know if our solution solved your problem.
Go to Top of Page

sunitabeck
Master Smack Fu Yak Hacker

5155 Posts

Posted - 2012-08-30 : 08:29:00
There are step by step instructions on this MSDN site.
http://support.microsoft.com/kb/314546

Depending on whether you are moving to same version of SQL Server or to a different version, the steps may be different. See here:

http://support.microsoft.com/kb/918992
http://support.microsoft.com/kb/246133

In the past, I have used steps in the last link to successfully move logins between different versions of SQL Server
Go to Top of Page
   

- Advertisement -