SQL Server

Recent SQL Server Posts

Create External Data Source to Reference a Readable Secondary Replica of Always On Availability Group

We need to create an external table that uses and external data source. The external data source needs to query the (read_only) readable secondary node of an availability group.

SQL Server Agent Job - $RawUI.CursorPosition Error

I am trying to run some PowerShell script to cleanup old backup files in the database server using SQL Server Agent job. But, I got this error: 
Executed as user: <sql server agent account>. A job step received an error at line 3 in a PowerShell script. The corresponding line is '$RawUI.CursorPosition = @{X=0;Y=0}  '.

Get Cluster Information - Stored Procedure

I always need to get cluster information of my server whenever I am investigating a database server. I tried searching in internet as someone might have already posted something similar but could not find one. I decided to create a stored procedure so that I can deploy it on all of my servers and be able to retrieve the cluster information quicker.