精华内容
下载资源
问答
  • but the screen still always on regardless wave or not waving on the proximity sensor. Please fix this issue as soonest because it drain my phone battery super fast from 100% to 35% for 6 hours (this ...
  • always on perfon

    2015-10-13 11:08:40
    监控ALWAYS ON 性能分析,可以分析相关事务日志是否有延迟。
  • [AlwaysOn Availability Groups]AlwaysOn等待类型 AlwaysOn等待类型 当排查AlwaysOn延迟,等待统计信息可以在DMV中查看累计的AlwaysOn等待类型。 查看AlwaysOn等待类型 SELECT * FROM...

    AlwaysOn等待类型

    当排查AlwaysOn延迟,等待统计信息可以在DMV中查看累计的AlwaysOn等待类型。

    查看AlwaysOn等待类型

    SELECT * FROM sys.dm_os_wait_stats

    WHERE wait_type LIKE '%hadr%'

    ORDER BY wait_time_ms DESC

    使用一下语句,获取捕获扩展事件,等待类型。

    CREATE EVENT SESSION [alwayson] ON SERVER

    ADD EVENT sqlos.wait_info(

        WHERE ([wait_type]=(758) OR [wait_type]=(776) OR [wait_type]=(853) OR [wait_type]=(833)))

    WITH (MAX_MEMORY=4096 KB,EVENT_RETENTION_MODE=ALLOW_SINGLE_EVENT_LOSS,MAX_DISPATCH_LATENCY=30 SECONDS,

    MAX_EVENT_SIZE=0 KB,MEMORY_PARTITION_MODE=NONE,TRACK_CAUSALITY=OFF,STARTUP_STATE=OFF)

    GO

    可以通过以下查询,查看等待类型的k-v映射

    SELECT * FROM sys.dm_xe_map_values

    WHERE name='wait_types' AND map_value LIKE '%hadr%'

    ORDER BY map_key ASC

     

    posted on 2015-11-22 20:50 Fanr_Zh 阅读(...) 评论(...) 编辑 收藏

    转载于:https://www.cnblogs.com/Amaranthus/p/4986710.html

    展开全文
  • [AlwaysOn Availability Groups]AlwaysOn Ring Buffers AlwaysOn Ring Buffers 一些AlwaysOn的诊断信息可以从SQL Server ring buffers。或者从sys.dm_os...

    AlwaysOn Ring Buffers

    一些AlwaysOn的诊断信息可以从SQL Server ring buffers。或者从sys.dm_os_ring_buffersring bufferSQL Server启动的时候被创建,SQL Server系统为内部诊断记录警告。

    通过以下查询获取所有事件记录

    SELECT * FROM sys.dm_os_ring_buffers WHERE ring_buffer_type LIKE '%HADR%'

    为了让数据更加可控,可以通过日期,ring buffer类型来过滤数据。以下是获取指定ring buffer的查询

    DECLARE @runtime datetime

    SET @runtime = GETDATE()

    SELECT CONVERT (varchar(30), @runtime, 121) as data_collection_runtime,

    DATEADD (ms, -1 * (inf.ms_ticks - ring.[timestamp]), GETDATE()) AS ring_buffer_record_time,

    ring.[timestamp] AS record_timestamp, inf.ms_ticks AS cur_timestamp, ring.*

    FROM sys.dm_os_ring_buffers ring

    CROSS JOIN sys.dm_os_sys_info inf where ring_buffer_type='<RING_BUFFER_TYPE>'

    Record列包含了XML格式的诊断信息。XML数据和ring buffer类型不同。 为了让XML更加可读,你需要客户化TSQL提取想要的XML元素。比如如下语句,获取所有RING_BUFFER_HADRDBMGR_API ring buffer,并且XML数据放入独立的表的列。

    WITH hadr(ts, type, record) AS

    (

      SELECT timestamp AS ts, ring_buffer_type AS type, CAST(record AS XML) AS record

      FROM sys.dm_os_ring_buffers WHERE ring_buffer_type = 'RING_BUFFER_HADRDBMGR_API'

    )

    SELECT

      ts,

      type,

      record.value('(./Record/@id)[1]','bigint') AS [Record ID],

      record.value('(./Record/@time)[1]','bigint') AS [Time],

      record.value('(./Record/HadrDbMgrAPI/dbId)[1]', 'bigint') AS [DBID],

      record.value('(/Record/HadrDbMgrAPI/API)[1]', 'varchar(50)') AS [API],

      record.value('(/Record/HadrDbMgrAPI/Action)[1]', 'varchar(50)') AS [Action],

      record.value('(/Record/HadrDbMgrAPI/role)[1]', 'int') AS [Role],

      record.value('(/Record/Stack)[1]', 'varchar(100)') AS [Call Stack]

    FROM hadr

    ORDER BY record.value('(./Record/@time)[1]','bigint') DESC

    GO

    1. AlwaysOn Ring Buffer类型

    sys.dm_os_ring_buffers4种类的ring buffer

     

    AlwaysOn Ring Buffer Type

    Description

    RING_BUFFER_HADRDBMGR_API

    Records state transitions that have taken place or are taking place. When looking at the state transitions pay close attention to the objectType values.

    XML

    <Recordid="11" type="RING_BUFFER_HADRDBMGR_STATE" time="860243">

      <HadrDbMgrState>

        <objectType>HadrUsers</objectType>

        <currentState>HDbMState_Starting</currentState>

        <proposedState>HDbMState_Started</proposedState>

        <targetState>HDbMState_Started</targetState>

        <legalTransition>Y</legalTransition>

        <role>1</role>

      </HadrDbMgrState>

    </Record>

    RING_BUFFER_HADRDBMGR_STATE

    Records internal method or function calls made by AlwaysOn activity. It can show information such as suspend, resume, or role changes, including both the entry and exit points.

    XML

    <Recordid="45" type="RING_BUFFER_HADRDBMGR_STATE" time="1723487912">

      <HadrDbMgrState>

        <dbId>5</dbId>

        <objectType>HadrDbMgr</objectType>

        <currentState>HDbMState_Starting</currentState>

        <proposedState>HDbMState_Started</proposedState>

        <targetState>HDbMState_Started</targetState>

        <legalTransition>Y</legalTransition>

        <role>2</role>

      </HadrDbMgrState>

    </Record>

    RING_BUFFER_HADRDBMGR_COMMIT

    XML

    <Recordid="0" type="RING_BUFFER_HADRDBMGR_COMMIT" time="1723475368">

      <HadrDbMgrCommitPolicy>

        <dbId>5</dbId>

        <replicaId>883a18f5-97d5-450f-8f8f-9983a4fa5299</replicaId>

        <dbHardenPolicy>KillAll</dbHardenPolicy>

        <dbSyncConfig>0x0</dbSyncConfig>

        <syncPartnerCount>0</syncPartnerCount>

        <minSyncPartnerConfig>0</minSyncPartnerConfig>

        <partnerHardenPolicy>KillAll</partnerHardenPolicy>

        <partnerSyncConfig>0x0</partnerSyncConfig>

        <logBlock>0x0000000000000000</logBlock>

        <leaseExpired>Y</leaseExpired>

        <partnerChange>N</partnerChange>

        <role>2</role>

      </HadrDbMgrCommitPolicy>

    </Record>

    RING_BUFFER_HADR_TRANSPORT_STATE

    XML

    <Recordid="3" type="RING_BUFFER_HADR_TRANSPORT_STATE" time="1723485399">

      <HadrTransportState>

        <agId>08264B79-D10B-412F-B38D-CA07B08E9BD8</agId>

        <localArId>883A18F5-97D5-450F-8F8F-9983A4FA5299</localArId>

        <targetArId>628D6349-72DD-4D18-A6E1-1272645660BA</targetArId>

        <currentState>HadrSession_Configuring</currentState>

        <targetState>HadrSession_Connected</targetState>

        <legalTransition>Y</legalTransition>

      </HadrTransportState>

    </Record>

    2. Ring Buffer 解析XML数据

    你可以从ring buffer解析数据。你先要使用cast转化到XML

    WITH hadr(ts, type, record) AS

       (SELECT timestamp AS ts, ring_buffer_type AS type, CAST(record AS XML) AS record

    FROM sys.dm_os_ring_buffers

    WHERE ring_buffer_type = 'RING_BUFFER_HADRDBMGR_API')

    SELECT ts,

    type,

    record.value('(./Record/@id)[1]','bigint') AS [Record id],

    record.value('(./Record/@time)[1]','bigint') AS [Time],

    record.value('(./Record/HadrDbMgrAPI/dbId)[1]', 'bigint') AS [dbid],

    record.value('(/Record/HadrDbMgrAPI/API)[1]', 'varchar(50)') AS [API],

    record.value('(/Record/HadrDbMgrAPI/Action)[1]', 'varchar(50)') AS [Action],

    record.value('(/Record/HadrDbMgrAPI/role)[1]', 'int') AS [Role],

    record.value('(/Record/Stack)[1]', 'varchar(100)') AS [Call Stack]

    FROM hadr

    ORDER BY record.value('(./Record/@time)[1]','bigint') DESC

    GO

     

    posted on 2015-11-22 22:01 Fanr_Zh 阅读(...) 评论(...) 编辑 收藏

    转载于:https://www.cnblogs.com/Amaranthus/p/4986900.html

    展开全文
  • 简介SQL Server2012中新增的AlwaysOn是一个新增高可用性解决方案。在AlwaysOn之前,SQL Server已经有的高可用性和数据恢复方案,比如数据库镜像,日志传送和故障转移集群.都有其自身的局限性。而AlwaysOn作为微软新...

    简介

    SQL Server2012中新增的AlwaysOn是一个新增高可用性解决方案。在AlwaysOn之前,SQL Server已经有的高可用性和数据恢复方案,比如数据库镜像,日志传送和故障转移集群.都有其自身的局限性。而AlwaysOn作为微软新推出的解决方案,提取了数据库镜像和故障转移集群的优点。本文旨在通过实现一个AlwaysOn的实例来展现AlwaysOn。

    配置AlwaysOn

    虽然AlwaysOn相比较之前版本的故障转移集群而言,步骤已经简化了许多。但配置AlwaysOn依然是一件比较麻烦的事,不仅需要你对SQL Server比较熟悉,还需要对Windows Server有所了解。本文配置AlwaysOn分为两个板块,分别为:配置Windows和配置SQL Server。

    在开始说道配置Windows之前,首先简单介绍一下测试环境。

    我搭了三台Windows Server 2008的虚拟机(SQL SERVER 2012比较麻烦,必须2008 sp2以上版本windows server才能安装),如图1所示。其中将活动目录和DNS服务器安在了Windows Server2008 Server 1.没有启用DHCP服务器,三台服务器的IP分别为192.168.100.1/24,192.168.100.2/24,192.168.100.3/24。

    6bc9f12ce479e0ab5cdc0a1ad62bf0b7.png

    图1.三台装有Windows Server2008的测试虚拟机

    三台服务器都加入了由Windows Server 2008 Server1作为AD建立域SQL2012.TEST。三台虚拟机的名称分别为SQLServerTest1,SQLServerTest2,SQLServerTest3。

    配置Windows Server

    首先在分别在三台测试服务器上安装故障转移集群的功能,如图2所示。

    42d5c37b1469034f1f419dac61f08cee.png

    图2.在测试服务器上安装故障转移集群的功能

    在安装好故障转移集群的功能之后,在Server1上进行对集群的配置.如图3所示。

    68f88e28cb52725a1607df2a826eec4c.png

    图3.在故障转移集群管理中创建集群

    然后在接下来的步骤中,将三台服务器加入集群,如图4所示。

    b3efef6db6666064ba68dbc8353a0012.png

    图4.将三台测试服务器加入集群

    点击下一步,进行测试,如图5所示。

    37d278b8bf54233aa58c4b20ea24b8ff.png

    bba8fab4fc067f5b01a399fa5a5fa1ec.png

    图5.对集群进行验证测试

    点击下一步,添加集群名称,如图6所示。

    b715420b32e1a91f625112195c8034be.png

    图6.添加集群IP和集群名称

    然后点击下一步确认后,最后完成集群的创建,如图7所示。

    a5a056da5134a1fd69ee196e2f3d558c.png

    图7.完成集群的创建

    配置SQL Server

    在配置完Windows Server之后,就该配置SQL SERVER了。分别在三台测试机上安装SQL Server 2012,所安装的功能如图8所示。

    fa6e7f75ded3fb4ab54d8df5e8089f62.png

    图8.SQL Server 2012安装的功能

    安装完SQL Server 2012之后,运行SQL Server配置管理器,如图9所示。

    ac7d70e0f5a1393233ef4af9bc157904.png

    图9.运行SQL Server 配置管理器

    然后在SQL Server实例中开启alwaysOn选项,如图10所示.

    8884da60805bc784e23bee23cecf4c15.png

    图10.开启AlwaysOn

    未完待续….

    展开全文
  • [AlwaysOn Availability Groups]AlwaysOn健康诊断日志 AlwaysOn健康诊断日志 为了监控primary可用副本的健康状况,SQL Server资源DLL使用SQL Server2012的过程sp_server_diagnos...

    AlwaysOn健康诊断日志

    为了监控primary可用副本的健康状况,SQL Server资源DLL使用SQL Server2012的过程sp_server_diagnostics。

    SQL Server resource DLL维护了一个专用的连接到SQL Server实例,通过这个SQL Server实例定期的发送健康诊断信息到SQL Server resource DLL。健康诊断信息与集群中的AG中的failover policy耦合,被用来确定集群是否重启或者故障转移。这个过程是新SQL Server实例的心跳线,比之前的更加细致,更加可靠。不像之前的版本只是运行select @@servername。然后可以通过条件控制故障转移触发通过设置FailureConditonLevel 属性。

    使用SQL Server故障转移集群诊断日志

    所有健康诊断,SQL Server resource DLL都是从sp_server_diagnostics获取自动被保存到 (%PROGRAMFILES%\Microsoft SQL Server\MSSQL11.MSSQLSERVER\MSSQL\Log)。这些日志被称为SQLDIAG日志保存为XEL格式(扩展事件)。这些文件的格式为<HOSTNAME>_<INSTANCENAME>_SQLDIAG_X_XXXXXXXXX.xel。通过查看SQLDIAG日志,你可以发现AG资源错误或者故障转移事件的根本问题。

    通过把xel文件拖到SSMS可以查看这些日志

    posted on 2015-11-21 19:40 Fanr_Zh 阅读(...) 评论(...) 编辑 收藏

    转载于:https://www.cnblogs.com/Amaranthus/p/4984594.html

    展开全文
  • SQLServerAlwaysOn架构及原理杜飞SQLServer2012所支持的AlwaysOn技术集中了故障转移群集、数据库镜像和日志传送三者的优点,但又不相同。故障转移群集的单位是SQSQL Server AlwaysOn架构及原理杜飞SQL Server2012所...
  • Always on Top

    2020-12-08 21:02:17
    <div><p>Allow a always on top option, so i can continue reading my tweets after clicking on links. Echofon for firefox behaves like that.</p><p>该提问来源于开源项目:cezarsa/silver_bird</p></div...
  • AOL.always on line

    2020-03-19 00:23:20
    always on line, 不锁屏
  • 本文属于SQL Server AlwaysON从入门到进阶系列文章 本文原文出自Stairway to AlwaysOn系列文章。根据工作需要在学习过程中顺带翻译以供参考。系列文章包含:SQL Server AlwaysON从入门到进阶(1)——何为AlwaysON?...
  • AlwaysOn安装配置

    2018-11-30 15:37:00
    AlwaysOn安装配置 sqlserver必备 高可用 有需要的可以学习一下
  • always on 介绍 (Introduction) In SQL Server Always On Availability Groups, we can add a database into an existing availability group using different methods. We get the following option in the Init...
  • AlwaysOn取数据库镜像和故障转移集群之长。AlwaysOn不再像故障转移集群那样需要共享磁盘,从而主副本和辅助副本可以更容易的部署AlwaysOn取数据库镜像和故障转移集群之长。AlwaysOn不再像故障转移集群那样需要共享...
  • State always on

    2020-12-09 14:05:23
    <div><p>I have a problem with media_... Its state is always on. I have tried to set update_method to ping but i have the same problem</p><p>该提问来源于开源项目:jaruba/ha-samsungtv-tizen</p></div>
  • Always On Top

    2020-12-26 14:46:52
    s always on top. <img alt="over" src="https://img-blog.csdnimg.cn/img_convert/6470fab46db00d22911b487e4075ad04.png" /></p> <p>Here is the code: https://paste.kde.org/pzlpylxni It runs on LXDE/Manjaro....
  • Always On Top Button

    2021-01-07 09:09:46
    <div><h1>Always on Top, great for utility apps <p>A user wants to have one window/widget/application always be on top of other windows. <h1>Current Window behaviour switches between windows (as ...
  • 当前好多项目都在逐渐的采用SQL Server AlwaysOn架构来作为数据库的高可用集群技术。并且当前微软的大多数产品、CitrixXenDesktop、XenApp、PVS、XenMobile也都支持该技术,AlwaysOn兼具了Mirror和Cluster的双重优势...
  • 配置SQL 2016 AlwaysOn 要点 1,因为没有域所以需要在”计算机属性“添加计算机的DNS后缀。如后缀是: kk1.com 2,非账户Administrator(是管理员组的新账号也不行),需在运行下列命令 注意:...
  • always on 技术

    2018-08-21 18:29:00
    always on 技术系列:https://blog.csdn.net/dba_huangzj/article/details/54015470 MSSQL 2014 /WIN SERVER 2008 R2 SP2 安装always on:https://www.cnblogs.com/lonelyxmas/p/5613088.html always on 技术系列 ...
  • alwayson监控

    2018-05-19 11:12:00
    最近大体自己写了点alwayson相关的监控,是通过存储过程的方法,做个笔记如下: --alwayson启用状态 declare @isenabled sql_variant SELECT @isenabled=SERVERPROPERTY ( 'IsHadrEnabled' ) if @isenabled=1...
  • This works fine but I would like to move the dbs into Alwayson groups using dsc. I know there is the SPDatabaseAAG resource to do that but I don't get the concept. What do I need to configure as ...
  • sql always on In this article, we will review how to setup SQL replication with publisher database in Always On availability groups so that replication continuous to sync even after failover to the....

空空如也

空空如也

1 2 3 4 5 ... 20
收藏数 121,362
精华内容 48,544
关键字:

alwayson