Finding information about which account xp_cmdshell is running as

If you ever needed to debug a permission related issue when using xp_cmdshell, you have probably realized that a crucial piece of information is about what particular account xp_cmdshell is executing under. If you are the administrator of the database, you already know the context used by xp_cmdshell, but otherwise you may not have that…


Some insight information into how SQL Server documentation is prepared

Buck Woody just wrote an interesting post about the process of writing documentation for SQL Server. After reading this, you should have no excuse for not providing feedback on Books Online articles that you feel are incomplete or have inaccurate information – your feedback matters!


Raul starts his blog…

Some of you may already know Raul from the SQL Server Security forums. Raul has just started his blog at His first post provides a detailed discussion of indexing encrypted data:


A couple of links for submitting feedback on Microsoft products

I want to advertise a couple of sites that can be used for submitting feedback and suggestions, or for filing bug reports for Microsoft products. These are: The Microsoft Technical Forums at: The SQL Server Forums are at: The Product Feedback Center at: Update [2005/12/21]: Another useful link for reporting security vulnerabilities…


A new blog link

Here’s a link to a new blog that a colleague has started: The first entry is about the various levels of data protection in SQL Server 2005 and you can access it at:


SQL Server 2005: How to fix outdated names of Windows logins

The SQL Server login catalogs store the names of Windows principals as well as their SIDs. Because the names are stored, changes that affect a name can lead to a state where a catalog entry is out of sync with the current login name. For example, in the case of local Windows accounts, if we change the machine name, the catalogs…


SQL Server 2005: An example of writing a CLR function that wraps the LookupAccountSid WinAPI call

I was looking recently into writing a wrapper for the LookupAccountSid WinAPI function, so that I could use this functionality in T-SQL. I decided to write a CLR function and document the steps here: 1. First, we need to write the code into a file – I named it LookupNameSid.cs. I tested this code with both the 1.1 CLR…


An example for setting database mirroring in SQL Server 2005

I am not a database mirroring expert, but a while ago I have set up database mirroring between two of my machines. I collected the steps that I followed in the following script: — This script illustrates how to setup database mirroring between two machines.– The script assumes that the principal machine is SQLPRINCIPAL and that…