|
|
|
Ten Centuries
      
Group: General Forum Members
Last Login: Today @ 6:38 AM
Points: 1,111,
Visits: 1,232
|
|
|
|
|
|
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: Yesterday @ 1:14 AM
Points: 334,
Visits: 84
|
|
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
|
|
|
|