zoukankan      html  css  js  c++  java
  • SQLServerCluster 更换instance root目录

             公司有个sqlserver cluster所在的存储是HP P2000,因为HP P2000下线需将整个数据库存储转移到DELL存储上,用户数据库umount后再将文件复制到新存储上再attach,instance 根目录所在盘需要在windows cluster上进行替换,步骤如下:

    1. 先将新磁盘挂载到服务器上(上线、初始化等一系列的操作)

    注意:不要添加到Windows Cluster中

    2.       将数据库服务下线,避免在移动数据文件的过程中文件发生更改。

    3.       单独上线旧的数据盘Y:(即上线系统数据库盘)

    4.       运行robocopy命令将数据文件从Y:盘拷贝到新盘Z:(请您分别全部拷贝系统数据库到新的磁盘)

              robocopy<source path><destination path> /Copyall /E /dcopy:T /b /R:3 /W:1 /Log:C: obocopy-log.txt /NP

                    * /E for Recursive directories

                    * /COPYALL to preserve permssions

                    * /DCOPY:T copy all directorys' timestamps (you need to remove this parameter on server 2003, it is only supported after 2008)

                    * /b to use backup mode

                    * /R:3 to retry 3 times when fail

                    * /W:1 to wait 1 second when retry

                    * /Log:C: obocopy-log.txt enable logging

                    * /NP Specifies that the progress of the copying operation (the number of files or directories copied so far) will not be displayed.

    5.       将旧的盘Y: 下线:

    6.       右键More Actions… 点击Repair:

    7.       在弹出的Repair a Disk Resource窗口中,选择新的数据盘,并点击OK。(这里并不显示盘符,所以您可以到Disk Management里面看Z:盘的磁盘信息。)

     

    8.       Repair 完成之后,可以将新的盘Online。

     

    9.   请查看当前Online的盘符,如果已经和原盘符相同,那么不需要更改;如果和原盘符不同,那么需要修改磁盘的盘符号为原来的Y:

     

    10.   至此,您可以将数据库启动模式解禁并将数据库上线。

     

    回退方法:

    1. 请将SQL Server资源再次下线
    2. 将需要回退的磁盘资源下线

          3.再次Repair,使用之前的旧磁盘进行替换

          4.上线之后检查盘符,并始终确保SQL Server使用的盘符不变

          5.将SQL Server资源上线

  • 相关阅读:
    断开/删除 SVN 链接(.svn)的几种方法
    Android 中 ListView 常用属性合集
    Android 中 GridView 常用属性合集
    LeetCode-387-字符串中的第一个唯一字符
    LeetCode-374-猜数字大小
    LeetCode-290-单词规律
    LeetCode-278-第一个错误的版本
    LeetCode-383-赎金信
    LeetCode-367-有效的完全平方数
    LeetCode-350-两个数组的交集 II
  • 原文地址:https://www.cnblogs.com/dotagg/p/6657070.html
Copyright © 2011-2022 走看看