备份数据库的存储过程.sql

2021-04-26 10:53:43 浏览数 (2)

CREATE PROCEDURE [dbo].[back_pubs] AS declare @filename nvarchar(100) set @filename=’F:/data/pub_bp’ convert(char(10),getdate(),112) –目录一定要存在 print @filename BACKUP DATABASE [pubs] TO DISK = @filename WITH NOINIT , NOUNLOAD , NAME = N’pubs备份’, NOSKIP , STATS = 10, NOFORMAT

exec back_pubs

发布者:全栈程序员栈长,转载请注明出处:https://javaforall.cn/100640.html原文链接:

0 人点赞