2010年5月3日

execute sql of linked server and execute procedure of remote

摘要: 前段时间写个合区合服的存储过程发现直接连接服务器写sql 做交互不如 直接通过链接服务器调用存储过程。原sql USE [xxxx]GO/****** 对象: StoredProcedure [dbo].[USP_UNION_AREA_SERVER] 脚本日期: 04/19/2010 09:43:06 ******/SET ANSI_NULLS ONGOSET QUOTED_IDENTIFIER ... 阅读全文

posted @ 2010-05-03 16:32 徐郞顾 阅读(1255) 评论(0) 推荐(0) 编辑

2010年4月28日

trace (转)

摘要: Catching Transient CPU Spikes Using SQL TraceIf there was one thing I wish everyone who works with SQL Server would learn, it would have to be to use server-side SQL Traces instead of the client appli... 阅读全文

posted @ 2010-04-28 14:08 徐郞顾 阅读(963) 评论(0) 推荐(0) 编辑

2010年4月16日

kill more then 1 hour session in logingshipping and session logs

摘要: --- 有过logshipping 维护的dba 应该很清楚.1 logshipping 主要为了数据查询部门操作 进而避免影响主库.2 有一定的容灾作用但是 一旦一直有session 占着超过几小时 就很郁闷了 一旦 log被删除 就要重做.重做影响数据查询 恶性循环.故 做了个超过一小时 干掉session 并记录在案(避免扯皮 有问题可以找他们)----step configUSE [DBC... 阅读全文

posted @ 2010-04-16 14:30 徐郞顾 阅读(527) 评论(0) 推荐(0) 编辑

cte+xml

摘要: --2005select * into ## from(select sring='xxxxx(2弄)(3路)xxx()xxx' union all select 'dad(0d)da(da)da()ss')x--cte+nums 解决with xwjas(select id=1union allselect id+1 from xwj where id<=80) ,xwj2as(selec... 阅读全文

posted @ 2010-04-16 11:18 徐郞顾 阅读(288) 评论(0) 推荐(0) 编辑

2010年4月10日

Excessive growth of the primary database log mirror and system Performance Monitoring

摘要: 1 做镜象日志库主库 日志增长过快,并且无法截断.解决方法 每隔段时间 备份多个日志 并收缩日志eg:backup log databasename to disk=''dbcc shrinkfile(logfilename,size)---size 根据实际情况定 不要过小 这样日志增长的时候影响 oltp不用sql 是因为你必须做个 .bat 文件去定时 跑 删除 备份的日志。不易于维护.xp... 阅读全文

posted @ 2010-04-10 11:43 徐郞顾 阅读(816) 评论(0) 推荐(1) 编辑

导航