Monday, May 8, 2017

How to check if Replication components are installed on your SQL Server instance

If you need to check as to whether or not SQL Replication components are installed on a specific instance of your SQL Server, executing the following command on that instance will give you the answer.

EXEC sp_MS_replication_installed

Not installed:


Wednesday, March 1, 2017

The Way to Love by Anthony de Mello

The Way to LoveThe Way to Love by Anthony de Mello

My rating: 4 of 5 stars

A book to be read slowly and thoughtfully. Each chapter asks the reader to be different than almost everyone they've met or ever will meet; to leave the world of desire and attachment behind and enter the world with a fresh perspective. Armed with this new perspective. de Mello asserts that true love for others can now begin to take hold and it will be totally different than any love previously experienced. Only through this rebirth can true love and happiness be experienced.

View all my reviews

Tuesday, February 28, 2017

SQL Replication on a Table That Contains a SQL_Variant Datatype

I recently tasked with setting up Transactional Replication in SQL 2008 R2. While this in and of itself isn't necessarily complicated, I did run into an issue that kept the initial snapshot from being created. One of the articles (tables) in the publication had two columns that were defined with a SQL_Variant type and the snapshot agent could not convert those columns to create the snapshot. I tried the various column convert settings in the article properties, but they did not help. Only after changing the snapshot format from Native SQL Server to Character was the snapshot able to be created. All of the other article properties were left as default. Since I want all the other articles in this publication to retain the Native SQL Server snapshot format, I created a specific publication for tables that contain SQL_Variant columns.

Wednesday, February 15, 2017

Memoirs of Hadrian by Marguerite Yourcenar, Grace Frick (Translation) << Read

Memoirs of HadrianMemoirs of Hadrian by Marguerite Yourcenar

My rating: 3 of 5 stars

A multi-faceted look into the life of one of the 5 good emperors who ruled Rome for close to 100 years. This book details Hadrian's rise to power through the military and civil administration, his early years as emperor of "the world", middle age (where he loved and lost), and his final years as the most powerful man in the world. Two themes prevalent through Hadrian's life (with the exception of his final years) were the pursuit of pleasure and meaning, which I believe with his Hellenistic leanings, was trying to find one through the other. Throughout the book his actions probably seem strange or base when viewed from a Christian morality that had not yet permeated Western civilization, but in the context of the times, I can only guess that his actions were seen as normal for someone in the upper class of Rome.

View all my reviews

Monday, February 13, 2017

The Discourses by Epictetus << Read

The DiscoursesThe Discourses by Epictetus

My rating: 5 of 5 stars

There's so much to learn from the Roman Stoics that a review here wouldn't come close to capturing the essence of what this book is about. Those who do read it will be amazed at the amount of 2000 year old wisdom they can apply to their lives today.

View all my reviews

Friday, November 18, 2016

Query for Change Data Capture (CDC) tables and columns

Real quickly, I was in need of a query that would give me a listing of the tables and columns involved in Change Data Capture (CDC). I wanted to see the tracked columns in one column to the right of the table name so I utilized FOR XML PATH. Below is what I came up with.

SELECT OBJECT_NAME(source_object_id) [Table Name],
      (SELECT name + ',' FROM sys.columns SC WHERE SC.object_id = CT.object_id AND name NOT LIKE '__$%' FOR XML PATH('')) [Columns],
 FROM CDC.change_tables CT

It's certainly not perfect but it should give you a good start if you are ever in need of such a query.

Tuesday, February 23, 2016

List of Users Who Recently Changed Their Password

There may come a time when you need to generate a list of SQL logins and the last time their password was changed. By using the LOGINPROPERTY of the name in sys.server_principals we can generate such a list.

Note: This will only work with SQL logins.

The following query will generate the results below.

            ,LOGINPROPERTY(,N'PasswordLastSetTime') 'LastPWReset'
FROM    sys.server_principals SP
WHERE   SP.[type] = 'S'