文件名称:pb9.0+SQL2000 执行自动备份的步骤
文件大小:7KB
文件格式:TXT
更新时间:2015-08-12 09:49:33
SQL2000
pb9.0+SQL2000 执行自动备份的步骤 --SQL 执行自动备份的步骤 -- 创建 自动备份存储过程 Create Procedure pro_Autobackup WITH ENCRYPTION As Declare @Ex_Path Varchar(200) Declare @Path Varchar(1000) Select @Ex_Path='_'+Rtrim(ltrim(Convert(Char,Getdate(),112)))+'_'+ltrim(Rtrim(DatePart(Hour,Getdate())))+'.bak' Backup log databasename with no_log Select @path='d:\\'+@Ex_Path Backup Database databasename To Disk=@Path -- 创建自动备份作业 DECLARE @JobID BINARY(16) IF (SELECT COUNT(*) FROM msdb.dbo.syscategories WHERE name = N'[Uncategorized (Local)]') < 1 ..................