摘要:今天镜像中的主服务器进行维护重启,重启后发现镜像Disconnect,使用xp_readerrorlog 0, 1检查错误日志发现下列信息:Database mirroring connection error 5 'Connection handshake failed. The certificate used by this endpoint was not found: Certificate expired. Use DBCC CHECKDB in master database to verify the metadata integrity of the endpoint
阅读全文
摘要:1、损耗平衡算法 为了避免同一Cell被高频率的擦写,SSD会将某段LBA地址的写写到Free space中,这些Free Space可以直接进行写入,并将之前的LBA占用的Page标记为“Garbage”,可回收再利用。等一个Block的大部分(一定比例)的Page标记为“Garbage”时,并且存在大批满足条件的Block,SSD会批量回收这些Block,即执行Copy on Write,将有数据的Page写到新的Block中并Erase待回收的Block。这样是为了将写操作平衡到所有可能的Block中,降低单位时间内Block的擦写次数。 重定向写解决了Wear Off过快的问题,并..
阅读全文
摘要:有时候为了调试方便需要格式化所有的异常信息,方式如下except Exception as e: for artt in dir(e): rmsg = rmsg + artt + ':' + str(getattr(e, artt)) + '\r\n'
阅读全文
摘要:当我们想要分析某些语句在一定数据量后的执行计划情况是可能会进行数据的模拟,伪造大量的数据。但其实这个工作挺费劲了,经朋友介绍在网上看到下面这种伪造统计信息的方式,对于如果只是分析执行计划的情况很方便。use tempdbgocreate table t1(i int, j int)gocreate table t2(h int, k int)goset statistics profile ongoselect distinct(i) from t1goselect * from t1, t2 where i = k order by j + kgoupdate statistics t1 w
阅读全文
摘要:create table test(username varchar(10), userinfo varchar(200), primary key (username) ) go --修改字段名 exec sp_rename 'test.userinfo', 'userdesc', 'column'; go sp_help test go --修改表名 exec sp_rename 'test', 'test1', 'object'; go sp_help test1 go --sp_rename
阅读全文
摘要:Raid0结构: (图1) (图2) (图3) 图1和图2为Raid0的原理图,重点看图2。这里展示的4块硬盘的Raid0结构。对于系统看到的是virtual disk,这是按条带组成的一块连续的存储盘。而对于Raid卡则将virtual Disk根据stripe size将其分散在4块硬盘中,结构如图1和图3。stripe size也叫segment,一个stri...
阅读全文
摘要:转:http://www.cnblogs.com/kerrycode/archive/2010/09/18/1830071.htmlSQL Server提供了专用管理员链接(DAC)。DAC允许管理员访问运行的服务器以执行诊断函数或Transact—SQL语句,或对服务器上的问题进行故障排除,即使服务器以锁定或在非正常状态下运行。DAC默认情况下只有服务器上可以使用DAC,但是你可以通过SQL Server 2005外围应用配置器设置允许远程计算机上的客户端应用程序使用DAC,如下图所示你也可以通过下面的SP_CONFIGURE命令更改数据库服务器配置--0-指明仅允许本地连接使用DAC--1
阅读全文
摘要:Python中使用MySQLdb连接数据库时出现以下错误:Traceback (most recent call last): File "/home/monitor_user/serverMonitor.py", line 206, in <module> ServerList = sqlQuery(getMngConn(), "select b.db_name, a.ip_inside, a.port from machine a inner join dbinfo b on b.machine_id = a.machine_id") F
阅读全文