时间:2021-07-01 10:21:17 帮助过:8人阅读
将所有副本可读设置为 “否”
在主副本上设置挂起
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
将所有副本可读设置为 “是”
sql server alwayson 调整数据文件路径
标签:suspend desc 数据文件 esc alter where current alwayson state