Quantcast
Channel: CodeSection,代码区,SQL Server(mssql)数据库 技术分享 - CodeSec
Browsing all 3160 articles
Browse latest View live

Image may be NSFW.
Clik here to view.

Lots of Scaffolding T-SQL Tuesday #107 The Death March

It’s an interesting topic for this month’s T-SQL Tuesday, and while I think this isn’t necessarily a SQL Server project, because usually SQL Server isn’t the problem with building complex software, my...

View Article


Image may be NSFW.
Clik here to view.

Review: Stellar Phoenix SQL Database Repair

Review: Stellar Phoenix SQL Database Repair Of the several issues encountered with SQL Server ― SQL Server gets slower with time, generation of reports becomes tedious, SQL Server crash, performance...

View Article


Image may be NSFW.
Clik here to view.

Simple way to Import XML Data into SQL Server with T-SQL

Problem XML is a data format used to share data in a form that can be easily used and shared. There is often the need import XML files into SQL Server which can be done several ways and in this tip we...

View Article

Image may be NSFW.
Clik here to view.

SQL Server实际执行计划COST"欺骗"案例

有个系统,昨天Support人员发布了相关升级脚本后,今天发现系统中有个功能不能正常使用了,直接报超时了(Timeout expired)错误。定位到相关相关存储过程后,然后在优化分析的过程中,又遇到了执行计划COST “ 欺骗 ” 我们的这种情况,其实在我这篇博客 ” SQL SERVER中用户定义标量函数(scalar user defined function)的性能问题 “...

View Article

Calculating Effective Rights For A SQL Server Principal

In my blog Calculating a Security Principal’s Effective Rights. I built a view, named Utilty.EffectiveSecurity that you could query to fetch a security principal’s rights to objects in a database. In...

View Article


Image may be NSFW.
Clik here to view.

Table Variables in SQL Server

Table variables are another types of temporary objects to store transient data. Please refer Temporary Table objects for more details about Temporary Tables in SQL Server. Differences between Table...

View Article

Send a mail from the SQL server with an attachment (attachment to...

I have to send the report to management every morning . For that i have create schedule in Sql Server agent with following code. EXEC msdb.dbo.sp_send_dbmail @recipients='<a...

View Article

Image may be NSFW.
Clik here to view.

Resource Governor MAXDOP Setting Can Lead to Poor Plan Choices

Resource Governor can be used to enforce a hard cap on query MAXDOP , unlike the sp_configure setting. However, query plan compilation does not take such a MAXDOP limit into account. As a result,...

View Article


Image may be NSFW.
Clik here to view.

Discovering New System Objects and Functions in SQL Server 2019

Problem SQL Server 2019 CTP was recently released. There is some information posted about new features such as this document by Microsoft What is new in SQL Server 2019 and this article on mssqlTips...

View Article


Which is faster? IN (list) or IN (SELECT FROM Temp)

If you’ve done much with IN (list) then you’ve realized that it basically translates out to col=val1 OR col=val2 OR .... You’ve probably also realized that you can throw all the values into a temp...

View Article

Image may be NSFW.
Clik here to view.

Interview Drew Furgiuele

I decided to start a series of blogs where I interview key people in the SQL Server community. Instead of me asking technical questions, I plan on asking about their outlook on the future, books they...

View Article

Image may be NSFW.
Clik here to view.

Data science in SQL Server: pivoting and transposing data

In data science, understanding and preparing data is critical. In this article, in the series, we’ll discuss understanding and preparing data by using SQL transpose and pivot techniques. Transposing a...

View Article

Image may be NSFW.
Clik here to view.

SQL Server Always On Monitor The Redo_Queue_Size

Cause sometimes you need to check why replication is slow or halted. For example, like during an IO storm no hurricane pun intended. Say you have transnational replication over an Always On (SQL Server...

View Article


Image may be NSFW.
Clik here to view.

New Command in SQL Server 2019 ADD SENSITIVITY CLASSIFICATION

By: Aaron Bertrand || Related Tips:More >SQL Server 2019 Problem Microsoft added a task in SQL Server Management Studio 17.5 called " Classify Data ." The purpose is to help identify columns that...

View Article

Select unique random rows from the SQL Server table but still duplicates

i am not the best with sql but i try my best to get my Problems done. I have a table "just" which is filled with Columns ( ID (PK, Identity), Char, Serv , Random ) . Now i want to select a random row...

View Article


Image may be NSFW.
Clik here to view.

Batch Mode part 4 (“Some of the limitations”)

This blog post is a part of the whole Batch Mode series, which can be found at the Nikoport Batch Mode page . This post will focus on some of the initial limitations of the Batch Execution Mode on the...

View Article

Image may be NSFW.
Clik here to view.

End of support for SQL Server 2008 & 2008 R2

If you are running SQL Server 2008 or SQL Server 2008 R2, what does July 9th, 2019 mean for you? With both of these versions of SQL Server reaching the end of their support lifecycle together, you...

View Article


Group t-sql by category and get the best values &ZeroWidthSpace;&Zer ...

Imagine I have this table: Month | Person | Value ---------------------- Jan | P1 | 1 Jan | P2 | 2 Jan | P3 | 3 Feb | P1 | 5 Feb | P2 | 4 Feb | P3 | 3 Feb | P4 | 2 ... How can I build a t-sql query to...

View Article

Image may be NSFW.
Clik here to view.

DbForge Query Builder for SQL Server入门教程:分析SQL查询

【 dbForge Query Builder for SQL Server下载 】 您可以使用Query Profiler工具来调试,故障排除,监视和测量应用程序的SQL语句和存储过程。如果您的应用程序存在您认为可能由特别长时间运行的查询引起的性能问题,则可以分析查询持续时间。...

View Article

Image may be NSFW.
Clik here to view.

Best Approach to View Corrupt MDF File in SQL Server

“I want to view the file size of MDF file but when I tried to retrieve the data from mdf file I am getting SQL errors. I think my master database file got corrupted as my SQL Server got abnormally...

View Article
Browsing all 3160 articles
Browse latest View live