摘要: SQL SERVER – 2005 – Find Index Fragmentation Details – Slow IndexPerformanceJust a day ago, while using one index I was not able to get the desired pe... 阅读全文
posted @ 2014-09-09 13:56 mywordpress 阅读(180) 评论(0) 推荐(0) 编辑
摘要: ProblemWhile indexes can speed up execution of queries several fold as they can make the querying process faster, there is overhead associated with th... 阅读全文
posted @ 2014-09-09 11:21 mywordpress 阅读(156) 评论(0) 推荐(0) 编辑
摘要: sql server服务启动不了1)在启动 SQL Server(SQLEXPRESS)服务时提示如下错误:在本地计算机无法启动sql server(sqlexpress)服务错误3:系统找不到指定的路径那位遇到过这样的问题,我在网上找了些相关的资料可是无法解决解决方法:1.先去服务里找到 SQL ... 阅读全文
posted @ 2014-08-04 17:22 mywordpress 阅读(396) 评论(0) 推荐(0) 编辑
摘要: 使用字符串拼接函数,创建并解析查询列表条件Declare @store_list varchar(8000) select @store_list=',1,3,4,6,8,12,'/* select stuff(@store_list , len(@store_list) ... 阅读全文
posted @ 2014-07-26 01:38 mywordpress 阅读(237) 评论(0) 推荐(0) 编辑
摘要: 获取已知年份的第一天和最后一天1.一个月第一天的SELECT DATEADD(mm, DATEDIFF(mm,0,getdate()), 0) 2.本周的星期一SELECT DATEADD(wk, DATEDIFF(wk,0,getdate()), 0)3.一年的第一天SELECT DATEADD(... 阅读全文
posted @ 2014-07-24 15:18 mywordpress 阅读(367) 评论(0) 推荐(0) 编辑
摘要: 删除复制http://msdn.microsoft.com/zh-cn/library/ms152757.aspx设计和实现复制http://msdn.microsoft.com/zh-cn/library/ms151847.aspx从数据库或服务器删除复制所需的操作取决于数据库或服务器所扮演的角色... 阅读全文
posted @ 2014-07-15 20:41 mywordpress 阅读(139) 评论(0) 推荐(0) 编辑
摘要: select ascii(字段)数字:48-57字母:65-123汉字:123+select * from t1 where len(unicode(c1)) = @iBEGIN DECLARE @ChcekValue int SELECT @ChcekValue = ASCII... 阅读全文
posted @ 2014-07-14 15:33 mywordpress 阅读(6305) 评论(0) 推荐(0) 编辑
摘要: 1. Kill Sql Server SessionsDECLARE @DatabaseName nvarchar(50)SET @DatabaseName = N'Database_Name' DECLARE @SQL varchar(max) SELECT @SQL = COALESCE(@SQ... 阅读全文
posted @ 2014-07-08 11:22 mywordpress 阅读(265) 评论(0) 推荐(0) 编辑
摘要: /*EXEC sp_configure ‘allow updates’, 0RECONFIGURE*/-- 启用:exec sp_configure 'show advanced options',1reconfigureexec sp_configure 'xp_cmdshell',1reconf... 阅读全文
posted @ 2014-07-03 14:38 mywordpress 阅读(2404) 评论(0) 推荐(0) 编辑
摘要: 一、查看實例名時可用1、服务—SQL Server(实例名),默认实例为(MSSQLSERVER)或在连接企业管理时-查看本地实例2、通過注冊表HKEY_LOCAL_MACHINE/SOFTWARE/Microsoft/Microsoft SQL Server/InstalledInstance3、... 阅读全文
posted @ 2014-07-03 10:58 mywordpress 阅读(12694) 评论(0) 推荐(1) 编辑