<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:georss="http://www.georss.org/georss" xmlns:geo="http://www.w3.org/2003/01/geo/wgs84_pos#" xmlns:media="http://search.yahoo.com/mrss/"
		>
<channel>
	<title>Comments on: SQL SERVER &#8211; FIX : Error 15023: User already exists in current database.</title>
	<atom:link href="http://blog.sqlauthority.com/2007/02/15/sql-server-fix-error-15023-user-already-exists-in-current-database/feed/" rel="self" type="application/rss+xml" />
	<link>http://blog.sqlauthority.com/2007/02/15/sql-server-fix-error-15023-user-already-exists-in-current-database/</link>
	<description>Personal Notes of Pinal Dave</description>
	<lastBuildDate>Wed, 22 May 2013 19:03:49 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.com/</generator>
	<item>
		<title>By: Mike</title>
		<link>http://blog.sqlauthority.com/2007/02/15/sql-server-fix-error-15023-user-already-exists-in-current-database/#comment-471525</link>
		<dc:creator><![CDATA[Mike]]></dc:creator>
		<pubDate>Wed, 08 May 2013 18:50:30 +0000</pubDate>
		<guid isPermaLink="false">http://blog.sqlauthority.com/?p=33#comment-471525</guid>
		<description><![CDATA[Thank you Pinal. This was very helpful.]]></description>
		<content:encoded><![CDATA[<p>Thank you Pinal. This was very helpful.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Andrew</title>
		<link>http://blog.sqlauthority.com/2007/02/15/sql-server-fix-error-15023-user-already-exists-in-current-database/#comment-464822</link>
		<dc:creator><![CDATA[Andrew]]></dc:creator>
		<pubDate>Sat, 27 Apr 2013 05:47:45 +0000</pubDate>
		<guid isPermaLink="false">http://blog.sqlauthority.com/?p=33#comment-464822</guid>
		<description><![CDATA[For everyone getting the &quot;An invalid parameter or option was specified for procedure&quot; Try:
EXEC sp_change_users_login &#039;Auto_Fix&#039;, &#039;username&#039;, NULL, &#039;password&#039;

Worked for me.

Thanks!]]></description>
		<content:encoded><![CDATA[<p>For everyone getting the &#8220;An invalid parameter or option was specified for procedure&#8221; Try:<br />
EXEC sp_change_users_login &#8216;Auto_Fix&#8217;, &#8216;username&#8217;, NULL, &#8216;password&#8217;</p>
<p>Worked for me.</p>
<p>Thanks!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Grippy</title>
		<link>http://blog.sqlauthority.com/2007/02/15/sql-server-fix-error-15023-user-already-exists-in-current-database/#comment-452946</link>
		<dc:creator><![CDATA[Grippy]]></dc:creator>
		<pubDate>Wed, 10 Apr 2013 06:35:09 +0000</pubDate>
		<guid isPermaLink="false">http://blog.sqlauthority.com/?p=33#comment-452946</guid>
		<description><![CDATA[Im getting this message. I cant figure this out for the life of me. It wont let me delete the user since it owns a full text catalog in the database and I cant create user mappings since it already shows the user in the database. Please help its urgent. Thank you.

Msg 15600, Level 15, State 1, Procedure sp_change_users_login, Line 214
An invalid parameter or option was specified for procedure &#039;sys.sp_change_users_login&#039;.]]></description>
		<content:encoded><![CDATA[<p>Im getting this message. I cant figure this out for the life of me. It wont let me delete the user since it owns a full text catalog in the database and I cant create user mappings since it already shows the user in the database. Please help its urgent. Thank you.</p>
<p>Msg 15600, Level 15, State 1, Procedure sp_change_users_login, Line 214<br />
An invalid parameter or option was specified for procedure &#8216;sys.sp_change_users_login&#8217;.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Chandru Maruthapan</title>
		<link>http://blog.sqlauthority.com/2007/02/15/sql-server-fix-error-15023-user-already-exists-in-current-database/#comment-439080</link>
		<dc:creator><![CDATA[Chandru Maruthapan]]></dc:creator>
		<pubDate>Mon, 18 Mar 2013 03:30:36 +0000</pubDate>
		<guid isPermaLink="false">http://blog.sqlauthority.com/?p=33#comment-439080</guid>
		<description><![CDATA[Thanks Pinal,
for understand the problem and create the script for myself for this one..


USE Mirror   
GO
DECLARE @str_query VARCHAR(max);
DECLARE @un VARCHAR(50);

CREATE TABLE #TempTable (name varchar(25))
INSERT INTO #TempTable (name)

SELECT SU.NAME AS UserName 
FROM sys.sysusers AS SU LEFT JOIN sys.server_principals AS SP ON SU.name = SP.name 
AND SP.type = &#039;S&#039;  
WHERE SU.issqluser = 1          -- Only SQL logins 
AND NOT SU.[sid] IS NULL		-- Exclude system user 
AND SU.sid  0x0				-- Exclude guest account 
AND LEN(SU.sid) &lt;= 16			-- Exclude Windows accounts &amp; roles 
AND SUSER_SNAME(SU.sid) IS NULL -- Login for SID is null 



DECLARE cur CURSOR FOR
SELECT name FROM #TempTable
OPEN cur
FETCH NEXT FROM cur INTO @un;
WHILE @@FETCH_STATUS = 0
BEGIN  
		SET @str_query = &#039;EXEC sp_change_users_login &#039;&#039;AUTO_FIX&#039;&#039; , &#039;&#039;&#039;+@un+&#039;&#039;&#039;&#039; + CHAR(10) + &#039;GO&#039; + CHAR(10)
        EXEC (@str_query)
        --PRINT @str_query	--TEST POINTER
        
FETCH NEXT FROM cur INTO @un
END
CLOSE cur;
DEALLOCATE cur;
DROP TABLE #TempTable]]></description>
		<content:encoded><![CDATA[<p>Thanks Pinal,<br />
for understand the problem and create the script for myself for this one..</p>
<p>USE Mirror<br />
GO<br />
DECLARE @str_query VARCHAR(max);<br />
DECLARE @un VARCHAR(50);</p>
<p>CREATE TABLE #TempTable (name varchar(25))<br />
INSERT INTO #TempTable (name)</p>
<p>SELECT SU.NAME AS UserName<br />
FROM sys.sysusers AS SU LEFT JOIN sys.server_principals AS SP ON SU.name = SP.name<br />
AND SP.type = &#8216;S&#8217;<br />
WHERE SU.issqluser = 1          &#8212; Only SQL logins<br />
AND NOT SU.[sid] IS NULL		&#8211; Exclude system user<br />
AND SU.sid  0&#215;0				&#8211; Exclude guest account<br />
AND LEN(SU.sid) &lt;= 16			&#8211; Exclude Windows accounts &amp; roles<br />
AND SUSER_SNAME(SU.sid) IS NULL &#8212; Login for SID is null </p>
<p>DECLARE cur CURSOR FOR<br />
SELECT name FROM #TempTable<br />
OPEN cur<br />
FETCH NEXT FROM cur INTO @un;<br />
WHILE @@FETCH_STATUS = 0<br />
BEGIN<br />
		SET @str_query = &#039;EXEC sp_change_users_login &#039;&#039;AUTO_FIX&#039;&#039; , &#039;&#039;&#039;+@un+&#039;&#039;&#039;&#039; + CHAR(10) + &#039;GO&#039; + CHAR(10)<br />
        EXEC (@str_query)<br />
        &#8211;PRINT @str_query	&#8211;TEST POINTER</p>
<p>FETCH NEXT FROM cur INTO @un<br />
END<br />
CLOSE cur;<br />
DEALLOCATE cur;<br />
DROP TABLE #TempTable</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Vivek Bhat</title>
		<link>http://blog.sqlauthority.com/2007/02/15/sql-server-fix-error-15023-user-already-exists-in-current-database/#comment-429083</link>
		<dc:creator><![CDATA[Vivek Bhat]]></dc:creator>
		<pubDate>Thu, 28 Feb 2013 09:37:22 +0000</pubDate>
		<guid isPermaLink="false">http://blog.sqlauthority.com/?p=33#comment-429083</guid>
		<description><![CDATA[Great article.. Saved my day]]></description>
		<content:encoded><![CDATA[<p>Great article.. Saved my day</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Keith</title>
		<link>http://blog.sqlauthority.com/2007/02/15/sql-server-fix-error-15023-user-already-exists-in-current-database/#comment-428547</link>
		<dc:creator><![CDATA[Keith]]></dc:creator>
		<pubDate>Wed, 27 Feb 2013 14:30:53 +0000</pubDate>
		<guid isPermaLink="false">http://blog.sqlauthority.com/?p=33#comment-428547</guid>
		<description><![CDATA[I get the &quot;new database owner is already a user&quot; error, but when I try to run the 

EXEC sp_change_users_login &#039;Report&#039;  command, 
I
 get no data returned. The Query completes successfully, but the panel is empty. I don&#039;t understand where to go from here.

Thanks for your assistance.]]></description>
		<content:encoded><![CDATA[<p>I get the &#8220;new database owner is already a user&#8221; error, but when I try to run the </p>
<p>EXEC sp_change_users_login &#8216;Report&#8217;  command,<br />
I<br />
 get no data returned. The Query completes successfully, but the panel is empty. I don&#8217;t understand where to go from here.</p>
<p>Thanks for your assistance.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: SQL SERVER &#8211; Weekly Series &#8211; Memory Lane &#8211; #016 &#171; SQL Server Journey with SQL Authority</title>
		<link>http://blog.sqlauthority.com/2007/02/15/sql-server-fix-error-15023-user-already-exists-in-current-database/#comment-422293</link>
		<dc:creator><![CDATA[SQL SERVER &#8211; Weekly Series &#8211; Memory Lane &#8211; #016 &#171; SQL Server Journey with SQL Authority]]></dc:creator>
		<pubDate>Sat, 16 Feb 2013 01:31:08 +0000</pubDate>
		<guid isPermaLink="false">http://blog.sqlauthority.com/?p=33#comment-422293</guid>
		<description><![CDATA[[...] FIX : Error 15023: User already exists in the current database One of the most popular errors when SQL Server 2000 is migrated to SQL Server 2005. [...]]]></description>
		<content:encoded><![CDATA[<p>[...] FIX : Error 15023: User already exists in the current database One of the most popular errors when SQL Server 2000 is migrated to SQL Server 2005. [...]</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Waldy</title>
		<link>http://blog.sqlauthority.com/2007/02/15/sql-server-fix-error-15023-user-already-exists-in-current-database/#comment-417714</link>
		<dc:creator><![CDATA[Waldy]]></dc:creator>
		<pubDate>Mon, 04 Feb 2013 16:06:47 +0000</pubDate>
		<guid isPermaLink="false">http://blog.sqlauthority.com/?p=33#comment-417714</guid>
		<description><![CDATA[dbo is a forbidden value for the login name in the procedure]]></description>
		<content:encoded><![CDATA[<p>dbo is a forbidden value for the login name in the procedure</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Rizwan</title>
		<link>http://blog.sqlauthority.com/2007/02/15/sql-server-fix-error-15023-user-already-exists-in-current-database/#comment-406977</link>
		<dc:creator><![CDATA[Rizwan]]></dc:creator>
		<pubDate>Sat, 12 Jan 2013 16:58:13 +0000</pubDate>
		<guid isPermaLink="false">http://blog.sqlauthority.com/?p=33#comment-406977</guid>
		<description><![CDATA[Great, worked perfectly, solved my problem. Thanks alot]]></description>
		<content:encoded><![CDATA[<p>Great, worked perfectly, solved my problem. Thanks alot</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Shiro</title>
		<link>http://blog.sqlauthority.com/2007/02/15/sql-server-fix-error-15023-user-already-exists-in-current-database/#comment-402503</link>
		<dc:creator><![CDATA[Shiro]]></dc:creator>
		<pubDate>Wed, 02 Jan 2013 01:23:25 +0000</pubDate>
		<guid isPermaLink="false">http://blog.sqlauthority.com/?p=33#comment-402503</guid>
		<description><![CDATA[Thanks a lot!! It solved my problem!!]]></description>
		<content:encoded><![CDATA[<p>Thanks a lot!! It solved my problem!!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: carla abanes (@carlingdoodling)</title>
		<link>http://blog.sqlauthority.com/2007/02/15/sql-server-fix-error-15023-user-already-exists-in-current-database/#comment-381889</link>
		<dc:creator><![CDATA[carla abanes (@carlingdoodling)]]></dc:creator>
		<pubDate>Tue, 27 Nov 2012 09:13:02 +0000</pubDate>
		<guid isPermaLink="false">http://blog.sqlauthority.com/?p=33#comment-381889</guid>
		<description><![CDATA[yup, thats why i come to this site for answers more often...not just copy-paste scripts but to also understand and learn...thanks dave!!]]></description>
		<content:encoded><![CDATA[<p>yup, thats why i come to this site for answers more often&#8230;not just copy-paste scripts but to also understand and learn&#8230;thanks dave!!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: YaR</title>
		<link>http://blog.sqlauthority.com/2007/02/15/sql-server-fix-error-15023-user-already-exists-in-current-database/#comment-355628</link>
		<dc:creator><![CDATA[YaR]]></dc:creator>
		<pubDate>Wed, 03 Oct 2012 20:02:31 +0000</pubDate>
		<guid isPermaLink="false">http://blog.sqlauthority.com/?p=33#comment-355628</guid>
		<description><![CDATA[Your post helped me a lot,Thank you.]]></description>
		<content:encoded><![CDATA[<p>Your post helped me a lot,Thank you.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: iceCold</title>
		<link>http://blog.sqlauthority.com/2007/02/15/sql-server-fix-error-15023-user-already-exists-in-current-database/#comment-329756</link>
		<dc:creator><![CDATA[iceCold]]></dc:creator>
		<pubDate>Mon, 13 Aug 2012 09:51:26 +0000</pubDate>
		<guid isPermaLink="false">http://blog.sqlauthority.com/?p=33#comment-329756</guid>
		<description><![CDATA[Fixed my problem, thank you. You are brilliant.]]></description>
		<content:encoded><![CDATA[<p>Fixed my problem, thank you. You are brilliant.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Jamie</title>
		<link>http://blog.sqlauthority.com/2007/02/15/sql-server-fix-error-15023-user-already-exists-in-current-database/#comment-308064</link>
		<dc:creator><![CDATA[Jamie]]></dc:creator>
		<pubDate>Sun, 01 Jul 2012 03:17:10 +0000</pubDate>
		<guid isPermaLink="false">http://blog.sqlauthority.com/?p=33#comment-308064</guid>
		<description><![CDATA[Your the best!  Fixed my confluence problem,  been struggling with it all day!]]></description>
		<content:encoded><![CDATA[<p>Your the best!  Fixed my confluence problem,  been struggling with it all day!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Stephany</title>
		<link>http://blog.sqlauthority.com/2007/02/15/sql-server-fix-error-15023-user-already-exists-in-current-database/#comment-306617</link>
		<dc:creator><![CDATA[Stephany]]></dc:creator>
		<pubDate>Wed, 27 Jun 2012 19:28:54 +0000</pubDate>
		<guid isPermaLink="false">http://blog.sqlauthority.com/?p=33#comment-306617</guid>
		<description><![CDATA[a quick resolution to my problem.  You&#039;re totally awesome]]></description>
		<content:encoded><![CDATA[<p>a quick resolution to my problem.  You&#8217;re totally awesome</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: JOrge</title>
		<link>http://blog.sqlauthority.com/2007/02/15/sql-server-fix-error-15023-user-already-exists-in-current-database/#comment-301704</link>
		<dc:creator><![CDATA[JOrge]]></dc:creator>
		<pubDate>Fri, 15 Jun 2012 15:48:50 +0000</pubDate>
		<guid isPermaLink="false">http://blog.sqlauthority.com/?p=33#comment-301704</guid>
		<description><![CDATA[Wonderful! That solved the problem. Thank you so much.]]></description>
		<content:encoded><![CDATA[<p>Wonderful! That solved the problem. Thank you so much.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Chella</title>
		<link>http://blog.sqlauthority.com/2007/02/15/sql-server-fix-error-15023-user-already-exists-in-current-database/#comment-296369</link>
		<dc:creator><![CDATA[Chella]]></dc:creator>
		<pubDate>Thu, 07 Jun 2012 14:14:28 +0000</pubDate>
		<guid isPermaLink="false">http://blog.sqlauthority.com/?p=33#comment-296369</guid>
		<description><![CDATA[Brilliant]]></description>
		<content:encoded><![CDATA[<p>Brilliant</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Suraj</title>
		<link>http://blog.sqlauthority.com/2007/02/15/sql-server-fix-error-15023-user-already-exists-in-current-database/#comment-296266</link>
		<dc:creator><![CDATA[Suraj]]></dc:creator>
		<pubDate>Thu, 07 Jun 2012 11:45:54 +0000</pubDate>
		<guid isPermaLink="false">http://blog.sqlauthority.com/?p=33#comment-296266</guid>
		<description><![CDATA[Thanks a zillion. It works like a gem.]]></description>
		<content:encoded><![CDATA[<p>Thanks a zillion. It works like a gem.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: johnD</title>
		<link>http://blog.sqlauthority.com/2007/02/15/sql-server-fix-error-15023-user-already-exists-in-current-database/#comment-282868</link>
		<dc:creator><![CDATA[johnD]]></dc:creator>
		<pubDate>Tue, 08 May 2012 06:56:47 +0000</pubDate>
		<guid isPermaLink="false">http://blog.sqlauthority.com/?p=33#comment-282868</guid>
		<description><![CDATA[Simply brilliant, thank you very much, indeed.]]></description>
		<content:encoded><![CDATA[<p>Simply brilliant, thank you very much, indeed.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: sari</title>
		<link>http://blog.sqlauthority.com/2007/02/15/sql-server-fix-error-15023-user-already-exists-in-current-database/#comment-260016</link>
		<dc:creator><![CDATA[sari]]></dc:creator>
		<pubDate>Tue, 06 Mar 2012 10:58:49 +0000</pubDate>
		<guid isPermaLink="false">http://blog.sqlauthority.com/?p=33#comment-260016</guid>
		<description><![CDATA[That&#039;s working!!! Thanks]]></description>
		<content:encoded><![CDATA[<p>That&#8217;s working!!! Thanks</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Asha</title>
		<link>http://blog.sqlauthority.com/2007/02/15/sql-server-fix-error-15023-user-already-exists-in-current-database/#comment-257061</link>
		<dc:creator><![CDATA[Asha]]></dc:creator>
		<pubDate>Mon, 27 Feb 2012 00:43:26 +0000</pubDate>
		<guid isPermaLink="false">http://blog.sqlauthority.com/?p=33#comment-257061</guid>
		<description><![CDATA[Excellent!!!
It made wonders...

Thanks a lot]]></description>
		<content:encoded><![CDATA[<p>Excellent!!!<br />
It made wonders&#8230;</p>
<p>Thanks a lot</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Javier</title>
		<link>http://blog.sqlauthority.com/2007/02/15/sql-server-fix-error-15023-user-already-exists-in-current-database/#comment-254853</link>
		<dc:creator><![CDATA[Javier]]></dc:creator>
		<pubDate>Tue, 21 Feb 2012 13:56:19 +0000</pubDate>
		<guid isPermaLink="false">http://blog.sqlauthority.com/?p=33#comment-254853</guid>
		<description><![CDATA[thanks a lot !!]]></description>
		<content:encoded><![CDATA[<p>thanks a lot !!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: SQL Server &#8211; User login issue after DB Restore &#171; Tech Hub</title>
		<link>http://blog.sqlauthority.com/2007/02/15/sql-server-fix-error-15023-user-already-exists-in-current-database/#comment-240456</link>
		<dc:creator><![CDATA[SQL Server &#8211; User login issue after DB Restore &#171; Tech Hub]]></dc:creator>
		<pubDate>Wed, 18 Jan 2012 23:02:53 +0000</pubDate>
		<guid isPermaLink="false">http://blog.sqlauthority.com/?p=33#comment-240456</guid>
		<description><![CDATA[[...] EXEC sp_change_users_login &#039;update_one&#039;, &#039;&lt;username&gt;&#039;, &#039;&lt;username&gt;&#039; GO Reference  http://blog.sqlauthority.com/2007/02/15/sql-server-fix-error-15023-user-already-exists-in-current-da...   Advertisement  LD_AddCustomAttr(&quot;AdOpt&quot;, &quot;1&quot;); LD_AddCustomAttr(&quot;Origin&quot;, &quot;other&quot;); [...]]]></description>
		<content:encoded><![CDATA[<p>[...] EXEC sp_change_users_login &#039;update_one&#039;, &#039;&lt;username&gt;&#039;, &#039;&lt;username&gt;&#039; GO Reference  http://blog.sqlauthority.com/2007/02/15/sql-server-fix-error-15023-user-already-exists-in-current-da&#8230;   Advertisement  LD_AddCustomAttr(&quot;AdOpt&quot;, &quot;1&quot;); LD_AddCustomAttr(&quot;Origin&quot;, &quot;other&quot;); [...]</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: robert</title>
		<link>http://blog.sqlauthority.com/2007/02/15/sql-server-fix-error-15023-user-already-exists-in-current-database/#comment-213621</link>
		<dc:creator><![CDATA[robert]]></dc:creator>
		<pubDate>Thu, 08 Dec 2011 20:28:09 +0000</pubDate>
		<guid isPermaLink="false">http://blog.sqlauthority.com/?p=33#comment-213621</guid>
		<description><![CDATA[Thanks, just what I had been looking for.]]></description>
		<content:encoded><![CDATA[<p>Thanks, just what I had been looking for.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: alcorspell</title>
		<link>http://blog.sqlauthority.com/2007/02/15/sql-server-fix-error-15023-user-already-exists-in-current-database/#comment-202275</link>
		<dc:creator><![CDATA[alcorspell]]></dc:creator>
		<pubDate>Tue, 22 Nov 2011 15:50:50 +0000</pubDate>
		<guid isPermaLink="false">http://blog.sqlauthority.com/?p=33#comment-202275</guid>
		<description><![CDATA[Thank you very much. You&#039;re always straight to the point.]]></description>
		<content:encoded><![CDATA[<p>Thank you very much. You&#8217;re always straight to the point.</p>
]]></content:encoded>
	</item>
</channel>
</rss>
