The Microsoft SQL Server ODBC Driver for Linux provides native connectivity from Linux to Microsoft SQL Server. Just released 11/21/2011 – Linux ODBC driver for SQL server. http://www.microsoft.com/download/en/details.aspx?id=28160   Hopes: I hope this is better than the original SQL Server driver for PHP. I hope this driver will work on other Linux distributions besides Red Hat.

This is a followup to my Whats more important than a backup plan article posted a couple of months ago. When you do a database restore, including log backups, it is very important to get the log chain in the right order, or it won’t work.  To restore a full backup, then log backups, the chain of logs could be …

Restoring A Log Chain Read more »

Is it a good idea to run DBCC SHRINKDATABASE regularly? Download the sample file ShrinkSample. This article and samples apply to SQL Server 2005, 2008, and 2008R2. This really depends on a number of factors, but generally the answer is NO, it is not a good idea to run DBCC SHRINKDATABASE regularly. For the purpose of this article, I am …

Index Fragmentation and SHRINKDATABASE Read more »

One of the common task that I have come across is the need to convert a list of results into a comma separated list.  There are many ways to use this, one if which is in reports. Download the AsCSV.sql sample here. Often times I have told developers, here is how you do it, and if you Google on it …

Converting part of a result set to a comma separated list Read more »

I needed a way to list of of the indexes for an entire database, but I was running into a problem using sys.indexes that I could only see the indexes for the current database. Below is the solution that I put together to list off of the indexes in the entire database. CREATE TABLE ##allindexes ( databse_id INTEGER, table_id INTEGER, index_id INTEGER, table_name      VARCHAR(1024) ); EXECUTE Sp_msforeachdb …

Finding the names of all indexes on a SQL Server Read more »