Database Engine, T-SQL

How to change the collation of a database in SQL Server?

Have you ever wondered how to change the collation for a database in SQL Server? Well the other day I received a database from a third party supplier and the first step was to change the Collation of the database. My questioning about why they would supply the database in the incorrect collation setting was… Continue reading How to change the collation of a database in SQL Server?

Database Engine, T-SQL

SQL Server Collations Find current collation and all supported collations

Have you ever needed to check your database or SQL instance to find out its collation? Have you ever wanted to check whether a collation is supported by Windows or SQL Server? Well I am going to show you how to find out the information quickly and easily. The below query will show the instance… Continue reading SQL Server Collations Find current collation and all supported collations

Database Engine

How to attach AdventureWorks 2012 to SQL Server

Have you ever wanted to install the sample database (AdventureWorks )provided by Microsoft which a lot of the tutorials and books refer to? Well one of my colleagues has started to learn SQL Server so I thought I would knock up a quick guide for him. The correct classical way is to use T-SQL would… Continue reading How to attach AdventureWorks 2012 to SQL Server

Database Engine, T-SQL

Change a database state in SQL

Have you ever wanted to change a databases state from read only to read write or vice versa? Well I am going to show you how using some easy to remember T-SQL which you will be using repeatedly over time.   We received a database from a client the other day and noticed one of… Continue reading Change a database state in SQL

Database Engine

List of DBCC commands in SQL Server

Have you wanted a list of DBCC commands to enable you to do a deep dive? Well I am going to list them out for you. Below is a list which complied after a discussion with a fellow DBA who said there were only about twenty whilst I was sure there were way more. We… Continue reading List of DBCC commands in SQL Server

Database Engine, Replication

Length of LOB data (95563) to be replicated exceeds configured maximum 65536

Have you ever had the above error message? Wondered how to sort it out? Well I am going to show you how. Today I was confronted by the above error when a test migration database which was setup with replication was loaded with simulated data. The migration source environment was not replicated so I did… Continue reading Length of LOB data (95563) to be replicated exceeds configured maximum 65536

Database Engine, DMV

SQL Server DMVs and DMFs categorised to make it easier to find information.

Have you wanted to find a DMV which would help give information about AlwaysOn Availability Group ,           Change Data Capture , Change Tracking ,Common Language Runtime , Database , Database Mirroring , Execution , Extended Events , Filestream, Full-Text Search and Semantic Search ,        I/O , Indexes , Object s, Query Notifications , Replication ,… Continue reading SQL Server DMVs and DMFs categorised to make it easier to find information.

Database Engine, T-SQL

How to list all SQL DMVs (Dynamic management views) s and DMFs (Dynamic management functions ) in SQL Server?

Have you ever wondered how many DMVs are in SQL? Wondered whether a DMV exists which help diagnose your problems? Well I am going to show you how to list all the DMVs and DMFs so that you can do a deeper dive into them or await my series where I will be exploring each… Continue reading How to list all SQL DMVs (Dynamic management views) s and DMFs (Dynamic management functions ) in SQL Server?

Database Engine, T-SQL

Easily Check Database Integrity (DBCC CHECKDB) For All Databases On A Server

Today I was doing my daily checks on one of my biggest SQL instances which has over 1,000 databases and noticed that SQL Agent was stopped. I couldn’t see any errors and was able to simply start it without any problems but I was concerned that the daily integrity check jobs had not run and… Continue reading Easily Check Database Integrity (DBCC CHECKDB) For All Databases On A Server

Database Engine

What are the SQL Server System databases?

SQL Server System databases SQL Server has 5 very default system databases which are Master MSDB Model TempDB Resource Master As the name implies this is one of the most important databases on the system and without it SQL Server will not start. It stores all the configuration of the instance and all other databases… Continue reading What are the SQL Server System databases?