Search
  You are here: Tech Blog Register   Login  
SQL Server - User already exists in current database
Location: BlogsAll Things Tech    
Posted by: host 12/20/2006 5:42 PM

This is repost from Hugh Mc Gauran's blog that I found useful:

Error 15023: User already exists in current database - Easy Fix

After doing a restore from a SQL Server backup, the users login rights are removed from the database yet the user itself still remains in the roles of the database. This means that when you try and add the user again you get the error "Error 15023: User "albert" already exists in current database" and the addition fails.(where albert is the user you wish to add)

The quickest way to get this working is using query analyser and running the following command when working on the actual database.

EXEC sp_dropuser 'albert'

This will drop the user from the database and you can then re-add the user through the GUI or through a SQL query!

Permalink |  Trackback

Your name:
Title:
Comment:
Add Comment   Cancel 
 

Other things you might like...
 

All Things Tech... Mostly
 

Blog Search
 

All Things Tech... Mostly
 

Copyright 2007 by SummerWorks.us Terms Of Use Privacy Statement