﻿<?xml version='1.0' encoding='UTF-8'?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/"><channel><title>SQLServerCentral / Discuss Content Posted by Santveer Singh / Article Discussions / Article Discussions by Author  / Finding Objects Owned by non-DBO Users / 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>Fri, 24 May 2013 17:15:23 GMT</lastBuildDate><ttl>20</ttl><item><title>RE: Finding Objects Owned by non-DBO Users</title><link>http://www.sqlservercentral.com/Forums/Topic145058-175-1.aspx</link><description>It is a usefull Script; however, I will avoid the cursor.</description><pubDate>Thu, 15 Dec 2005 07:08:00 GMT</pubDate><dc:creator>Najm Hashmi</dc:creator></item><item><title>RE: Finding Objects Owned by non-DBO Users</title><link>http://www.sqlservercentral.com/Forums/Topic145058-175-1.aspx</link><description>&lt;P&gt;I didn't include DELETE FROM [ObjList] becuase I want to maintain the history also. If some one don't want to maintain the history, he/she may include the DELETE statement. This is just a concept and we can use it in different ways.&lt;/P&gt;&lt;P&gt;Thanks a lot for your time.&lt;/P&gt;</description><pubDate>Thu, 16 Dec 2004 05:03:00 GMT</pubDate><dc:creator>santveer</dc:creator></item><item><title>RE: Finding Objects Owned by non-DBO Users</title><link>http://www.sqlservercentral.com/Forums/Topic145058-175-1.aspx</link><description>&lt;P&gt;Mike,&lt;/P&gt;&lt;P&gt;Thanks for the suggestion.&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;Santveer&lt;/P&gt;</description><pubDate>Thu, 16 Dec 2004 04:56:00 GMT</pubDate><dc:creator>santveer</dc:creator></item><item><title>RE: Finding Objects Owned by non-DBO Users</title><link>http://www.sqlservercentral.com/Forums/Topic145058-175-1.aspx</link><description>&lt;P&gt;Definitely a handy script.  Although the developers in my company all have dbo privileges to the development database, our Windows Group login is mapped to a user other than dbo.  We are forever creating procedures without specifying the [dbo]. in [dbo].[&amp;lt;procedurename&amp;gt;] and ending up owning the procedure instead of dbo.&lt;/P&gt;&lt;P&gt;I would make one enhancement to the script. Right after the SET NOCOUNT ON line, I would add this line:&lt;/P&gt;&lt;P&gt;DELETE FROM [ObjList]&lt;/P&gt;&lt;P&gt;to prevent duplicates from a previous execution from appearing in the table &lt;/P&gt;</description><pubDate>Wed, 15 Dec 2004 08:52:00 GMT</pubDate><dc:creator>CDJorg</dc:creator></item><item><title>RE: Finding Objects Owned by non-DBO Users</title><link>http://www.sqlservercentral.com/Forums/Topic145058-175-1.aspx</link><description>&lt;P&gt;Very handy script.&lt;/P&gt;&lt;P&gt;Note:  I have a few databases with spaces in the name of the database.  This frequently trips up scripts but yours is easy to enhance for such a situation.  Simply change below line:&lt;/P&gt;&lt;P&gt; , SU.name,SO.name  from &lt;A href="mailto:'+@dbname+'.dbo.sysobjects"&gt;'+@dbname+'.dbo.sysobjects&lt;/A&gt; SO join &lt;A href="mailto:'+@dbname+'.dbo.sysusers"&gt;'+@dbname+'.dbo.sysusers&lt;/A&gt; SU &lt;/P&gt;&lt;P&gt;to:&lt;/P&gt;&lt;P&gt; , SU.name,SO.name  from ['+@dbname+'].dbo.sysobjects SO join ['+@dbname+'].dbo.sysusers SU&lt;/P&gt;&lt;P&gt;Thanks for sharing your code.&lt;/P&gt;&lt;P&gt;-Mike&lt;/P&gt;</description><pubDate>Wed, 15 Dec 2004 08:30:00 GMT</pubDate><dc:creator>Mike Schmidt</dc:creator></item><item><title>Finding Objects Owned by non-DBO Users</title><link>http://www.sqlservercentral.com/Forums/Topic145058-175-1.aspx</link><description>Comments posted to this topic are about the content posted at &lt;A HREF=http://www.sqlservercentral.com/columnists/ssingh/findingobjectsownedbynondbousers.asp&gt;http://www.sqlservercentral.com/columnists/</description><pubDate>Fri, 05 Nov 2004 15:43:00 GMT</pubDate><dc:creator>santveer</dc:creator></item></channel></rss>