zoukankan      html  css  js  c++  java
  • [SQL] 命令远程恢复数据库

    sp_configure 'show advanced options', 1; 
    RECONFIGURE;
    GO
    sp_configure 'xp_cmdshell', 1; 
    RECONFIGURE;
    GO
    EXEC master..xp_cmdshell 'net use  \70.2.199.1531111 sds@3150 /user:ARISAMDEV153spfarm';
    
    --RESTORE DATABASE ArisamCafe FILE = N'ArisamCafe' FROM  DISK = N'\70.2.199.1531111ArisamCafe_20160824.bak'
    --WITH MOVE 'ArisamCafe_Data' TO 'D:Microsoft SQL ServerMSSQL10_50.SPSMSSQLDATAArisamCafe_Data.mdf',
    --   MOVE 'ArisamCafe_Log' TO 'D:Microsoft SQL ServerMSSQL10_50.SPSMSSQLDATAArisamCafe_Log.ldf' ,REPLACE;
    --GO
    RESTORE DATABASE ArisamDB FILE = N'ArisamDB' FROM  DISK = N'\70.2.199.1531111ArisamDB_20160824.bak'
    WITH MOVE 'ArisamDB' TO 'D:Microsoft SQL ServerMSSQL10_50.SPSMSSQLDATAArisamDB.mdf',
        MOVE 'ArisamDB2' TO 'D:Microsoft SQL ServerMSSQL10_50.SPSMSSQLDATAArisamDB2.mdf',
       MOVE 'ArisamDB_log' TO 'D:Microsoft SQL ServerMSSQL10_50.SPSMSSQLDATAArisamDB_log.ldf',
       MOVE 'ArisamDB_log2' TO 'D:Microsoft SQL ServerMSSQL10_50.SPSMSSQLDATAArisamDB_log2.ldf' ,REPLACE;
    GO
  • 相关阅读:
    nova 注入adminpass 添加用户等设置
    mysql 集群 avc error
    openstack novnc console haproxy mitaka
    NFS金陵科技学院
    windows下命令行格式化U盘
    linux下安装mysql
    连表查询
    查询语句
    索引
    插入,更新与删除数据
  • 原文地址:https://www.cnblogs.com/Areas/p/5806685.html
Copyright © 2011-2022 走看看