Author Archives: Saeid Hasani

Upgrade SQL Server 2016 to Service Pack 1 faced with Exit code (Decimal): -2068380094

I wanted to upgrade the SQL Server 2016 installed on my laptop to service pack 1 last night. But the setup failed with this error:   Final result:                  The patch installer has failed to update the shared features. To determine … Continue reading

Posted in Database Administration, SQL General Information | Tagged , , , ,

Event ID 129 Reset to device, \Device\RaidPort0, was issued on Database Server

Two months ago, one of my clients called me that his DB Server is not responsive. Their Server is a HP DL580 with this specs: CPU: 4 x 12 cores Memory: 256 GB Storage:  2 x Raid 10 (8 x … Continue reading

Posted in Database Administration, SQL General Information | Tagged , , , , ,

T-SQL: Improve the Performance for LIKE Wildcard by Changing the Collation

Well, I published new article about how to tune the performance for LIKE wildcard queries… Please navigate to this article on Microsoft TechNet Wiki  I’ll also publish it on this blog soon! 🙂

Posted in Best Practices, Joy of T-SQL, SQL General Information, T-SQL Tips & Tricks

TNWikiSummit15 Presentation: Error Handling in SQL Server 2012 and 2014

  The follow text is copied from this blog: Official Blog of TechNet Wiki   Using Error Handling within the Transact SQL language needs a deep knowledge. It depends on the SQL Server version, there are various implementations for handling the … Continue reading

Posted in Best Practices, Joy of T-SQL, SQL General Information, T-SQL Tips & Tricks

TechNet Wiki International Summit 2015

You can register by filling out the TNWiki Summit15 form and choosing your favorite Presentations. Registration for TNWiki Summit15 are open . REGISTER NOW  !!! Here’s the schedule:  DAY 1 – March, 17th Time / GMT  DEV track WIKI track  INFRA track GMT “-8”  : … Continue reading

Posted in T-SQL Tips & Tricks

Webinar: Error Handling in SQL Server

    March 19, 2015 9:45 PM GMT Saeid Hasani Structured Error Handling in SQL Server The goal of this session is to provide a simple and easy to use error handling mechanism with minimum complexity. This session is compatible … Continue reading

Posted in Best Practices, Joy of T-SQL, SQL General Information, T-SQL Tips & Tricks

T-SQL: Delete All Rows From a Table Except Top(N) Rows

I added the article which comes from a question that asked in MSDN forum. The problem is how to delete all rows from a table but remain the Top (N) rows, for example, remaining only the top (1000) rows. All Code samples … Continue reading

Posted in Best Practices, Joy of T-SQL, SQL General Information, T-SQL Tips & Tricks

T-SQL: Error Handling for CHECK Constraints

Happy New Year 2015 to all! 🙂 This is my first post in new year and wish I will be more active this year! In the former article about CHECK constraints, we did not cover how to handle the errors when … Continue reading

Posted in Best Practices, T-SQL Tips & Tricks

Negative Effects of Query Designer

  Merry Christmas and Happy New Year Query Designer is a tool that make it easy to write T-SQL queries. It is visual and handy. But using this tool has its negative effects. In this short writing we see some … Continue reading

Posted in Best Practices, T-SQL Tips & Tricks

Stored Procedure string parameter accepts default value without quotes

Supposing that we define a parameter with string data type such as NVARCHAR. We can assign a default value for this parameter usually using quotes. So, the following code must encounter an error: CREATE PROC uspStringWithoutQuotes   @Param NVARCHAR(20) = Hello … Continue reading

Posted in T-SQL Tips & Tricks | Tagged , ,