전체 글
데이터베이스 간략정보 추출 쿼리
MSSQL 2005 이상부터 사용이 가능합니다. SELECT sysDa.Name,sysDa.create_date,sysDa.recovery_model_desc, temp.DBSize8KBPageFROM( SELECT sysMas.database_ID, sysMas.size, (sum(size)*8/1024)-2 AS DBSize8KBPage FROM sys.master_Files sysMasWHERE sysMas.file_guid is Not Null and sysMas.type=0 GROUP BY sysMas.DataBase_ID, sysMas.size)tempINNER JOINSys.DATABASES sysDaON temp.Database_ID = sysDa.DataBase_IDWHERE sysDa...
UTC 시간을 확인하기 위한 스크립트
http://www.u229.no/stuff/snippets/UTC.asphttp://www.paulsadowski.com/wsh/timestamp.htm Sample output:timestamp.vbs 1041812764 timestamp.vbs 1041812764Mon Jan 6 00:26:04 2003 You can specify multiple timestamps on the command-line. Please change the constant 'off' to reflect the offset in hours from UTC for your locale. -----------------------------------------------------------------------------..
2년전 백업 정보 삭제 쿼리(mssql 2000)
DECLARE @backupID intDECLARE @mediaID intDECLARE @restoreID int DECLARE @year char(4)DECLARE @month char(2)DECLARE @day char(2)DECLARE @deleteday char(10) SET @year = year(getdate())-2 -- 2년전SET @month = month(getdate())SET @day = day(getdate())IF len(@month) = 1 SET @month = '0'+ @monthIF len(@day) = 1 SET @day = '0'+ @daySET @deleteday = @year +'-'+ @month +'-'+ @day SELECT TOP 1 @backupID = b..