Link to home
Start Free TrialLog in
Avatar of yrcdba7
yrcdba7Flag for United States of America

asked on

copy database users from one sql server 2005 to another sql server 2008

expert,

I copied one database name FKDB from sql 2005 server to another server SQL 2008,
how can I copy FKDB database all users to SQL server 2008?
I use this command:
SELECT *  FROM sys.syslogins a join
   Roomtracker..sysusers b on a.sid = b.sid
In server sql 2005, how can I copy sid to sever 2008?

Thanks,
Lynn
ASKER CERTIFIED SOLUTION
Avatar of Ephraim Wangoya
Ephraim Wangoya
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
this link will guide you about transfering logins...

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

@tigin44

Thats the same article I already provided above
Avatar of yrcdba7

ASKER

above links are for all security login, I only need one database users
security login in sql 2008 match sql 2005
Avatar of yrcdba7

ASKER

should I run this in SQl server 2008

create login login_name with password = 'pass2' , sid = 0x4A0F0AD9A3901D4EB7AE45849D30A8D1

I know sid, and login_name, but I don't have password,

ewangoya
I have seen your answer when I posted mine... You were quick...

you should transfer user account along with the logins... You cant use just the user accounts without logins...
Once you have transferred your Logins you can re-sync the users by using the system stored procedure sp_change_users_login, see here:
http://msdn.microsoft.com/en-us/library/ms174378.aspx