DECLARE @strPath NVARCHAR(200)
set @strPath = convert(NVARCHAR(19),getdate(),120)
set @strPath = REPLACE(@strPath, ':' , '.')
set @strPath = 'E:\拓扑物业管理系统网络版数据备份\' + 'TOPPower_Net'+@strPath + '.bak'
BACKUP DATABASE [TOPPower_Net] TO DISK = @strPath WITH NOINIT , NOUNLOAD , NOSKIP , STATS = 10, NOFORMAT
DECLARE @strPath NVARCHAR(200)
set @strPath = convert(NVARCHAR(19),getdate(),120)
set @strPath = REPLACE(@strPath, ':' , '.')
set @strPath = 'd:\拓扑物业管理系统\bak\' + 'TOPPower_Net'+@strPath + '.bak'
BACKUP DATABASE [TOPPower_Net] TO DISK = @strPath WITH NOINIT , NOUNLOAD , NOSKIP , STATS = 10, NOFORMAT
DECLARE @strPath NVARCHAR(200)
set @strPath = convert(NVARCHAR(19),getdate(),120)
set @strPath = REPLACE(@strPath, ':' , '.')
set @strPath = 'E:\物业系统数据备份\' + 'TOPPower_Net'+@strPath + '.bak'
BACKUP DATABASE [TOPPower_Net] TO DISK = @strPath WITH NOINIT , NOUNLOAD , NOSKIP , STATS = 10, NOFORMAT
RESTORE DATABASE TOPPower_NET
FROM DISK = 'D:\TOPPower_Net2022-03-19 12.23.53.bak'
WITH MOVE 'TOPPower_NET_Data' TO 'D:\拓扑物业管理系统\database\TOPPower_NET_Data.mdf',
MOVE 'TOPPower_NET_Log' TO 'D:\拓扑物业管理系统\database\TOPPower_NET_Log.ldf',
STATS = 10, REPLACE
GO