I’m converting some Firebird database code to T-SQL and I’m seeing a lot of code that doesn’t work in the same way that SQL Server. No surprise - I already expected that but for those that still say that “all engines/databases are equal”…“is SQL right?” here is another proof that is not true.
On Firebird it is possible to use the CAST function using a DOMAIN (the equivalent in SQLServer is UDDT - User-Defined Data Types ) as target data-type, well turns out that on SQL Server…that is not possible.
On one of the last clients I have worked, I have implemented dbachecks in order to get the state of art and know how cool or bad the environments are before start knocking down the bad practices.
This client has seven different environments with more than 100 instances and more than 2000 databases.
Serial execution A non-parallel execution (single session) took more than 2 hours. This is not a big problem when we run it out of hours and we don’t want/need to be looking or waiting for it to finish.
dbachecks has seen the light about two months ago. As I’m writing this blog post, the module counts with more than 2600 downloads just from the PowerShell gallery . The module has about 110 configurable checks that make our live easier!
Today I will write about an option that I think users still do not realize that exists.
The default dbachecks works with the values previously saved (for that we use Set-DbcConfig).
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 bell right away! Somewhere on the code someone was trying to do an arithmetic calculation without using the proper function.
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 - a new module from the dbatools team! by Chrissy LeMaire install dbachecks by Chrissy LeMaire dbachecks commands by Chrissy LeMaire dbachecks – Using Power BI dashboards to analyse results by Cláudio Silva My wrapper for dbachecks by Tony Wilhelm Checking backups with dbachecks by Jess Promfret dbachecks please!