Henry

曾经沧海难为水,除却巫山不是云,取次花丛懒回顾,半缘修道半缘君。

  博客园  :: 首页  :: 新随笔  :: 联系 :: 订阅 订阅  :: 管理

2012年5月7日

摘要: 最经在研究PS访问TFS的问题,理出一点头绪来,先整理下:环境:PS2.0+TFS20101,获取单个文件和获取整个文件下文件# -------------------------------------------------------------------------------------# Credit for this code goes to:# James Manning (http://blogs.msdn.com/jmanning/archive/2006/09/28/776141.aspx)function Get-TFS_X ( [string] $serverN.. 阅读全文
posted @ 2012-05-07 15:37 Henry.Lau 阅读(669) 评论(0) 推荐(0) 编辑

2012年5月5日

摘要: If you're interested in using SQL Server to delete your old backup files without using xp_cmdshell, you could look into master.dbo.xp_delete_fileexec master.dbo.xp_delete_file0, --File type [(0) FileBackup | (1) FileReport]N'<folderPath>', -- Folder path to look inN'<ext> 阅读全文
posted @ 2012-05-05 14:21 Henry.Lau 阅读(905) 评论(0) 推荐(0) 编辑

2012年5月4日

该文被密码保护。 阅读全文
posted @ 2012-05-04 18:31 Henry.Lau 阅读(4) 评论(0) 推荐(0) 编辑

2012年3月28日

摘要: CREATE FUNCTION fntest ( @list VARCHAR(MAX) )RETURNS @t TABLE ( SecId VARCHAR(10) )AS BEGIN ; WITH cte AS ( SELECT SUBSTRING(@list, LEN(@list) - 10 + 1, 10) AS v ,1 lvl UNION ALL SELECT... 阅读全文
posted @ 2012-03-28 11:06 Henry.Lau 阅读(206) 评论(0) 推荐(0) 编辑

2011年10月28日

摘要: USE masterGOxp_readerrorlog 0, 1, N'Logging SQL Server messages in file', NULL, NULL, N'asc' GOXP_READERRRORLOGThe parameters you can use with XP_READERRRORLOG are mentioned below for your reference:1. Value of error log file you want to read: 0 = current, 1 = Archive #1, 2 = Archive 阅读全文
posted @ 2011-10-28 22:53 Henry.Lau 阅读(431) 评论(0) 推荐(0) 编辑

2011年8月17日

摘要: 题目:http://beyondrelational.com/puzzles/challenges/96/break-a-long-sentence-in-groups-of-5-words.aspx数据:id comment-- ---------------------------------------------------------------------1 The upcoming release of SQL Server is codenamed Denali. It is also called SQL11 which refers to version 11 and pe 阅读全文
posted @ 2011-08-17 11:38 Henry.Lau 阅读(207) 评论(0) 推荐(0) 编辑

2011年7月26日

摘要: 在sqlservercentral上看到一个挑战sql的题目,原文地址:http://beyondrelational.com/puzzles/tsql/61/english/generate-an-html-calendar-in-tsql.aspx实现一个日历:代码如下:IF OBJECT_ID('TC61_Quiz','U') IS NOT NULL BEGIN DROP TABLE TC61_QuizENDGOCREATE TABLE TC61_Quiz( ID INT IDENTITY, QuizName VARCHAR(255))GOINSERT I 阅读全文
posted @ 2011-07-26 18:10 Henry.Lau 阅读(838) 评论(0) 推荐(0) 编辑

2011年6月30日

摘要: Powershell收集系统日志信息:主要是利用smo对象连接数据库,定时(一个小时或者10分钟)将服务器的Application,System,Security 错误信息收集到特定的数据库 脚本如下(没有过多的注释,将就) [system.reflection.assembly]::loadwithpartialname("Microsoft.sqlserver.smo")|out-null[system.reflection.assembly]::loadwithpartialname("Microsoft.sqlserver.connectioninfo&q 阅读全文
posted @ 2011-06-30 11:32 Henry.Lau 阅读(565) 评论(0) 推荐(0) 编辑

2011年6月28日

摘要: 1. 统计没用使用过的索引:如果有聚集索引,则表为B-Tree如果没有聚集索引,则表为Heapselect b.name ,a.name ,a.index_id,c.object_id from sys.indexes ainner join sys.tables bon a.object_id=b.object_id and a.name is not null left join sys.dm_db_index_usage_stats con a.object_id=c.object_id and c.database_id=db_id()and c.index_id<>0 - 阅读全文
posted @ 2011-06-28 14:54 Henry.Lau 阅读(149) 评论(0) 推荐(0) 编辑

2011年6月22日

只有注册用户登录后才能阅读该文。 阅读全文
posted @ 2011-06-22 14:47 Henry.Lau 阅读(53) 评论(0) 推荐(0) 编辑