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?
Who is Participating?
chapmandewConnect With a Mentor Commented:
you'll need to transfer the logins:
BruceAuthor Commented:
thanks chapmandew!

I used your link to find another resource...

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

Is this possible?
All Courses

From novice to tech pro — start learning today.