전체 글 279

MSSQL 전체 DB Full Backup 스크립트

DECLARE @DIRLIST TABLE([OUTPUT] VARCHAR(1000)) --삭제할백업디렉토리리스트테이블변수 INSERT INTO @DIRLIST EXEC XP_CMDSHELL 'DIR T:\DB_BACKUP\FULL_BACKUP\ /AD /B' --백업디렉토리경로하위에날짜별백업폴더리스트조회하여테이블변수에INSERT DECLARE @CMD VARCHAR(4000) SET @CMD ='' DECLARE @DIRNAME VARCHAR(100) WHILE EXISTS ( SELECT * FROM @DIRLIST WHERE LEN(OUTPUT)=8 AND OUTPUT LIKE '20%' AND OUTPUT

Laboratory/MSSQL 2014.02.25