James Travis

Update existing user accounts default language.

When changing the default language of a server it is neccessary to run sp_defaultlangauge against any existing logins. The reason is default language only effects any new accounts created after this change is made. This script is designed to help you quickly make the adjustment for all existing accounts. Note: this has been tested under […]


117 reads

Converting money to the word value.

With this script you can supply an money value such as $12525.83 and it will return the word value "Twelve Thousand Five Hundred And Twenty-Five Dollars And Eighty-Three Cents".It is comprised of a table for Number to Name and a procedure to parse into it's piecesNOTE: This only goes to billions at this point, but […]


416 reads

How to Fix Inconsistent Metadata Errors

Why does changing a table on a SQL Server 7.0 server cause "OLE DB provider 'SQLOLEDB' supplied inconsistent metadata. An extra column was supplied during execution that was not found at compile time." to occur when query the table from a SQL Server 2000 server via link to other. In this article by James Travis, he shows you what the problem is and how to fix it.

5 (1)


12,840 reads

Find a string in DB objects.

Find a string in Procedures, Triggers, Constraints, Defaults, Functions, and Views. First off this will not work for any items that have the WITH ENCRYPTION remark in them. With this is can pose a string such as 'INSERT' against all the 'P'rocedures to get a return of which Procedures have an INSERT statment in them […]

5 (1)


1,629 reads

Rename User Login

You can effectively rename a user account but as this is messing wit the system tables I would suggest dropping and adding the user back. But for those of you who really want to know how here it is.First off I tested this and it works fine renaming a user. However this is directly modifying […]


710 reads

Convert a given date to GMT

In SQL 7 you had no way to convert local time to GMT (UTC time) which was added in SQL 2K as GETUTCDATE() which will output the current date you would get with GETDATE() but a it's GMT counterpart. Although this was a great improvement I work with data on another server that's front end […]


581 reads


ACM Lecture at SELU


Had the pleasure of presenting to Dr. Ghassan Alkadi and a full house at...

T-SQL Copy & Paste Pattern – Increasing a performance problem


Disclaimer: The title is my assumption because I saw it in the past happening...

Removing ad hoc plans from Query Store


This is not a post about the “optimize for ad hoc workloads” setting on...

Read the latest Blogs


Txn log file is full. Error 9002

By bobrooney.81

Hi All, Here is the scenario on of the test servers. The transaction log...

How to define data types

By ocean3300

What are the things you consider when you create a new table and define...

What is the default data-type for columns made from an expression

By r.gall

In Microsoft SQL Server Management Studio 2014, when you execute the following statement: SELECT...

Visit the forum


SQL Server Q&A from the SQLServerCentral community

Get answers

Question of the Day


See possible answers