Category Archives: Best Practices

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

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

T-SQL: Simplified CASE expression

My last article is providing in depth tutorial about these statements: ISNULL COALESCE IIF CHOOSE The main purpose of introducing these statements is improving code readability and achieving cleaner code. Using these statements may result to poor performance in some … Continue reading

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

SQL SERVER BACKUP Database Permission

When speaking about Permission term in SQL SERVER , It has two parts: Server Permissions Database Permissions And from another point of view, the SQL SERVER ROLE also has two parts: Server-Level Roles Database-Level Roles In fact the Security Model of SQL SERVER is a hierarchical … Continue reading

Posted in Best Practices, Database Administration, SQL General Information, T-SQL Tips & Tricks

Microsoft SQL Server Best Practices

These three resources are the best. For developers: http://www.sqlmag.com/article/tsql/tsql-best-practices-141536 http://www.sqlmag.com/article/tsql/tsql-best-practices-141537 For databse designers: http://www.simple-talk.com/sql/database-administration/ten-common-database-design-mistakes/ And this link is from msdn that I love it: http://archive.msdn.microsoft.com/SQLExamples/Wiki/View.aspx?title=Best%20practices%20%2c%20Design%20and%20Development%20guidelines%20for%20Microsoft%20SQL%20Server&referringTitle=Home Enjoy!

Posted in Best Practices | Leave a comment