﻿<?xml version='1.0' encoding='UTF-8'?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/"><channel><title>SQLServerCentral / Article Discussions / Article Discussions by Author / Discuss content posted by Sudhir Chawla  / Extract User-Role Mapping / Latest Posts</title><generator>InstantForum.NET v2.9.0</generator><description>SQLServerCentral</description><link>http://www.sqlservercentral.com/Forums/</link><webMaster>notifications@sqlservercentral.com</webMaster><lastBuildDate>Sat, 18 May 2013 16:10:54 GMT</lastBuildDate><ttl>20</ttl><item><title>RE: Extract User-Role Mapping</title><link>http://www.sqlservercentral.com/Forums/Topic601436-1415-1.aspx</link><description>Hi Sigal,Actually the only purpose to use cursor is to avoid DBO, SYS, INFORMATION_SCHEMA and Guest users, else we can directly execute sp_helpuser and it will return all user's role data.To avoid cursor, while creating #tmpuser table, we can add another field with identity column and then run a while loop. We have to run a loop to get roles of each user excluding system users. your comments are appreciated.ThanksSudhir</description><pubDate>Thu, 09 Jul 2009 19:27:03 GMT</pubDate><dc:creator>Sudhir-192949</dc:creator></item><item><title>RE: Extract User-Role Mapping</title><link>http://www.sqlservercentral.com/Forums/Topic601436-1415-1.aspx</link><description>Hi Hans,I am not getting  "Insert Error: Column name or number of supplied values does not match table definition." Its working fine.Please try again &amp; let me know if there it still give problem.ThanksSudhir</description><pubDate>Thu, 09 Jul 2009 18:59:54 GMT</pubDate><dc:creator>Sudhir-192949</dc:creator></item><item><title>RE: Extract User-Role Mapping</title><link>http://www.sqlservercentral.com/Forums/Topic601436-1415-1.aspx</link><description>Hi Hans,I am not getting any error, I have executed it &amp; there is no</description><pubDate>Thu, 09 Jul 2009 18:58:50 GMT</pubDate><dc:creator>Sudhir-192949</dc:creator></item><item><title>RE: Extract User-Role Mapping</title><link>http://www.sqlservercentral.com/Forums/Topic601436-1415-1.aspx</link><description>I receive this error:[i]Msg 213, Level 16, State 7, Line 2Insert Error: Column name or number of supplied values does not match table definition.[/i]This does not look well...</description><pubDate>Wed, 08 Jul 2009 08:31:17 GMT</pubDate><dc:creator>FreeHansje</dc:creator></item><item><title>RE: Extract User-Role Mapping</title><link>http://www.sqlservercentral.com/Forums/Topic601436-1415-1.aspx</link><description>Versioning is too specific.  You'll have to update this code everytime you apply a CU or SP.  Why not just look at the first character?  Show us how without the cursor, there must be a set-wise way to do this.</description><pubDate>Wed, 24 Dec 2008 09:29:38 GMT</pubDate><dc:creator>Myles Sigal</dc:creator></item><item><title>Extract User-Role Mapping</title><link>http://www.sqlservercentral.com/Forums/Topic601436-1415-1.aspx</link><description>Comments posted to this topic are about the item [B]&lt;A HREF="/scripts/Administration/64959/"&gt;Extract User-Role Mapping&lt;/A&gt;[/B]</description><pubDate>Wed, 12 Nov 2008 08:24:52 GMT</pubDate><dc:creator>Sudhir-192949</dc:creator></item></channel></rss>