随笔分类 -  [2.0] SQL Server

摘要:http://www.mssqltips.com/sqlservertip/3078/report-launcher-to-run-ssrs-report-subscriptions-on-demand/?utm_source=dailynewsletter&utm_medium=email&utm_content=headline&utm_campaign=20131024ProblemSSRS report subscriptions are a great feature for automatic report delivery on regular sched 阅读全文
posted @ 2013-10-25 10:04 Alex Tian 阅读(397) 评论(0) 推荐(0)
摘要:SQL server运行到一定的时候, 执行计划的缓存可能会相当大,有些能到几个GB的大小。这个时候假设某个语句比较复杂而且SQL server 生成的执行计划不够优化,你希望把该执行计划的缓存清除使得SQL server能够重新编译该语句。该如何做呢?如果是存储过程则很好办,直接使用sp_recompile就可以了,如下所示。如果参数是表,那么所有用到该表的存储过程或trigger都会重新编译,从而把原来的plan 替换掉:USE AdventureWorks;GOEXECsp_recompileN'Sales.Customer';GO如果是一般的语句呢? 比如下面的语句:u 阅读全文
posted @ 2013-06-17 13:29 Alex Tian 阅读(3056) 评论(2) 推荐(0)
摘要: 阅读全文
posted @ 2013-05-08 11:38 Alex Tian 阅读(244) 评论(0) 推荐(0)
摘要:很多开发人员都想成为一名DBA,也有很多人一开始就把自己定位成为一名DBA,DBA究竟需要掌握些什么知识和技能呢?以下是我做DBA工作和面试DBA时,整理的一些DBA方面的三十个问题,三十个大问题中还有许多小的问题,涵括了SQLServer DBA比较多的技术知识点,与大家分享下,希望给有志做DBA的朋友们一些帮助:1. char、varchar、nvarchar之间的区别(包括用途和空间占用);xml类型查找某个节点的数据有哪些方法,哪个效率高;使用存储过程和使用T-SQL查询数据有啥不一样;2. 系统DB有哪些,都有什么作用,需不需要做备份,为什么;损坏了如何做还原(主要是master库) 阅读全文
posted @ 2013-02-19 15:44 Alex Tian 阅读(662) 评论(0) 推荐(0)
摘要:Provisioning a New SQL Server Instance – Part Threeby Glenn Berry, 18 September 2012 0 commentsOnce you've installed and configured SQL Server 2012, there are some tasks that should be done to ensure that maintenance, monitoring and alerting systems are in place to keep the instance running smoo 阅读全文
posted @ 2012-10-16 10:47 Alex Tian 阅读(145) 评论(0) 推荐(0)
摘要:NutsAndBolts_V1.1.zip 阅读全文
posted @ 2012-10-16 09:23 Alex Tian 阅读(132) 评论(0) 推荐(0)
摘要:ProblemMany companies now have a requirement to keep data for long periods of time. While this data does have to be available if requested, it usually does not need to be accessible by the application for any current transactions. Data that falls into this category are a good candidate for archival. 阅读全文
posted @ 2012-10-12 15:44 Alex Tian 阅读(315) 评论(0) 推荐(0)
摘要:Red Gate系列之一 SQL Compare 10.2.0.1337 Edition 数据库比较工具 完全破解+使用教程Red Gate系列之二 SQL Source Control 3.0.13.4214 Edition 数据库版本控制器 完全破解+使用教程Red Gate系列之三 SQL Server 开发利器 SQL Prompt 5.3.4.1 Edition T-SQL智能感知分析器 完全破解+使用教程Red Gate系列之四 SQL Data Compare 10.2.0.885 Edition 数据比较同步工具 完全破解+使用教程Red Gate系列之五 .NET Refle 阅读全文
posted @ 2012-10-08 15:40 Alex Tian 阅读(339) 评论(1) 推荐(0)
摘要:How to receive Deadlock information automatically via emailBy Geoff Albin, 2012/09/21 (first published: 2010/12/13) Receive Deadlock detail via email.I had spent many hours on Google trying to find the best way to send a notification on deadlock occurrences. While it was a fairly straight forward pr 阅读全文
posted @ 2012-10-08 13:50 Alex Tian 阅读(274) 评论(0) 推荐(0)
摘要:IntroductionSorry for being so late in writing the last part of the article. I have a full-time job to earn my living, and for the last couple of months, I had been extremely busy with some of my client projects (Sounds like an excuse?).Any way, better late than never. It's good to be back again 阅读全文
posted @ 2012-10-05 15:44 Alex Tian 阅读(284) 评论(0) 推荐(0)
摘要:IntroductionImagine you are a doctor, or a physician. What do you do when one of your patients arrive feeling out of sorts and fallen ill?You will try to understand the cause of his/her illness, right? Yes. This is the most important thing to do first. Because, in order to cure your patient, you nee 阅读全文
posted @ 2012-10-05 15:43 Alex Tian 阅读(345) 评论(0) 推荐(0)
摘要:IntroductionHello again!We are in the process of optimizing a SQL Server database, and so far we have done lots of things. We applied indexing in our database tables and then re-factored the TSQLs to optimize the data access routines. If you are wondering where we did all these and what are the thin 阅读全文
posted @ 2012-10-05 15:42 Alex Tian 阅读(376) 评论(0) 推荐(0)
摘要:Top 10 steps to optimize data access in SQL Server: Part II (Re-factor TSQL and apply best practices)By Al-Farooque Shubho, 1 Jun 2009 4.93 (113 votes)123454.93/5 - 113 votes5 removedμ 4.74, σa 1.14 [?] Prize winner in Competition "Best overall article of April 2009" IntroductionRemember w 阅读全文
posted @ 2012-10-05 15:41 Alex Tian 阅读(338) 评论(0) 推荐(0)
摘要:http://www.codeproject.com/Articles/34372/Top-10-steps-to-optimize-data-access-in-SQL-ServerTop 10 steps to optimize data access in SQL Server: Part I (use indexing)By Al-Farooque Shubho, 28 Apr 2009 4.90 (115 votes)123454.90/5 - 115 votes2 removedμ 4.84, σa 0.94 [?] Introduction"It's been 阅读全文
posted @ 2012-10-05 15:40 Alex Tian 阅读(240) 评论(0) 推荐(0)
摘要:http://www.codeproject.com/Articles/434467/SQL-Server-Governor-The-unknown-heroTable of contentsIntroductionWhat is the use of SQL Server Governor?How do we configure SQL Server Governor?See it workingSummarizing how the Governor worksIntroductionSQL Server is a massive RDBMS software. Even after so 阅读全文
posted @ 2012-10-05 15:37 Alex Tian 阅读(261) 评论(0) 推荐(0)
摘要:clsfunction get-diskratio(){ param([Parameter(Position=0, Mandatory=$true)] $DiskString ) if ( $DiskString -eq ""){ Write-Output $null ; } else { Write-Host $DiskString.substring($DiskString.IndexOf("|")+1,$DiskString.length-$DiskString.IndexOf("|")-2) Write-Output $Dis 阅读全文
posted @ 2012-09-17 17:44 Alex Tian 阅读(297) 评论(0) 推荐(0)
摘要:Microsoft Knowledge BaseFind samples and solutions for your problemsMicrosoft SQL Server HomepageProvides product info. & features good articlesMicrosoft universal data accessAll about Microsoft data access technologiessql-server-performance.comPerformance tuning and optimization tips for Micros 阅读全文
posted @ 2012-09-04 11:24 Alex Tian 阅读(180) 评论(0) 推荐(0)
摘要:IntroductionThis article tackles two related questions:How can I use the result set from one stored procedure in another, also expressed as How can I use the result set from a stored procedure in a SELECT statement?How can I pass a table data in a parameter from one stored procedure to another? In t 阅读全文
posted @ 2012-08-30 10:58 Alex Tian 阅读(1034) 评论(0) 推荐(0)
摘要:-- Set the database where the stored procedure is locatedUSE SecurityDataGO-- Drop older version if it existsIF OBJECTPROPERTY(OBJECT_ID(N'dbo.fn_SplitStringToTable'), N'IsTableFunction') = 1 DROP FUNCTION dbo.fn_SplitStringToTableGO-- Procedure: dbo.fn_SplitStringToTable-- Purpose: 阅读全文
posted @ 2012-08-29 14:32 Alex Tian 阅读(838) 评论(0) 推荐(0)
摘要:C:\Users\atian1\AppData\Roaming\Microsoft\SQL Server Management Studio\11.0\Templates 阅读全文
posted @ 2012-08-29 10:31 Alex Tian 阅读(104) 评论(0) 推荐(0)