SQL Server xp_cmdshell

后端 未结 4 1515
慢半拍i
慢半拍i 2021-01-26 04:33

Is there any other way to get a list of file names via T-SQL other than

INSERT INTO @backups(filename)
EXEC master.sys.xp_cmdshell \'DIR /b c:\\som         


        
4条回答
  •  误落风尘
    2021-01-26 04:52

    If you have access to the server that backup up the files, you can use the system tables to find the backup file(s) you prefer.

    http://msdn.microsoft.com/en-us/library/ms188062.aspx

    You'll be interested in the backup tables.

提交回复
热议问题