标签:suspend desc 数据文件 esc alter where current alwayson state
将所有副本可读设置为 “否”
在主副本上设置挂起
ALTER DATABASE Erp_Wygl_6008 SET HADR SUSPEND
设置迁移后的文件路径
SELECT database_id,name,physical_name AS CurrentLocation,state_desc,size from sys.master_files
WHERE database_id=db_id(N‘Erp_Wygl_6008‘);
ALTER DATABASE Erp_Wygl_6008 MODIFY FILE ( name = CommID_Data, filename = ‘E:\ErpDataBase\CommID_Data.ndf‘);
ALTER DATABASE Erp_Wygl_6008 MODIFY FILE ( name = CommID_R, filename = ‘E:\ErpDataBase\CommID_R.ndf‘);
停掉数据服务,迁移文件
启动服务,恢复挂起
ALTER DATABASE Erp_Wygl_6008 SET HADR RESUME
将所有副本可读设置为 “是”
标签:suspend desc 数据文件 esc alter where current alwayson state
原文地址:https://www.cnblogs.com/littlewrong/p/14671251.html