On a SQL 2008 instance, I have a login with the dbcreator and public roles. When I restore a database onto this server, I am then unable to use that database because all the user -> login mappings in it are broken (the ids are different on different servers).
There is an sp_change_users_login 'Auto_Fix', userName stored procedure, but I can't use this because I can't access the database in the first place. Lastly, since I don't have the securityAdmin role I can't map any logins to database users.
Is there a way to give myself permission to access a database as part of the restore process?