June 20, 2011 at 6:53 am
Have you tried writing the restore as a SQL Agent job (with any security mods you will need) and granting him authority to run jobs on that server?
[font="Comic Sans MS"]Tom Powell
http://philergia.wordpress.com/[/font]
June 20, 2011 at 7:08 am
Thanks for the suggestion guys - good idea 🙂
June 28, 2011 at 10:30 am
PhilipC (5/12/2011)
"Only members of the sysadmin fixed server role can specify the Auto_Fix option."
Try this on the DB *AFTER* they restore it. It's not "Auto_Fix" so it might work.....
DECLARE @username varchar(25)
DECLARE fixusers CURSOR
FOR
SELECT UserName = name FROM sysusers
WHERE issqluser = 1 and (sid is not null and sid <> 0x0)
and suser_sname(sid) is null
ORDER BY name
OPEN fixusers
FETCH NEXT FROM fixusers
INTO @username
WHILE @@FETCH_STATUS = 0
BEGIN
EXEC sp_change_users_login 'update_one', @username, @username
PRINT 'EXEC sp_change_users_login ''' + 'update_one' + ''', ' + @username + ',' + @username
FETCH NEXT FROM fixusers
INTO @username
END
CLOSE fixusers
DEALLOCATE fixusers
June 28, 2011 at 10:40 am
Warren,
At the very least, the devs would need security admin perms, if not db_owner / sysadmin to use this proc.
June 28, 2011 at 10:44 am
True.
Then I recomend the OP package this script and do as Grasshopper sez.....
June 28, 2011 at 4:22 pm
Thanks guys, I finished up creating it as a SQL Agent job and giving the person permission to execute the job which has worked fine.
June 29, 2011 at 8:55 am
Glad it worked out.
Viewing 7 posts - 16 through 21 (of 21 total)
You must be logged in to reply to this topic. Login to reply