<?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/"
		>
<channel>
	<title>Comments for Adventures in SQL</title>
	<atom:link href="http://adventuresinsql.com/comments/feed/" rel="self" type="application/rss+xml" />
	<link>http://adventuresinsql.com</link>
	<description>Random thoughts, rants, discoveries and things I wish I had done better</description>
	<lastBuildDate>Tue, 17 Apr 2012 18:47:04 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.2</generator>
	<item>
		<title>Comment on How Can I Tell if SQL Agent is Running via SQL? by Marcelo Lucas</title>
		<link>http://adventuresinsql.com/2010/05/how-can-i-tell-if-sql-agent-is-running-via-sql/comment-page-1/#comment-9092</link>
		<dc:creator>Marcelo Lucas</dc:creator>
		<pubDate>Tue, 17 Apr 2012 18:47:04 +0000</pubDate>
		<guid isPermaLink="false">http://adventuresinsql.com/?p=321#comment-9092</guid>
		<description>Good article.
Despite the (un)support (http://blogs.msdn.com/b/mangeshd/archive/2010/01/14/usage-of-xp-servicecontrol-is-unsupported.aspx), it works.
I&#039;ve adapted for my use.


Thanks!
Marcelo</description>
		<content:encoded><![CDATA[<p>Good article.<br />
Despite the (un)support (<a href="http://blogs.msdn.com/b/mangeshd/archive/2010/01/14/usage-of-xp-servicecontrol-is-unsupported.aspx" rel="nofollow">http://blogs.msdn.com/b/mangeshd/archive/2010/01/14/usage-of-xp-servicecontrol-is-unsupported.aspx</a>), it works.<br />
I&#8217;ve adapted for my use.</p>
<p>Thanks!<br />
Marcelo</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on Stored Procedure to Get SQL Job Execution Status by Nick Gilbert</title>
		<link>http://adventuresinsql.com/2010/01/stored-procedure-to-get-sql-job-execution-status/comment-page-1/#comment-8577</link>
		<dc:creator>Nick Gilbert</dc:creator>
		<pubDate>Wed, 21 Mar 2012 11:08:59 +0000</pubDate>
		<guid isPermaLink="false">http://adventuresinsql.com/?p=80#comment-8577</guid>
		<description>This doesn&#039;t seem to work for me. The execution status is always 4 - even while the job is running. 

It seems my sql agent user&#039;s SID isn&#039;t in the sys.server_principals table for some reason. No idea why.</description>
		<content:encoded><![CDATA[<p>This doesn&#8217;t seem to work for me. The execution status is always 4 &#8211; even while the job is running. </p>
<p>It seems my sql agent user&#8217;s SID isn&#8217;t in the sys.server_principals table for some reason. No idea why.</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on A Busy/Accidental DBA&#8217;s Guide to Managing VLFs by David Levy</title>
		<link>http://adventuresinsql.com/2009/12/a-busyaccidental-dbas-guide-to-managing-vlfs/comment-page-1/#comment-8345</link>
		<dc:creator>David Levy</dc:creator>
		<pubDate>Tue, 13 Mar 2012 14:06:53 +0000</pubDate>
		<guid isPermaLink="false">http://adventuresinsql.com/?p=12#comment-8345</guid>
		<description>I have never seen it break the log chain. Can you share more details like SQL version, steps you took before and after, recovery model, etc.?</description>
		<content:encoded><![CDATA[<p>I have never seen it break the log chain. Can you share more details like SQL version, steps you took before and after, recovery model, etc.?</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on A Busy/Accidental DBA&#8217;s Guide to Managing VLFs by Dave Plung</title>
		<link>http://adventuresinsql.com/2009/12/a-busyaccidental-dbas-guide-to-managing-vlfs/comment-page-1/#comment-8341</link>
		<dc:creator>Dave Plung</dc:creator>
		<pubDate>Tue, 13 Mar 2012 11:45:38 +0000</pubDate>
		<guid isPermaLink="false">http://adventuresinsql.com/?p=12#comment-8341</guid>
		<description>Just testet it out...it DOES affect the Backup Chain. So before you run this script take a Full Backup before and after you ran the script.</description>
		<content:encoded><![CDATA[<p>Just testet it out&#8230;it DOES affect the Backup Chain. So before you run this script take a Full Backup before and after you ran the script.</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on A Busy/Accidental DBA&#8217;s Guide to Managing VLFs by Dave Plung</title>
		<link>http://adventuresinsql.com/2009/12/a-busyaccidental-dbas-guide-to-managing-vlfs/comment-page-1/#comment-8336</link>
		<dc:creator>Dave Plung</dc:creator>
		<pubDate>Tue, 13 Mar 2012 07:40:36 +0000</pubDate>
		<guid isPermaLink="false">http://adventuresinsql.com/?p=12#comment-8336</guid>
		<description>Does this script affect the Backup Chain ?</description>
		<content:encoded><![CDATA[<p>Does this script affect the Backup Chain ?</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on How Can I Tell if SQL Agent is Running via SQL? by A. Patterson</title>
		<link>http://adventuresinsql.com/2010/05/how-can-i-tell-if-sql-agent-is-running-via-sql/comment-page-1/#comment-7742</link>
		<dc:creator>A. Patterson</dc:creator>
		<pubDate>Tue, 14 Feb 2012 15:45:31 +0000</pubDate>
		<guid isPermaLink="false">http://adventuresinsql.com/?p=321#comment-7742</guid>
		<description>First, I want to thank you for putting this together - it helped me with some research that I&#039;d been doing for putting together an automated health check process.  I did make some changes however.  When setting the @agent_string variable, I took out the part where you first set it equal to itself.  When the instance name is a NULL value, that just makes the whole variable equal to NULL.  Next, while this &#039;seems&#039; to work ok as-is with the SQL Agent service (although I can&#039;t explain why), after testing this with other services like Full Text, the explicit statement of the service name in the 2nd variable of xp_servicecontrol always refers to the default instance of the installed service.  Instead, you will want to replace the second variable in the xp_servicecontrol call with your @agent_string variable to be sure you&#039;re checking the instance in question.</description>
		<content:encoded><![CDATA[<p>First, I want to thank you for putting this together &#8211; it helped me with some research that I&#8217;d been doing for putting together an automated health check process.  I did make some changes however.  When setting the @agent_string variable, I took out the part where you first set it equal to itself.  When the instance name is a NULL value, that just makes the whole variable equal to NULL.  Next, while this &#8216;seems&#8217; to work ok as-is with the SQL Agent service (although I can&#8217;t explain why), after testing this with other services like Full Text, the explicit statement of the service name in the 2nd variable of xp_servicecontrol always refers to the default instance of the installed service.  Instead, you will want to replace the second variable in the xp_servicecontrol call with your @agent_string variable to be sure you&#8217;re checking the instance in question.</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on How Can I Tell if SQL Agent is Running via SQL? by Oscar Revelo</title>
		<link>http://adventuresinsql.com/2010/05/how-can-i-tell-if-sql-agent-is-running-via-sql/comment-page-1/#comment-7529</link>
		<dc:creator>Oscar Revelo</dc:creator>
		<pubDate>Mon, 30 Jan 2012 15:43:34 +0000</pubDate>
		<guid isPermaLink="false">http://adventuresinsql.com/?p=321#comment-7529</guid>
		<description>Thank you very much, very useful the information</description>
		<content:encoded><![CDATA[<p>Thank you very much, very useful the information</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on Managing the Size of the Security Cache (TokenAndPermUserStore) in SQL 2005 by Raj</title>
		<link>http://adventuresinsql.com/2010/03/managing-the-size-of-the-security-cache-tokenandpermuserstore-in-sql-2005/comment-page-1/#comment-7495</link>
		<dc:creator>Raj</dc:creator>
		<pubDate>Sat, 28 Jan 2012 23:32:11 +0000</pubDate>
		<guid isPermaLink="false">http://adventuresinsql.com/?p=139#comment-7495</guid>
		<description>I too faced this problem 4 years ago on a very heavy OLTP system and got instant relief using DBCC FREESYSTEMCACHE(‘TokenAndPermUserStore’) but I didn&#039;t know about the trace flags until I read your blog post. Thanks for the sharing and the tip to use it in startup parameters.</description>
		<content:encoded><![CDATA[<p>I too faced this problem 4 years ago on a very heavy OLTP system and got instant relief using DBCC FREESYSTEMCACHE(‘TokenAndPermUserStore’) but I didn&#8217;t know about the trace flags until I read your blog post. Thanks for the sharing and the tip to use it in startup parameters.</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on Why Would a Delete Make My Database Grow? by Raj</title>
		<link>http://adventuresinsql.com/2010/06/why-would-a-delete-make-my-database-grow/comment-page-1/#comment-7494</link>
		<dc:creator>Raj</dc:creator>
		<pubDate>Sat, 28 Jan 2012 23:24:59 +0000</pubDate>
		<guid isPermaLink="false">http://adventuresinsql.com/?p=361#comment-7494</guid>
		<description>Yes the post was long was pretty cool to read. We don&#039;t use RCSI but learned something new today. Thank you for sharing your discoveries!</description>
		<content:encoded><![CDATA[<p>Yes the post was long was pretty cool to read. We don&#8217;t use RCSI but learned something new today. Thank you for sharing your discoveries!</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on Why Do I Need All These Servers? by Raj</title>
		<link>http://adventuresinsql.com/2010/02/why-do-i-need-all-these-servers/comment-page-1/#comment-7493</link>
		<dc:creator>Raj</dc:creator>
		<pubDate>Sat, 28 Jan 2012 23:06:20 +0000</pubDate>
		<guid isPermaLink="false">http://adventuresinsql.com/?p=114#comment-7493</guid>
		<description>Nice summary. I know such classifications exist on numerous sites but I found your explanation to be one of the better ones. Thanks for putting this together.</description>
		<content:encoded><![CDATA[<p>Nice summary. I know such classifications exist on numerous sites but I found your explanation to be one of the better ones. Thanks for putting this together.</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on A Busy/Accidental DBA&#8217;s Guide to Managing VLFs by DBA Darwin Awards: Log File Edition &#124; Brent Ozar PLF &#124; Brent Ozar PLF</title>
		<link>http://adventuresinsql.com/2009/12/a-busyaccidental-dbas-guide-to-managing-vlfs/comment-page-1/#comment-7430</link>
		<dc:creator>DBA Darwin Awards: Log File Edition &#124; Brent Ozar PLF &#124; Brent Ozar PLF</dc:creator>
		<pubDate>Tue, 24 Jan 2012 12:30:21 +0000</pubDate>
		<guid isPermaLink="false">http://adventuresinsql.com/?p=12#comment-7430</guid>
		<description>[...] A Busy/Accidental DBA&#8217;s Guide to Managing VLFs &#8211; Dave Levy explains the basics of Virtual Log Files, gives you a script to check how many you&#8217;ve got, and shows how to fix the problem. [...]</description>
		<content:encoded><![CDATA[<p>[...] A Busy/Accidental DBA&#8217;s Guide to Managing VLFs &#8211; Dave Levy explains the basics of Virtual Log Files, gives you a script to check how many you&#8217;ve got, and shows how to fix the problem. [...]</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on Script Individual User Rights in a Database with PowerShell by Colikn</title>
		<link>http://adventuresinsql.com/2009/12/script-individual-user-rights-in-a-database-with-powershell/comment-page-1/#comment-6829</link>
		<dc:creator>Colikn</dc:creator>
		<pubDate>Thu, 15 Dec 2011 21:22:01 +0000</pubDate>
		<guid isPermaLink="false">http://adventuresinsql.com/?p=42#comment-6829</guid>
		<description>You can call $user.script($scriptoptions) here and it works great if your options include DatabaseRoleMemberships and if all your object level permissions are managed via database roles then you are set. It seems to be that the option of permissions does not go get you the object level permissions. That is a HUGE Pain. I will vote on this for sure if the item gets put on connect.</description>
		<content:encoded><![CDATA[<p>You can call $user.script($scriptoptions) here and it works great if your options include DatabaseRoleMemberships and if all your object level permissions are managed via database roles then you are set. It seems to be that the option of permissions does not go get you the object level permissions. That is a HUGE Pain. I will vote on this for sure if the item gets put on connect.</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on Stored Procedures to Store and Get Database Users with All Permissions by Alex Hatcher</title>
		<link>http://adventuresinsql.com/2009/12/stored-procedures-to-store-and-get-database-users-with-all-permissions/comment-page-1/#comment-6184</link>
		<dc:creator>Alex Hatcher</dc:creator>
		<pubDate>Tue, 22 Nov 2011 16:49:21 +0000</pubDate>
		<guid isPermaLink="false">http://adventuresinsql.com/?p=60#comment-6184</guid>
		<description>hi Me again.

I had a DB stop working after a refresh and using these awesome scripts.  the issue was the stupid vendor used the DBOWNER for permissions.

so I added this to the STORE proc near the top of the INSERTS

INSERT permission_store
    select &#039;exec sp_changedbowner [&#039; + suser_sname(owner_sid) + &#039;]&#039;as Command, 
   0 as run_order
    from sys.databases where sys.databases.database_id = DB_ID()</description>
		<content:encoded><![CDATA[<p>hi Me again.</p>
<p>I had a DB stop working after a refresh and using these awesome scripts.  the issue was the stupid vendor used the DBOWNER for permissions.</p>
<p>so I added this to the STORE proc near the top of the INSERTS</p>
<p>INSERT permission_store<br />
    select &#8216;exec sp_changedbowner [' + suser_sname(owner_sid) + ']&#8216;as Command,<br />
   0 as run_order<br />
    from sys.databases where sys.databases.database_id = DB_ID()</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on Stored Procedures to Store and Get Database Users with All Permissions by David Levy</title>
		<link>http://adventuresinsql.com/2009/12/stored-procedures-to-store-and-get-database-users-with-all-permissions/comment-page-1/#comment-4932</link>
		<dc:creator>David Levy</dc:creator>
		<pubDate>Wed, 05 Oct 2011 17:44:28 +0000</pubDate>
		<guid isPermaLink="false">http://adventuresinsql.com/?p=60#comment-4932</guid>
		<description>Good catch. Thanks!</description>
		<content:encoded><![CDATA[<p>Good catch. Thanks!</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on Stored Procedures to Store and Get Database Users with All Permissions by Alex Hatcher</title>
		<link>http://adventuresinsql.com/2009/12/stored-procedures-to-store-and-get-database-users-with-all-permissions/comment-page-1/#comment-4931</link>
		<dc:creator>Alex Hatcher</dc:creator>
		<pubDate>Wed, 05 Oct 2011 17:27:06 +0000</pubDate>
		<guid isPermaLink="false">http://adventuresinsql.com/?p=60#comment-4931</guid>
		<description>I starting using these procs, and they are great.    

then I restored a DB from prod to DEV and all the windows users were unable to connect to the db.    some digging and I noticed that the &quot;store&quot; proc wasn&#039;t saving &quot;window_user&quot;data.

I changed the following snippet to use:

    INSERT  permission_store
    SELECT  &#039;IF NOT EXISTS(SELECT * FROM sys.database_principals WHERE name = &#039;&#039;&#039; + name + &#039;&#039;&#039;) CREATE USER [&#039; + name + &#039;] FOR LOGIN [&#039; + name + &#039;]&#039; + ISNULL(&#039; WITH DEFAULT_SCHEMA=[&#039; + default_schema_name + &#039;]&#039;, &#039;&#039;) AS Command,
            1 AS run_order
    FROM    sys.database_principals
    WHERE   type_desc in (&#039;WINDOWS_GROUP&#039;, &#039;SQL_USER&#039;,&#039;WINDOWS_USER&#039;)
    and type  &#039;S&#039; -- don&#039;t need  dbo, guest, sys, INFO_SCHEMA

let me know what you think, please.</description>
		<content:encoded><![CDATA[<p>I starting using these procs, and they are great.    </p>
<p>then I restored a DB from prod to DEV and all the windows users were unable to connect to the db.    some digging and I noticed that the &#8220;store&#8221; proc wasn&#8217;t saving &#8220;window_user&#8221;data.</p>
<p>I changed the following snippet to use:</p>
<p>    INSERT  permission_store<br />
    SELECT  &#8216;IF NOT EXISTS(SELECT * FROM sys.database_principals WHERE name = &#8221;&#8217; + name + &#8221;&#8217;) CREATE USER [' + name + '] FOR LOGIN [' + name + ']&#8216; + ISNULL(&#8216; WITH DEFAULT_SCHEMA=[' + default_schema_name + ']&#8216;, &#8221;) AS Command,<br />
            1 AS run_order<br />
    FROM    sys.database_principals<br />
    WHERE   type_desc in (&#8216;WINDOWS_GROUP&#8217;, &#8216;SQL_USER&#8217;,'WINDOWS_USER&#8217;)<br />
    and type  &#8216;S&#8217; &#8212; don&#8217;t need  dbo, guest, sys, INFO_SCHEMA</p>
<p>let me know what you think, please.</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on How to Shrink TempDB in SQL 2005 by David Levy</title>
		<link>http://adventuresinsql.com/2009/12/how-to-shrink-tempdb-in-sql-2005/comment-page-1/#comment-4186</link>
		<dc:creator>David Levy</dc:creator>
		<pubDate>Wed, 17 Aug 2011 21:18:20 +0000</pubDate>
		<guid isPermaLink="false">http://adventuresinsql.com/?p=3#comment-4186</guid>
		<description>Ouch! That is way too much. This is the sort of thing that you might do once in a very great while because you can&#039;t restart SQL to fix a problem.

The plan here would be to monitor to see what is using the space and address it accordingly. If nothing can be done to keep TempDB from growing then more disk space will have to be added.

Here is a great write-up to help figure out what is going on: http://technet.microsoft.com/en-us/library/cc966545.aspx</description>
		<content:encoded><![CDATA[<p>Ouch! That is way too much. This is the sort of thing that you might do once in a very great while because you can&#8217;t restart SQL to fix a problem.</p>
<p>The plan here would be to monitor to see what is using the space and address it accordingly. If nothing can be done to keep TempDB from growing then more disk space will have to be added.</p>
<p>Here is a great write-up to help figure out what is going on: <a href="http://technet.microsoft.com/en-us/library/cc966545.aspx" rel="nofollow">http://technet.microsoft.com/en-us/library/cc966545.aspx</a></p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on How to Shrink TempDB in SQL 2005 by karthik</title>
		<link>http://adventuresinsql.com/2009/12/how-to-shrink-tempdb-in-sql-2005/comment-page-1/#comment-4183</link>
		<dc:creator>karthik</dc:creator>
		<pubDate>Wed, 17 Aug 2011 20:49:26 +0000</pubDate>
		<guid isPermaLink="false">http://adventuresinsql.com/?p=3#comment-4183</guid>
		<description>How to avoid temp db shrink.Because weeekly once we are doing it with downtime....Please assist.</description>
		<content:encoded><![CDATA[<p>How to avoid temp db shrink.Because weeekly once we are doing it with downtime&#8230;.Please assist.</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on How Do I Spot Identity Columns That Are About to Max Out? by joe positive</title>
		<link>http://adventuresinsql.com/2010/10/how-do-i-spot-identity-columns-that-are-about-to-max-out/comment-page-1/#comment-3392</link>
		<dc:creator>joe positive</dc:creator>
		<pubDate>Wed, 15 Jun 2011 15:10:37 +0000</pubDate>
		<guid isPermaLink="false">http://adventuresinsql.com/?p=596#comment-3392</guid>
		<description>I came across this long after you wrote it, but thanks very much! Very useful.</description>
		<content:encoded><![CDATA[<p>I came across this long after you wrote it, but thanks very much! Very useful.</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on How is Fill Factor Impacting My Indexes? by David Levy</title>
		<link>http://adventuresinsql.com/2010/09/how-is-fill-factor-impacting-my-indexes/comment-page-1/#comment-3303</link>
		<dc:creator>David Levy</dc:creator>
		<pubDate>Tue, 07 Jun 2011 01:57:01 +0000</pubDate>
		<guid isPermaLink="false">http://adventuresinsql.com/?p=472#comment-3303</guid>
		<description>The query looks at where your fill factor actually is. It measures the results of the design work that you did when setting the fill factor on the table.

In the case where the actual_free_rows_per_page is less than 1 you have to look at your original fill factor and the reasoning for it. If the table can only hold 1 row per page then be honest with the fill factor and just set it to 100. If the index you are looking at holds 100 rows per page and is inserted into randomly and is getting to less than 1 free row per page before the next index maintenanace then it is time to adjust the fill factor.

The idea is to use the least amount of fill factor possible to minimize page splits. What that means for a particular index really depends on the purpose and use of that index.</description>
		<content:encoded><![CDATA[<p>The query looks at where your fill factor actually is. It measures the results of the design work that you did when setting the fill factor on the table.</p>
<p>In the case where the actual_free_rows_per_page is less than 1 you have to look at your original fill factor and the reasoning for it. If the table can only hold 1 row per page then be honest with the fill factor and just set it to 100. If the index you are looking at holds 100 rows per page and is inserted into randomly and is getting to less than 1 free row per page before the next index maintenanace then it is time to adjust the fill factor.</p>
<p>The idea is to use the least amount of fill factor possible to minimize page splits. What that means for a particular index really depends on the purpose and use of that index.</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on How is Fill Factor Impacting My Indexes? by Mark</title>
		<link>http://adventuresinsql.com/2010/09/how-is-fill-factor-impacting-my-indexes/comment-page-1/#comment-3301</link>
		<dc:creator>Mark</dc:creator>
		<pubDate>Mon, 06 Jun 2011 21:05:02 +0000</pubDate>
		<guid isPermaLink="false">http://adventuresinsql.com/?p=472#comment-3301</guid>
		<description>This query has lots of information, but I could use a little more help on determining what to do with it.  Are you saying that any index that has shows &quot;actual_free_rows_per_page&quot; as less than 1 i.e. .67 should have the fillfactor lowered?  For example most of the indexes have a 100% fillfactor so should I begin by changing the fillfactor to 90 and see what the &quot;actual_free_rows_per_page&quot; number ends up?

Thanks</description>
		<content:encoded><![CDATA[<p>This query has lots of information, but I could use a little more help on determining what to do with it.  Are you saying that any index that has shows &#8220;actual_free_rows_per_page&#8221; as less than 1 i.e. .67 should have the fillfactor lowered?  For example most of the indexes have a 100% fillfactor so should I begin by changing the fillfactor to 90 and see what the &#8220;actual_free_rows_per_page&#8221; number ends up?</p>
<p>Thanks</p>
]]></content:encoded>
	</item>
</channel>
</rss>

<!-- Performance optimized by W3 Total Cache. Learn more: http://www.w3-edge.com/wordpress-plugins/

Minified using disk: basic
Page Caching using disk: enhanced
Object Caching 586/622 objects using disk: basic

Served from: adventuresinsql.com @ 2012-05-18 03:37:39 -->
