How do I script out all permissions for a user in one database to apply to another database with the exact same schema?

I moved a database via Backup / Restore from one server to another.  For some reason one or more user accounts did not get moved.  How do I  script out all the user's permissions from one database to run in another?
LVL 1
BruceAsked:
Who is Participating?
 
chapmandewConnect With a Mentor Commented:
you'll need to transfer the logins:

http://support.microsoft.com/kb/246133
0
 
BruceAuthor Commented:
thanks chapmandew!

I used your link to find another resource...
http://weblogs.sqlteam.com/tarad/archive/2008/06/24/How-to-transfer-SQL-logins-between-SQL-Server-2005-instances.aspx

but I still don't see anything that is generating sql like "grant execute on sp_myproc to myUser".

Is this possible?
0
All Courses

From novice to tech pro — start learning today.