create proc back_my as begin exec master..xp_cmdshell 'net use z: \\jd-p6brkymgvey6\D$\ZY "34757" /user:jd-p6brkymgvey6\caoyan'declare @date backup database my to disk='c:\my.bak' with init exec master..xp_cmdshell 'copy c:\my.bak z:'exec master..xp_cmdshell 'net use z: /delete' end
as
begin
exec master..xp_cmdshell 'net use z: \\jd-p6brkymgvey6\D$\ZY "34757" /user:jd-p6brkymgvey6\caoyan'declare @date
backup database my to disk='c:\my.bak' with init exec master..xp_cmdshell 'copy c:\my.bak z:'exec master..xp_cmdshell 'net use z: /delete'
end