An annoying thing that can happen with MSSQL Server, when you move a database to a new server by backing it up on one and then restoring it on the other, is that the server can tell you the username already exists, when you attempt to create it.
The specific error is:
Error 15023: User already exists in current database.
RESOLUTION:
1. Open a new query.
2. Run the query: USE databasename
3. Run the query (this will show the users for the DB): EXEC sp_change_users_login ‘Report’
4. Run the query: EXEC sp_change_users_login ‘Auto_Fix’, ‘username‘, NULL, ‘password‘
*Note: Replace 'username' with database user name and 'password' with its respective password.
A blog for Server Administrators. Find free technical support on a variety of issues faced with the hosting servers and plenty of how-to's on new technology. It contains answers to all the day to day issues faced on servers.
Sunday, 31 March 2013
Error 15023: User already exists in current database.
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment