Blocking Example Code
In our previous post we looked at detecting and analyzing blocking. This post contains a script with blocking example code. Output from the analysis samples contained in the previous post is also provided. Blocking Example…
Example Deadlock Code
Deadlocks happen. As you’re about to see in this post, deadlocks are actually quite easy to create. In my previous post I showed how to monitor and analyze deadlock events using Extended Events. In this…
dbo – Database Owner
In SQL Server, the dbo or Database Owner is a server-level principal that has full access to the owned database. Microsoft’s best practices recommend creating a discrete user, either an Active Directory domain user or…
Example BCP export and import commands
The Microsoft Bulk Copy Utility, BCP.exe, can be used to copy data from a table in one SQL Server instance to the same table in another SQL Server instance. Since the BCP Utility is designed…
Language used by the SQL Server binaries
SQL Server binaries come in various languages, such as 日本語 (Japanese), French, and English. It’s pretty easy to determine the language once SQL Server is *running*. A simple query does the trick:
|
1 2 3 4 |
SELECT sl.name , sl.alias FROM sys.syslanguages sl WHERE sl.lcid = SERVERPROPERTY('lcid'); |
However, if…
Obtaining machine names for failed logins
The SQL Server error log contains invaluable details about failed logins, but only if you enable login auditing. Once enabled, the error log will provide the details of logins that failed including the name of…