Please start any new threads on our new site at We've got lots of great SQL Server experts to answer whatever question you can come up with.

Our new SQL Server Forums are live! Come on over! We've restricted the ability to create new threads on these forums.

SQL Server Forums
Profile | Active Topics | Members | Search | Forum FAQ
Save Password
Forgot your Password?

 All Forums
 Old Forums
 CLOSED - General SQL Server
 Forum Locked
 Printer Friendly
Author Previous Topic Topic Next Topic  

Starting Member

36 Posts

Posted - 11/21/2005 :  02:59:43  Show Profile
Hi fellows,
i would like to change the Autoshrink status from ON to OFF and viceversa,
i just found only how to check what the status is with
SELECT DATABASEPROPERTY('myDatabase', 'isAutoshrink')
Is there anybody to know how to change it (not by Enterprise manager)
just with a query.

Thanks a lot

In (Som, Ni, Yak)

17689 Posts

Posted - 11/21/2005 :  03:09:04  Show Profile
use sp_dboption @dbname, 'autoshrink', TRUE

check out the Book Online for details

Go to Top of Page

Starting Member

36 Posts

Posted - 11/21/2005 :  03:16:23  Show Profile
Thanks a lot Khtan, it is working fine
Go to Top of Page
  Previous Topic Topic Next Topic  
 Forum Locked
 Printer Friendly
Jump To:
SQL Server Forums © 2000-2009 SQLTeam Publishing, LLC Go To Top Of Page
This page was generated in 0.02 seconds. Powered By: Snitz Forums 2000