Quantcast
Browsing all 145 articles
Browse latest View live

Can I pause or resume an index rebuild operation?

One of the cool new features in SQL Server 2017 (and currently also in public preview in Azure SQL Database) is the option to pause and resume an online index rebuild operation. This option can be...

View Article


What is the Role of the UPDATE Lock in SQL Server?

The most common types of locks in SQL Server are the SHARED (S) lock and the EXCLUSIVE (X) lock. The former is used to lock resources (e.g. rows, keys, tables) for read, and the latter is used to lock...

View Article


Image may be NSFW.
Clik here to view.

Customer Satisfaction Survey Results

  In the last couple of months, we sent our first customer satisfaction survey to all our customers. We collected the responses, analyzed them, and derived some interesting conclusions too. It’s time...

View Article

Image may be NSFW.
Clik here to view.

How to Calculate Running Totals in SQL Server

  In show #84 of the SQL Server Radio Hebrew Edition, Matan and I talked about how to calculate running totals in SQL Server. I promised to upload a script with a complete demo of all the possible...

View Article

Image may be NSFW.
Clik here to view.

Why is the job duration a negative number?

About a month ago I noticed, on one of our clients’ server, a weird duration time for one of the jobs – the job duration was negative. As it turned out, this could happen due to daylight saving time....

View Article


How to Update @@SERVERNAME to Actual Machine Name?

The @@SERVERNAME Global Variable The system global variable @@SERVERNAME can be used to return the name of the machine the SQL Server is hosted on. This variable is derived from the system table...

View Article

Image may be NSFW.
Clik here to view.

SQL Saturday Nepal 2017

  I had the honor to visit Nepal and participate in SQL Saturday Nepal 2017. You can visit the event website here. I presented a session about “How to Use Parameters Like a Pro and Boost Performance”....

View Article

What is the Automatic Plan Correction in SQL Server 2017?

SQL Server 2017 brings a new interesting feature, that might be a game changer in some environments. I’m talking about Automatic Plan Correction. This feature automates the on-going tuning process of...

View Article


How to troubleshoot database mail?

If after creating a profile and account you send a test email and it doesn’t work try this: Check the database mail log if it is empty: “SELECT * FROM msdb.dbo.sysmail_event_log;” Check mail status is...

View Article


How to fix Orphaned Users easily

What are Orphaned Users “Orphaned Users” is a common issue in SQL Server where a Database User is no longer associated with its relevant Server Login. This often happens when the Server Login is...

View Article

What is Graph Processing in SQL Server 2017?

There is a growing need for Graph Databases in the market. This is a type of database, which is capable of storing, representing and manipulating graphs easily and efficiently. Common use cases for...

View Article

How to Size Your Database Files?

Let’s say you need to create a new SQL Server database, which is going to grow very fast, but you don’t know how fast. What would be the initial size of the data file?   On one hand, you want to make...

View Article

Image may be NSFW.
Clik here to view.

Doing More with Less – My Productivity Guide

  Houston, We Have a Problem   We are living in a crazy world. And it just gets more and more crazy all the time. The amount of tasks we are confronted with at any given point in time is crazy. The...

View Article


How to Troubleshoot Waiting Tasks Without Requests in SQL Server?

Usually, when I need to troubleshoot currently running requests, I use a combination of sys.dm_exec_requests and sys.dm_os_waiting_tasks. The former retrieves all the current requests, whether they are...

View Article

Image may be NSFW.
Clik here to view.

ינואר 2018 –קידום אישי ומקצועי

בכל אחד ואחת מאיתנו קיים הצורך בלמידה מתמדת. הן בתחומים שיקדמו אותנו בעבודה והן בנושאים אחרים. מקום העבודה, המקום בו אנחנו נמצאים שליש מהיום שלנו לפחות, יכול להוות מעטפת תומכת ומקדמת גם באזורים...

View Article


Image may be NSFW.
Clik here to view.

SCHEMABINDING and Why It Can be Useful?

In SQL Server, when we use the “WITH SCHEMABINDING” clause in the definition of an object (view or function), we bind the object to the schema of all the underlying tables and views. This means that...

View Article

Image may be NSFW.
Clik here to view.

Extremely easiest tricks to list table column names and replace SELECT *

Everyone know simple T-SQL “SELECT * ” bad practice. It’s: – Effect on the execution plan (Table / Index Scan); – Returning too much data (unnecessary extra reads, memory grant, increases network...

View Article


The king is dead, long live the king!

Everyone, who deal with SQL server, know sample database AdventureWorks, which has been with us since the days of SQL Server 2005. Most of official SQL Server documentation, third-party educational...

View Article

Why we should enable trace flag 3604 before part of DBCC statements?

In many cases, while we using DBCC commands, we must to run two statements instead of one, in order to receive the wishful result.   For example, in order to receive database information, we write:...

View Article

Image may be NSFW.
Clik here to view.

Planning to Increase Cost Threshold for Parallelism – Like a Smart Person!

Planning to Increase Cost Threshold for Parallelism When administrating a SQL Server instance with multiple CPU cores and heavy workload, it’s common to see SQL Server creating and using execution...

View Article
Browsing all 145 articles
Browse latest View live