난 당신이 DBA 및/또는 저기 serverfault 사이트에 더 나은 답변을 얻을 것이라고 생각 숨겨진 자원 데이터베이스뿐만 아니라
Use master
GO
--enable
sp_configure 'show advanced options'
GO
/* 0 = Disabled , 1 = Enabled */
sp_configure 'xp_cmdshell', 1
GO
RECONFIGURE WITH OVERRIDE
GO
--===Resource file details
SELECT 'ResourceDB' AS 'Database Name'
, NAME AS [Database File]
, FILENAME AS [Database File Location]
FROM sys.sysaltfiles
WHERE DBID = 32767
ORDER BY [Database File]
GO
--===Copy resource files
DECLARE @ResDataFile VARCHAR(1000), @ResLogFile VARCHAR(1000)
SELECT
@ResDataFile = CASE NAME WHEN 'Data' THEN FILENAME ELSE @ResDataFile END,
@ResLogFile = CASE NAME WHEN 'Log' THEN FILENAME ELSE @ResLogFile END
FROM sys.sysaltfiles
WHERE DBID = 32767
SELECT @ResDataFile, @ResLogFile
DECLARE @cmd VARCHAR(1000)
--===Copy data file
SELECT @cmd = 'COPY /Y "' + @ResDataFile + '" "G:\SQLBackups"'
--PRINT @cmd
EXEC xp_cmdshell @cmd
--===Copy log file
SELECT @cmd = 'COPY /Y "' + @ResLogFile + '" "G:\SQLBackups"'
--PRINT @cmd
EXEC xp_cmdshell @cmd
GO
--Disable
sp_configure 'show advanced options'
GO
/* 0 = Disabled , 1 = Enabled */
sp_configure 'xp_cmdshell', 0
GO
RECONFIGURE WITH OVERRIDE
GO
를 백업하는 것이 좋습니다. – Pondlife