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.
Author |
Topic |
jshurak
Starting Member
44 Posts |
Posted - 2006-12-04 : 13:58:42
|
I have a job that fails when it runs. The job itself is just a number of 'sp_change_users_login auto_fix' to fix a syncing issue we are having. I can run the script in Query Analyzer, manually, with no issues, but when its scheduled it fails. Its giving 'login already exists' errors, but its also reporting that its fixes some orphaned users. Does anyone know why this might be happening? |
|
jen
Master Smack Fu Yak Hacker
4110 Posts |
Posted - 2006-12-05 : 00:18:04
|
because it was already fixed? when you say it's a scheduled job, does that mean you're restoring automatically then run this job to sync up?use if exists to check if the login already exists, skip if yes, otherwise proceedHTH--------------------keeping it simple... |
 |
|
monty
Posting Yak Master
130 Posts |
Posted - 2006-12-05 : 23:57:25
|
as you might have selected quit on failure option and as it is sheduled job there is no garuntee that there will be orphaned users to fix when you run the job... thats the reason the job will be failing..A better practice is to run the sp's manually ,when needed.its me monty |
 |
|
jshurak
Starting Member
44 Posts |
Posted - 2006-12-06 : 08:10:25
|
Thank you for your posts. This is was resolved by removing logins that were not there. |
 |
|
|
|
|