Windows Server 2012 / 2012 R2 – Logon restricted to members of Local Administrators group

Within one of the SQL Server environments that I support, we recently experienced a Windows Server 2012 operating system crash followed by a situation where the SQL Server 2012 service was unable to start with the following error message: Error message 7038 – The MSSQLSERVER service was unable to log on as NTSERVICE\MSSQLSERVER with the currently configured password…

0

EOMONTH() Equivalent in SQL Server 2008 R2 and below

  SQL Server 2012 introduced several new system functions pertaining to the date and time data types.  In my opinion, I’ve found the EOMONTH(), “end of month”, function to be one of the most useful.  The EOMONTH() function returns the final day of the calendar month, thus greatly simplifying a common calculation, taking into account…

10

Language Translation in SQL Server using Bing Translator APIs & SQL CLR

Language Translation within SQL Server using Microsoft Translator public APIs and CLR Stored Procedures / Functions   Does SQL Server have a built-in way to translate my text data from English to Spanish, German to French, Italian to Russian?  The answer is no, SQL Server does not have this functionality built-in, but it is indeed possible to build by…

14

Bulk Database Migration from On-Premise SQL Server to SQL Azure – Step 1: Bulk .bacpac Export

I recently had a task to perform a bulk migration of hundreds of databases to Windows Azure SQL Database (formerly known as SQL Azure) from an instance of SQL Server 2012.  If you need to migrate a very small number of databases, the easiest way is likely through the SSMS export Data-Tier Application wizard.  You can…

4

Creating Complex Test Databases – Generating One Table for each of the 2,397 supported Collations

As a follow up to my series on complex test databases, this article will cover one of the more interesting test databases that I recently created.    Goal:  Create a database that includes one table for each supported collation.  Each table contains a single column with the various column level collations supported by SQL Server 2012 (nearly…

0

TSQL – Solve it YOUR Way – Parsing Tips and Tricks – Returning Digits after the Decimal Point

Introduction: As part of the blog series TSQL – Solve it YOUR Way, today we will tackle a numeric parsing question.  While past topics include solutions that vary from 15-150 lines of TSQL code, all of today’s solutions will be very short.  A question was recently posted in the MSDN forums asking how to retrieve the digits after the…

7

TSQL – Solve it YOUR Way – Finding the Longest Repeated Substring

  Introduction: As part of the blog series TSQL – Solve it YOUR Way, today’s topic will cover a common programming interview question where we are asked to find the longest repeated substring in a given string, followed by different solutions and explanations from three of the more helpful and creative contributors in the TSQL…

5

TSQL – Solve it YOUR Way – Finding the MAX Value from Multiple Columns

Introduction: As part of the blog series TSQL – Solve it YOUR Way, today’s topic will cover a question recently asked in the Transact-SQL MSDN Forums here, followed by four different solutions from three of the more helpful and creative contributors in the TSQL MSDN forums, Jingyang Li, Steven Wang, and Kent Waldrop. Topic:  I…

9

TSQL – Solve it YOUR Way – Gaps and Islands… With a Twist!

Introduction: As part of the blog series TSQL – Solve it YOUR Way, today’s topic is a variation of the popular T-SQL question titled “Gaps and Islands” followed by three different solutions presented by three of the more helpful and creative contributors in the TSQL MSDN forums, Steven Wang, Alejandro Mesa, and Tom Cooper.  Gaps and…

3

TSQL – Solve it YOUR Way – Text to Speech

Introduction: As part of the blog series TSQL – Solve it YOUR Way, I will present a topic recently discussed in the Transact-SQL MSDN forum here, followed by three different solutions to this problem supplied by three of the most active and helpful contributors in the forums, Tom Cooper, Naomi Nosonovsky, and Kent Waldrop.  More importantly, they have included thoughts as to…

6