alwayson只读节点数据文件的磁盘被写满

环境:
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.
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.
需要在 辅助只读节点上执行:
ALTER DB param option: RESUME

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/

  • 0
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值