Sample Databases for SQL Server

DBAs and Database Developers always need to test new database-related work before migrating it to Production Environments. To this end, Test/Development Environments are usually set up in order to allow for testing new administration and programmability features of DBMSs (in our case SQL Server 🙂 Though, by only having such an environment set up is … Read more…

Index Fragmentation in SQL Server and How to Manage it

In this article, we will be discussing about index fragmentation in SQL Server and how you can manage it. SQL Server automatically maintains indexes whenever insert, delete, or update operations are performed on the underlying data.   1. The Two Types of Index Fragmentation in SQL Server Though, in the cases where the underlying data … Read more…

Congratulations 2009 Microsoft MVP!

Today I have received a congratulation email from Microsoft announcing that I have been presented with the Microsoft Most Valuable Professional (MVP) Award for SQL Server! I am very happy about this award and I really feel honored. ——————————————————————————— Dear Artemakis Artemiou, Congratulations! We are pleased to present you with the 2009 Microsoft® MVP Award! … Read more…

Exclusive access could not be obtained because the database is in use

About the Error Message: “Exclusive access could not be obtained because the database is in use” A very neat feature of SQL Server is the way it lets the DBA to control connections. To this end, you can explicitly control connections with specific commands and methods. Even though this is not usually needed, there are … Read more…

A transport-level error has occurred when sending the request to the server

In this article, we will be discussing about the “A transport-level error has occurred when sending the request to the server” error message, you might get in SQL Server. This article’s purpose is to explain the above connectivity error and ways of resolving it.   Why you might get the “transport-level” error in SQL Server … Read more…

Divide by zero error encountered

In this article, we will be discussing about the “Divide by zero error encountered” error message in SQL Server. About the “Divide by zero error encountered” error message Well, as the error message says, whenever we have a division within a SQL query and the denominator has the value of zero (0) we get this … Read more…

Commonly used string functions in SQL Server

In this post, I provide a list of commonly used string functions in SQL Server.By combining these functions, it is possible to easily manipulate strings. — REPLICATE — This function given a string and an integer N, it repeats N-times the given string— Example:declare @string as varchar(10)declare @num_repeats as int set @string=’ABCD ‘set @num_repeats=4 select … Read more…

SQL Server 2005 Surface Area Configuration Tool

An important security improvement in Microsoft SQL Server 2005 is that various of its features that could be potentially susceptible to security risks are turned off by default. One of these features is that the built-in administrator of the machine on which SQL Server 2005 is installed, it is not automatically included in the SQL … Read more…

The conversion of a char data type to a datetime data type resulted in an out-of-range datetime value

About the char data type to a datetime data type conversion error There are some times where database applications give the following error when trying to convert strings to the datetime format in SQL Server: The conversion of a char data type to a datetime data type resulted in an out-of-range datetime value.   How … Read more…