Transact SQL – Drop Temp Table if it it exists

Background Reviewing some Transact SQL Code and saw a code block that works well in exception handling, but can have a bit of side effect in Transact SQL. Code Original Code SQL Explanation When the temp table does not exist, an error is raised. Because the drop table is enclosed in a try/catch block the … Continue reading Transact SQL – Drop Temp Table if it it exists

SQL Server – Number of Error Log Files

  Background Trying to review error logs on one of our SQL Server Instances and discovered that it is likely that the error logs we might have to mine is so far back and we might no longer have it. And, so took to see if we have properly calibrated the Number of Error Logs Files … Continue reading SQL Server – Number of Error Log Files

SQL Server – Changing Sql Instance Collation – via sqlservr/-q – Little Traps

Preface In an earlier post we spoke about discovering that we can change our SQL Server Instance by restarting SQL Server with the /q option. That post is here.   Real life experience If truth be told, our first use-case was a recently installed SQL Server instance without any user databases. In this post we … Continue reading SQL Server – Changing Sql Instance Collation – via sqlservr/-q – Little Traps

Transact SQL – Error – “Arithmetic overflow error converting numeric to data type numeric”

Background Revising a SQL Code snippet for finding Bookmark Lookups and ran into an error stating: Msg 8115, Level 16, State 1 Arithmetic overflow error converting numeric to data type numeric Code Original Code Here is the original code ...   Error Message Remediation To remediate please try one of the options stated below: Set … Continue reading Transact SQL – Error – “Arithmetic overflow error converting numeric to data type numeric”

Running Big SQL Files against SQL Server – Day 2

Background Quick follow-up to our last post.  In the post we discussed that we were not able to use sqlcmd.exe to post a relatively big file to SQL Server. File Stats Here is the file over EmEditor: The File's Size is 175 MB, and it has 160, 000 lines of SQL Statements.   Tools SQLCMD.EXE StackOverflow.net Read … Continue reading Running Big SQL Files against SQL Server – Day 2

Running Big SQL Files against SQL Server

Background Using Tablediff, Generated a file of about 150 MB. Now ready to train the SQL file against our DR Server, but no play.   Error Message Client Textual Image Server Textual Image   File Size The file size is about 170 MB.   Editor Because of the file's size, there are seemingly few editors … Continue reading Running Big SQL Files against SQL Server

Technical: Microsoft – SQLServer – Error – “The conversion of the varchar value ‘100000’ overflowed an INT2 column. Use a larger integer column” (Msg 244, Level 16, State 2, Line 355)

Technical: Microsoft - SQLServer - Error - "The conversion of the varchar value '100000' overflowed an INT2 column. Use a larger integer column" (Msg 244, Level 16, State 2, Line 355) Msg 244, Level 16, State 2, Line 355 The conversion of the varchar value '100000' overflowed an INT2 column. Use a larger integer column … Continue reading Technical: Microsoft – SQLServer – Error – “The conversion of the varchar value ‘100000’ overflowed an INT2 column. Use a larger integer column” (Msg 244, Level 16, State 2, Line 355)