how to set autogrow off in script? | SQL Server Performance Forums

SQL Server Performance Forum – Threads Archive

how to set autogrow off in script?

Hi Everybody!
Please help –
I cannot find how to reset "automatically grow file" feature(turn it off) in script – if it’s even possible.
I googled for some time and looked thru the books and books online – cannot find anything..I thought it should be some sp_ for this purpose…. Thanks in advance!
Natasha
Something like
USE master
GO
ALTER DATABASE Test1
MODIFY FILE
(NAME = test1dat3,
SIZE = 20MB)
GO
Gaurav
Moderator
Man thrives, oddly enough, only in the presence of a challenging environment- L. Ron Hubbard

I have this alredy in my script – size and maxsize the same – i need to turn off autofrow feature it’s tide up with some tuning issues.
Thanks!
sp_dbOption ‘database name’, autoshrink, off Gaurav
Moderator
Man thrives, oddly enough, only in the presence of a challenging environment- L. Ron Hubbard

When i go to properties of database, to data files – under file properties you can check/uncheck "Automatically grow file" – My question is how to do the same with a script?
Or if it’s possible – I cannot fine any reference to this. Thanks!
Natasha
Ok – In case anybody will be interested – I found out how to do it
Set FILEGROWTH = 0% in alter database – it will uncheck Autogrow. Thanks!
Natasha
Yes its not available on books online or any other document, you will get to know if you monitor the activity using PROFILER. Satya SKJ
Moderator
http://www.SQL-Server-Performance.Com/forum
This posting is provided “AS IS” with no rights for the sake of knowledge sharing.
]]>