环境:
sqlserver alwayson架构
主节点1个
standby节点1个
辅助只读节点1个
问题:
辅助只读节点的数据文件和日志文件的磁盘被写满。
数据文件和日志文件在一个磁盘上。
解决办法:
增加一块磁盘。
1、修改文件的存放位置下次启动生效
AlwaysOn Availability Groups data movement for database 'gbs' has been resumed. This is an informational message only. No user action is required.
辅助只读节点开始追主节点日志,同步恢复正常。
sqlserver alwayson架构
主节点1个
standby节点1个
辅助只读节点1个
问题:
辅助只读节点的数据文件和日志文件的磁盘被写满。
数据文件和日志文件在一个磁盘上。
解决办法:
增加一块磁盘。
1、修改文件的存放位置下次启动生效
alter database
testDb modify file ( name =
testDb, filename = 'G:\SQL_DATA\testDb\testDb.mdf');
--alter database testDb modify file ( name = testDb_log, filename = 'G:\SQL_DATA\testDb\testdb_log.ldf');
这里只更改数据文件位置。
2、关闭 辅助只读节点的sqlserver服务
3、把 辅助只读节点上的数据文件拷贝到新的磁盘上,然后删除老数据文件
4、开启 辅助只读节点的sqlserver服务。
等待 辅助只读节点上数据库自动进行recovery
recovery完成后,可以看到alwayson状态还是不正常,数据还是没有同步。
AlwaysOn Availability Groups connection with primary database established for secondary database 'gbs' on the availability replica 'BPM-NEW-DB02' with Replica ID: {b8841279-8139-43f8-ac69-827c302efd43}. This is an informational message only. No user action is required.
The recovery LSN (7249:925328:1) was identified for the database with ID 5. This is an informational message only. No user action is required.
ALTER DB param option: RESUME
这里只更改数据文件位置。
2、关闭 辅助只读节点的sqlserver服务
3、把 辅助只读节点上的数据文件拷贝到新的磁盘上,然后删除老数据文件
4、开启 辅助只读节点的sqlserver服务。
等待 辅助只读节点上数据库自动进行recovery
![](http://img.blog.itpub.net/blog/attachment/201711/15/22996654_1510679991Q13D.png?x-oss-process=style/bb)
recovery完成后,可以看到alwayson状态还是不正常,数据还是没有同步。
AlwaysOn Availability Groups connection with primary database established for secondary database 'gbs' on the availability replica 'BPM-NEW-DB02' with Replica ID: {b8841279-8139-43f8-ac69-827c302efd43}. This is an informational message only. No user action is required.
The recovery LSN (7249:925328:1) was identified for the database with ID 5. This is an informational message only. No user action is required.
3369 transactions rolled forward in database 'gbs' (5:0). This is an informational message only. No user action is required.
需要在
辅助只读节点上执行:
Recovery completed for database gbs (database ID 5) in 970 second(s) (analysis 210572 ms, redo 491239 ms, undo 0 ms.) This is an informational message only. No user action is required.
AlwaysOn Availability Groups data movement for database 'gbs' has been resumed. This is an informational message only. No user action is required.
AlwaysOn Availability Groups connection with primary database established for secondary database 'gbs' on the availability replica 'BPM-NEW-DB02' with Replica ID: {b8841279-8139-43f8-ac69-827c302efd43}. This is an informational message only. No user action is required.
The recovery LSN (7249:925328:1) was identified for the database with ID 5. This is an informational message only. No user action is required.
辅助只读节点开始追主节点日志,同步恢复正常。
来自 “ ITPUB博客 ” ,链接:http://blog.itpub.net/22996654/viewspace-2147264/,如需转载,请注明出处,否则将追究法律责任。
转载于:http://blog.itpub.net/22996654/viewspace-2147264/