I have a test database that I'm having permissions issues with.
I can't access the reporting database, and the application's help documentation says to do the following:
Resolution: 1. Launch the SQL Server Management Studio and connect to the database server(s) hosting the Vision and Reporting Server databases. 2. Expand the security folder. 3. Select logins and right click on the <username> user and choose properties. 4. Click the User Mapping tab 5.Make sure the following databases are selected in the Users mapped to this Login: ReportServer ReportServerTempDB Your Vision databases This maps the login/user to the respective databases. 6. As you select each database (including your Vision database), select the db_owner role in the Database role membership for: section. You must select this option for each database.
When I do this, I get the following error:
"Create failed for user '<servername>\<username>'. User, group, or role '<servername>\<username>' already exists in the current database. (Microsoft SQL Server, Error: 15023)"
I have googled this error and tried the following command on each database:
ALTER USER [<username>] WITH LOGIN = [<username>]
The message indicated that the commands completed successfully but I am still getting the above error when I try to map each database as instructed above.
What am I missing?
Per Kin's comment (thanks) I tried this: - I right clicked the user and selected: Script Login As > Drop and Create To > New query window. - I ran the resulting query and tried to map the user roles by selecting the other two databases and db_owner again but I am still getting the same error message as above.