SQL Clone
SQLServerCentral is supported by Redgate
Log in  ::  Register  ::  Not logged in

Cláudio Silva

I am a SQL Server DBA working from SQL2000 to SQL2016. I love using PowerShell to make my life ridiculously easier! I contribute to dbatools PowerShell open source module.

Did you know…you can’t do arithmetic operations with datetime2 like with datetime?

I’m currently working on a SQL code migration from Firebird to SQL Server and I hit an error that I haven’t seen for some time. The error message is the following: Msg 206, Level 16, State 2, Line 4 Operand type clash: datetime2 is incompatible with int This ringed the… Read more

1 comments, 2,109 reads

Posted in Cláudio Silva on 6 April 2018

dbachecks – A different approach for an in-progress and incremental validation

dbachecks is a new PowerShell module from the SQL Server Community! For more information, read introducing dbachecks. If you don't know dbachecks, we have released a good amount of blog posts that will help you: Announcing dbachecks – Configurable PowerShell Validation For Your SQL Instances by Rob Sewell introducing dbachecks… Read more

1 comments, 180 reads

Posted in Cláudio Silva on 22 February 2018

dbachecks – Using Power BI dashboards to analyse results

For the last couple of months, members of the dbatools team have been working on a new PowerShell module called dbachecks. This open source PowerShell module will enable you to validate your SQL Instances. Today it is released for you all to start to use dbachecks launch - the blog… Read more

9 comments, 291 reads

Posted in Cláudio Silva on 22 February 2018

Using dbatools to verify your SQL Server instances version compliance

One of the main DBA's duties is to guarantee that SQL Server instances are up-to-date in terms of patches (Service Packs, Cumulative Updates or Security Updates). Recently, dbatools added a new command that turns this validation a piece of cake. Thanks to Simone Bizzotto (@niphlod) for baking up the command… Read more

1 comments, 229 reads

Posted in Cláudio Silva on 23 January 2018

New version of sp_WhoIsActive (v11.20) is available – Deployed on 123 instances in less than 1 minute

Last night, I received Adam Machanic's (b | t) newsletter "Announcing sp_whoisactive v11.20: Live Query Plans". For those who don't know about it, sp_WhoIsActive is a stored procedure that provides detailed information about the sessions running on your SQL Server instance. It is a great tool when we need to… Read more

2 comments, 2,091 reads

Posted in Cláudio Silva on 5 December 2017

Using Common Table Expression (CTE) – Did you know…

Today I will write just a short blog post to do a quick reminder! I still hear a lot of people suggesting CTEs because they think it works like a temporary table (you populate the table and then it can be/is reutilized). It doesn't! From de documentation: Specifies a temporary… Read more

0 comments, 279 reads

Posted in Cláudio Silva on 30 November 2017

DELETE data on SQL Server HEAP table – Did you know…

Before I complete my question let me provide context. I've received an alert saying that a specific database could not allocate a new page (disk was full) The message that you will see on the SQL Server Error log is: Could not allocate a new page for database '' because… Read more

5 comments, 2,232 reads

Posted in Cláudio Silva on 26 September 2017

Someone is not following the best practices – dbatools and Pester don’t lie!

This month’s T-SQL Tuesday is brought to us by my good friend Rob Sewell (b | t) and we will "Let’s get all Posh – What are you going to automate today?" Read more

4 comments, 408 reads

Posted in Cláudio Silva on 12 September 2017

“Invalid class [0x80041010]” error when trying to access SQLServer’s WMI classes

I was using open source PowerShell module dbatools (GitHub repository) to get the list of SQL Server services I have on a bunch of hosts so I could confirm if they are in "running" state. Read more

1 comments, 725 reads

Posted in Cláudio Silva on 7 September 2017

HTTP 403 error – PowerShell Remoting, Different Domains and Proxies

On my day to day work I use Nagios monitoring software. I want to add some custom SQL Server scripts to enrich the monitoring Read more

0 comments, 1,050 reads

Posted in Cláudio Silva on 4 September 2017

Offline Microsoft Documentation? Download it!

On my last article I shared how we can now Contribute to Microsoft Documentation. Today I bring another quick tip on Microsoft Documentation!

Download Microsoft Documentation

Did you know that we can download PDF files with Microsoft Documentation?

I did not know until my colleague called my attention to… Read more

0 comments, 176 reads

Posted in Cláudio Silva on 30 August 2017

Contribute to Microsoft Documentation

Times have changed and Microsoft has changed the way we can contribute for documentation!

We already have access to the source code from some programs. One example is PowerShell, that has an GitHub repository where anyone can contribute!

Now anyone can contribute to the documentation too!

How and where?

Read more

2 comments, 113 reads

Posted in Cláudio Silva on 28 August 2017

“Does that copy subscriptions too?” – Now it does! New PowerShell SSRS commands

On my last post “SSRS Report Deployment Made Easy – 700 Times Faster” I showed how you can rely on the Microsoft PowerShell module ReportingServicesTools to automate several steps that otherwise would be a big time consumer.
After a couple of shares and re-tweets, my friend Rob… Read more

10 comments, 2,689 reads

Posted in Cláudio Silva on 27 July 2017

SSRS Report Deployment Made Easy – 700 times Faster

Back in October 2016, Microsoft started a new GitHub repository – ReportingServicesTools – an open source PowerShell module to manage SQL Server Reporting Services.

This project contains PowerShell scripts that allows you to perform various operations with SQL Server Reporting Services.

This module, as of today, provides 28… Read more

7 comments, 1,050 reads

Posted in Cláudio Silva on 12 July 2017

Have you backed up your SQL Logins today?

Why am I asking?

Have you never have been in a situation where:

  • the master backup is corrupted
  • you need to rollback a password change
  • know the list of permissions on a specific day (the scenario: “yesterday was OK, today is not working” due permission changes)


Do you see…

Read more

0 comments, 152 reads

Posted in Cláudio Silva on 22 June 2017

It is possible to run scripts inside SSMS on multiple instances without using CMS? Yes, it is!

Today I will write about an option that is less known/used in the SSMS tool. The ‘SQLCMD Mode’ option.

What is SQLCMD mode in SSMS?

First let me say that sqlcmd has a command line utility called sqlcmd.exe which allows to connect and run scripts from the command line.… Read more

4 comments, 195 reads

Posted in Cláudio Silva on 14 February 2017

Analysis of DBA professionals salary’s 2017 using PowerBI

On the 5th of January,  Brent Ozar (b|t) launched a survey on “Tell Us What You Make: The 2017 Data Professional Salary Survey” blog post.

Today I bring some data analysis based on the Excel raw data.

I will be using Power BI Read more

0 comments, 141 reads

Posted in Cláudio Silva on 23 January 2017

Find and fix SQL Server databases with empty owner property using dbatools PowerShell module

A few days ago I came across with a error that says “Property Owner is not available for database [XXXXXXX].”. The following image shows the error message.

SSMS 2008 error opening database properties

I have seen this message before so I know that the problem is that the database does… Read more

0 comments, 156 reads

Posted in Cláudio Silva on 19 January 2017