<?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; 2005 &#8211; SSMS &#8211; Enable Autogrowth Database Property</title>
	<atom:link href="http://blog.sqlauthority.com/2007/08/08/sql-server-2005-ssms-enable-autogrowth-database-property/feed/" rel="self" type="application/rss+xml" />
	<link>http://blog.sqlauthority.com/2007/08/08/sql-server-2005-ssms-enable-autogrowth-database-property/</link>
	<description>Notes of a SQL Server MVP and Database Administrator</description>
	<lastBuildDate>Sat, 21 Nov 2009 05:54:09 +0000</lastBuildDate>
	<generator>http://wordpress.com/</generator>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
		<item>
		<title>By: Kyle</title>
		<link>http://blog.sqlauthority.com/2007/08/08/sql-server-2005-ssms-enable-autogrowth-database-property/#comment-54861</link>
		<dc:creator>Kyle</dc:creator>
		<pubDate>Fri, 14 Aug 2009 17:35:14 +0000</pubDate>
		<guid isPermaLink="false">http://blog.sqlauthority.com/2007/08/08/sql-server-2005-ssms-enable-autogrowth-database-property/#comment-54861</guid>
		<description>I am trying to figure out code to run every time a database is created, so this would all be part of a trigger on create of any database. My idea is to change the autogrowth for that database if it meets certain requirements. Right now when i execute the code it executes fine, but will not actually change the autogrowth for the database :(. 

DELCARE @dbname nvarchar(100), @File1Growth nvarchar(10), @File2Growth nvarchar(10)
SET @bdname = &#039;TempDatabase&#039; 

SET @SQLSTRING =
(
	&#039; USE &#039; + @dbname + 
	&#039; SET &#039; + @File1Growth + &#039; = &#039; + 
	&#039; ( &#039; +
	&#039;	SELECT sysfiles.growth &#039; +
	&#039;	FROM sysfiles &#039; +
	&#039;	WHERE sysfiles.FileId = 1 &#039; +
	&#039; ); &#039; +
	
	&#039; SET &#039; + @File2Growth + &#039; = &#039; + 
	&#039; ( &#039; +
	&#039;	SELECT sysfiles.growth &#039; +
	&#039;	FROM sysfiles &#039; +
	&#039;	WHERE sysfiles.FileId = 2 &#039; +
	&#039; ); &#039; +
		
	&#039; IF &#039; + @File1Growth + &#039; &lt;= 1 &#039; + 
		&#039; ALTER DATABASE &#039; +  @dbname + 
			&#039; MODIFY FILE (NAME = &#039; + @dbname + &#039;,FILEGROWTH = 4MB);&#039; +
	
	&#039; IF &#039; + @File2Growth + &#039; &lt;= 10 &#039; +
		&#039; ALTER DATABASE &#039; +  @dbname + 
			&#039; MODIFY FILE (NAME = &#039; + @dbname + &#039;_Log,FILEGROWTH = 4MB);&#039;
);

EXEC SP_EXECUTESQL @SQLSTRING


I am wondering if anyone has any ideas that may work?</description>
		<content:encoded><![CDATA[<p>I am trying to figure out code to run every time a database is created, so this would all be part of a trigger on create of any database. My idea is to change the autogrowth for that database if it meets certain requirements. Right now when i execute the code it executes fine, but will not actually change the autogrowth for the database :(. </p>
<p>DELCARE @dbname nvarchar(100), @File1Growth nvarchar(10), @File2Growth nvarchar(10)<br />
SET @bdname = &#8216;TempDatabase&#8217; </p>
<p>SET @SQLSTRING =<br />
(<br />
	&#8216; USE &#8216; + @dbname +<br />
	&#8216; SET &#8216; + @File1Growth + &#8216; = &#8216; +<br />
	&#8216; ( &#8216; +<br />
	&#8216;	SELECT sysfiles.growth &#8216; +<br />
	&#8216;	FROM sysfiles &#8216; +<br />
	&#8216;	WHERE sysfiles.FileId = 1 &#8216; +<br />
	&#8216; ); &#8216; +</p>
<p>	&#8216; SET &#8216; + @File2Growth + &#8216; = &#8216; +<br />
	&#8216; ( &#8216; +<br />
	&#8216;	SELECT sysfiles.growth &#8216; +<br />
	&#8216;	FROM sysfiles &#8216; +<br />
	&#8216;	WHERE sysfiles.FileId = 2 &#8216; +<br />
	&#8216; ); &#8216; +</p>
<p>	&#8216; IF &#8216; + @File1Growth + &#8216; &lt;= 1 &#039; +<br />
		&#039; ALTER DATABASE &#039; +  @dbname +<br />
			&#039; MODIFY FILE (NAME = &#039; + @dbname + &#039;,FILEGROWTH = 4MB);&#039; +</p>
<p>	&#039; IF &#039; + @File2Growth + &#039; &lt;= 10 &#039; +<br />
		&#039; ALTER DATABASE &#039; +  @dbname +<br />
			&#039; MODIFY FILE (NAME = &#039; + @dbname + &#039;_Log,FILEGROWTH = 4MB);&#039;<br />
);</p>
<p>EXEC SP_EXECUTESQL @SQLSTRING</p>
<p>I am wondering if anyone has any ideas that may work?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Rahul</title>
		<link>http://blog.sqlauthority.com/2007/08/08/sql-server-2005-ssms-enable-autogrowth-database-property/#comment-42580</link>
		<dc:creator>Rahul</dc:creator>
		<pubDate>Tue, 09 Sep 2008 05:56:35 +0000</pubDate>
		<guid isPermaLink="false">http://blog.sqlauthority.com/2007/08/08/sql-server-2005-ssms-enable-autogrowth-database-property/#comment-42580</guid>
		<description>hi dave
how can i set the growth file size ........?
is it will create any problem during DB transaction??</description>
		<content:encoded><![CDATA[<p>hi dave<br />
how can i set the growth file size &#8230;&#8230;..?<br />
is it will create any problem during DB transaction??</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: gavin</title>
		<link>http://blog.sqlauthority.com/2007/08/08/sql-server-2005-ssms-enable-autogrowth-database-property/#comment-41798</link>
		<dc:creator>gavin</dc:creator>
		<pubDate>Tue, 19 Aug 2008 19:43:13 +0000</pubDate>
		<guid isPermaLink="false">http://blog.sqlauthority.com/2007/08/08/sql-server-2005-ssms-enable-autogrowth-database-property/#comment-41798</guid>
		<description>I have  a problem with the auto growth, for some reason sql 2005 changes the auto growth to grow by either 6400 or 1440 %. i cant disable it because there is more inserting then selecting. 
if anyway could could give me a solution it will really be appreciated.

regarads gavin
please mail it to me.
</description>
		<content:encoded><![CDATA[<p>I have  a problem with the auto growth, for some reason sql 2005 changes the auto growth to grow by either 6400 or 1440 %. i cant disable it because there is more inserting then selecting.<br />
if anyway could could give me a solution it will really be appreciated.</p>
<p>regarads gavin<br />
please mail it to me.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Cherie</title>
		<link>http://blog.sqlauthority.com/2007/08/08/sql-server-2005-ssms-enable-autogrowth-database-property/#comment-41792</link>
		<dc:creator>Cherie</dc:creator>
		<pubDate>Tue, 19 Aug 2008 16:20:09 +0000</pubDate>
		<guid isPermaLink="false">http://blog.sqlauthority.com/2007/08/08/sql-server-2005-ssms-enable-autogrowth-database-property/#comment-41792</guid>
		<description>Even though I change the autogrowth with method above, its still 1280% in sysfiles like when I do:

select * from sysfiles</description>
		<content:encoded><![CDATA[<p>Even though I change the autogrowth with method above, its still 1280% in sysfiles like when I do:</p>
<p>select * from sysfiles</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Dusko</title>
		<link>http://blog.sqlauthority.com/2007/08/08/sql-server-2005-ssms-enable-autogrowth-database-property/#comment-34402</link>
		<dc:creator>Dusko</dc:creator>
		<pubDate>Mon, 17 Mar 2008 17:53:18 +0000</pubDate>
		<guid isPermaLink="false">http://blog.sqlauthority.com/2007/08/08/sql-server-2005-ssms-enable-autogrowth-database-property/#comment-34402</guid>
		<description>Hi Dave,

Good article. On one of my DB instances, SQL Server always reset this to &quot;Restricted File Growth&quot;. I tried few times to define Unrestricted File Growth, and server always reverts it bac to restricted. Any idea what could be wrong?</description>
		<content:encoded><![CDATA[<p>Hi Dave,</p>
<p>Good article. On one of my DB instances, SQL Server always reset this to &#8220;Restricted File Growth&#8221;. I tried few times to define Unrestricted File Growth, and server always reverts it bac to restricted. Any idea what could be wrong?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Kostas Michas</title>
		<link>http://blog.sqlauthority.com/2007/08/08/sql-server-2005-ssms-enable-autogrowth-database-property/#comment-19348</link>
		<dc:creator>Kostas Michas</dc:creator>
		<pubDate>Tue, 13 Nov 2007 10:50:14 +0000</pubDate>
		<guid isPermaLink="false">http://blog.sqlauthority.com/2007/08/08/sql-server-2005-ssms-enable-autogrowth-database-property/#comment-19348</guid>
		<description>That&#039;s a usefull info, thanks Dave.</description>
		<content:encoded><![CDATA[<p>That&#8217;s a usefull info, thanks Dave.</p>
]]></content:encoded>
	</item>
</channel>
</rss>
