|
|
|
Ten Centuries
      
Group: General Forum Members
Last Login: Today @ 8:10 AM
Points: 1,078,
Visits: 1,144
|
|
|
|
|
|
SSC-Enthusiastic
      
Group: General Forum Members
Last Login: Wednesday, May 08, 2013 1:35 AM
Points: 139,
Visits: 4,605
|
|
| It would be nice to know the space used and the space available too...
|
|
|
|
|
Old Hand
      
Group: General Forum Members
Last Login: Friday, April 12, 2013 2:07 AM
Points: 334,
Visits: 82
|
|
A condition in a where clause should be :
insert into #spacetemp (DBname,DBcreationDate,DBStatusid,DBStatus) select [name],crdate, status,case when status=1 then 'autoclose' (....) end from master..sysdatabases where (status & 512 = 0) and dbid >case when @sysdb=1 then 0 else 4 end
To prevent crash on a offline databases.
Regards, Yenidai
|
|
|
|