sp_configure 'show advanced options', 1; 
RECONFIGURE;
GO
sp_configure 'xp_cmdshell', 1; 
RECONFIGURE;
GO
EXEC master..xp_cmdshell 'net use  \\70.2.199.153\1111 sds@3150 /user:ARISAMDEV153\spfarm';

--RESTORE DATABASE ArisamCafe FILE = N'ArisamCafe' FROM  DISK = N'\\70.2.199.153\1111\ArisamCafe_20160824.bak'
--WITH MOVE 'ArisamCafe_Data' TO 'D:\Microsoft SQL Server\MSSQL10_50.SPS\MSSQL\DATA\ArisamCafe_Data.mdf',
--   MOVE 'ArisamCafe_Log' TO 'D:\Microsoft SQL Server\MSSQL10_50.SPS\MSSQL\DATA\ArisamCafe_Log.ldf' ,REPLACE;
--GO
RESTORE DATABASE ArisamDB FILE = N'ArisamDB' FROM  DISK = N'\\70.2.199.153\1111\ArisamDB_20160824.bak'
WITH MOVE 'ArisamDB' TO 'D:\Microsoft SQL Server\MSSQL10_50.SPS\MSSQL\DATA\ArisamDB.mdf',
    MOVE 'ArisamDB2' TO 'D:\Microsoft SQL Server\MSSQL10_50.SPS\MSSQL\DATA\ArisamDB2.mdf',
   MOVE 'ArisamDB_log' TO 'D:\Microsoft SQL Server\MSSQL10_50.SPS\MSSQL\DATA\ArisamDB_log.ldf',
   MOVE 'ArisamDB_log2' TO 'D:\Microsoft SQL Server\MSSQL10_50.SPS\MSSQL\DATA\ArisamDB_log2.ldf' ,REPLACE;
GO

 

 

相关文章:

  • 2021-11-19
  • 2022-02-08
  • 2022-12-23
  • 2021-12-05
  • 2022-02-11
  • 2022-01-09
猜你喜欢
  • 2022-12-23
  • 2021-09-02
  • 2021-11-18
  • 2021-10-04
  • 2021-09-30
  • 2022-01-07
  • 2022-12-23
相关资源
相似解决方案