You would need to memap the Microsoft SQL Server logins Here are the steps a) Connect to the database using sa or windows authentication and change the database context to the restored database. b) Run command sp_change_users_login 'REPORT'. This command will print the orphaned user name. Note: The following steps assume that the orphaned user is starteam. Use the appropriate orphaned user as reported by the command sp_change_users_login 'REPORT'. c) Run the following commands in SQL Query Analyzer: sp_addlogin starteam EXEC sp_change_users_login 'Update_One', 'starteam', 'starteam' d) Copy the contents of the script set-owner-to-dbo.sql and run it against the database. Note: This script can be found in the DBScripts folder under the StarTeam Server installation location. e) As sa user, execute the script by running the command exec change_db_ownership 'starteam'. Note: Warnings generated from this command are safe to ignore. f) Go to SQL Enterprise Manager or Microsoft SQL Server Management Studio for Microsoft SQL Server and delete user starteam from the database. Select Yes to also delete the schema. Note: This action deletes the database user starteam, not the Microsoft SQL Server Login starteam. Deleting the schema deletes all the database objects owned by this database user, which is required in order to delete a database user. This step is essential because, while there can be many users with dbo privileges, there can be only one database owner. StarTeam Server must be run by the database owner. g) Run the command sp_changedbowner starteam.
↧