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
 General SQL Server Forums
 New to SQL Server Programming
 new to sql 2000 and 2005, have migration question

Author  Topic 

mrose1120
Starting Member

11 Posts

Posted - 2006-07-22 : 13:56:52
Hi all,
i was just thrown into SQL stuff at my job. For now I need to complete a migration, but soon i'm being sent to training to make sure that I can do this easier later. Heres my question

I backed up the database, then restored it to the new server. That worked fine. I couldn't log in...so i did some searching and found out about the sp_change_users_login command, I got my login fixed and I can log in. Now, I have about 1000 other users to change and I don't want to do those manually. Noone is using this database, so if needed, I could back it up and restore it differnetly if needed or If someone can give me a .sql file to run to fix all usernames and tell me how to run a .sql (i'm that new to it) that would be REALLY appreciated. Anyway, thanks in advance, looking forward to SQL administration.


Matt

Kristen
Test

22859 Posts

Posted - 2006-07-22 : 15:06:36
Hi Matt, welcome to SQL Team!

See the very last post in the linked thread:

http://www.sqlteam.com/forums/topic.asp?TOPIC_ID=55210&SearchTerms=Fix+Orphaned+Users

However, not sure if this works the same under SQL 2005 !!

Kristen
Go to Top of Page

mrose1120
Starting Member

11 Posts

Posted - 2006-07-22 : 16:05:45
Kristin, thanks a lot, an dfirst off, I will be administering a single SQL2005 server, but this question is with SQL 2000.

I had seen that post, but call me an extreme n00b, but I don't even know how to run an SQL Script!!! :-\ So if someone could point me in that direction, that'd be great.
Go to Top of Page

Kristen
Test

22859 Posts

Posted - 2006-07-22 : 16:45:03
:-) I only use SQL 2000 ... so I can't tell you for SQL 2005 ... but in SQL 2000 I would use Query Analyser, which is part of the Client Tools installation (Start : program files : Microsoft SQL Server : Query analyser). In SQL2005 I believe there is an integrated development environment, along the lines of Visual Studio, in case that points you in the right direction.

Kristen
Go to Top of Page

SamC
White Water Yakist

3467 Posts

Posted - 2006-07-22 : 22:58:39
quote:
Originally posted by mrose1120

Kristin, thanks a lot, an dfirst off, I will be administering a single SQL2005 server, but this question is with SQL 2000.

I had seen that post, but call me an extreme n00b, but I don't even know how to run an SQL Script!!! :-\ So if someone could point me in that direction, that'd be great.

You need to run SSMS (SQL Server Management Studio).
Go to Top of Page

mrose1120
Starting Member

11 Posts

Posted - 2006-07-23 : 23:24:16
Ok, tell me if i'm doing something wrong...

I went into SQL Query analyser, opened up the .sql of the sscript from the other forum, and hit the button to execute it both on the master and my database I transfered, LANLMS. Upon doing this, i'm still having orphaned usernames. Is this the correct procedure?? I'm hoping I can get some sort of script done by tomorrow...

as I sadi earlier, if i did a sp_change_users_login command on just one username, it worked earlier...pleasee help thanks
Go to Top of Page

mrose1120
Starting Member

11 Posts

Posted - 2006-07-23 : 23:35:26
nevermind my last post, I figured it out!!! Thanks for all your help.
Go to Top of Page
   

- Advertisement -