Microsoft SQL Server MVP for the 7th Year in a Row!

Today, a while ago, I have received that special email from Microsoft informing me that I was awarded with the Microsoft Most Valuable Professional (MVP) Award: Dear Artemakis Artemiou, Congratulations! We are pleased to present you with the 2015 Microsoft® MVP Award! This award is given to exceptional technical community leaders who actively share their … Read more…

Selected Tweets of Year 2013!

Another year has come to an end. Being faithful to the “tradition” of posting the last day of every year my selected tweets for the year that ends, here I am again, posting the “Selected Tweets of Year 2013!”. 2013 was remarkable, especially when it comes to Community. Interacting with you, the SQL Server Community … Read more…

Monitoring Locking in SQL Server

SQL Server, has a specific dynamic management view (DMV) which provides detailed information regarding the active locks within the SQL Server instance that is, locks that have been already granted or they are waiting to be granted. The DMV is called: sys.dm_tran_locks.   Using the sys.dm_tran_locks DMV for Monitoring Locking in SQL Server The following … Read more…

Massively Detaching and Re-attaching Databases in SQL Server

In this article, we will be discussing about massively detaching and re-attaching databases in SQL Server.   Why massively detaching and re-attaching all the databases in a SQL Server instance? There are cases where you might need to massively detach and re-attach all the databases in a SQL Server instance. Such scenario can be a … Read more…

T-SQL Tip: Inserting Leading Characters to a String

This post, is actually a T-SQL tip, on how to easily insert leading characters to a string. The Scenario for Inserting Leading Characters Consider that  you have a fixed-length table column for which you want to add leading characters, so that all its records, values with the same number of characters. How to Insert Leading … Read more…

T-SQL Tip: Retrieving Security-Related Info for SQL Server Logins

—— Retrieves Security-Related Information— for all the SQL Server Logins—— SQL Server versions  supported: SQL Server 2005 or later—SELECT [name] as LoginName,LOGINPROPERTY ([name] , ‘DefaultDatabase’) as DefaultDatabase,LOGINPROPERTY ([name] , ‘DaysUntilExpiration’) as DaysUntilExpiration,(CASE ISNULL(LOGINPROPERTY ([name] , ‘IsExpired’),0) WHEN 0 THEN ‘False’ ELSE ‘True’ END) as IsExpired,(CASE ISNULL(LOGINPROPERTY ([name] , ‘IsLocked’),0) WHEN 0 THEN ‘False’ ELSE ‘True’ END) … Read more…

Selected Tweets of Year 2012!

Hello friends, Another year has come to an end and as being faithful to the “tradition” of posting in the last day of every year my selected tweets for the year that ends, here I am, posting the “Selected Tweets of Year 2012!“. It was another great year of interaction with you, the SQL Server Community. … Read more…

T-SQL Tip: Getting the File Locations for all DBs in a SQL Server Instance

—— Dynamically builds  T-SQL statements for retrieving the file — locations for all the databases in the SQL Server Instance—— SQL Server versions  supported: SQL Server 2005 or later—SELECT ‘use ‘+ [name]+’; select ”’+[name]+”’ as DBName,cast ([name] as varchar(45)) as LogicalFileName,cast (filename as varchar(100)) as FileName from sysfiles;’ as SQLStatement FROM master.sys.databases Details: Just execute the statements generated … Read more…

Internal Query Processor Error: The query processor could not produce a query plan

OK folks, it did happen at some point, to get this error message: Internal Query Processor Error: The query processor could not produce a query plan. For more information, contact Customer Support Services.   Reproducing the Internal Query Processor Error Message I was trying to execute the following query: SELECT *  FROM dbo.tbl1 WHERE  tbl2ID=(SELECT … Read more…