.comment-link {margin-left:.6em;}
Gert .Net
Autoclose and Autoshrink
When you notice that Enterprise Manager is getting slow (very slow) when opening the list of databases on a server, you should probably turn of AUTOCLOSE and AUTOSHRINK.

Here is a script that helps you in doing just that.

declare dbCursor cursor  for select name from sysdatabases
open dbCursor

declare @name as varchar(50)

fetch next from dbCursor into @name

while @@fetch_status = 0
print @name
exec sp_dboption @name, 'autoclose', 'false'
exec sp_dboption @name, 'autoshrink', 'false'

fetch next from dbCursor into @name


close dbCursor
deallocate dbCursor

This is faster because all databases will be left mounted. If AutoClose is true, a lot of databases will have to be mounted in order to construct the list.
Comments: Een reactie plaatsen

Links to this post:

Een koppeling maken

Powered by Blogger