Published on

November 11, 2012

Exploring SQL Server Concepts and Ideas

Welcome to another episode of our SQL Server journey! In this blog post, we will be discussing various concepts and ideas related to SQL Server. Let’s dive right in!

Auto Generate Script to Delete Deprecated Fields in Current Database

Have you ever faced the dilemma of dropping a column in your database, fearing that it might be needed somewhere in your code? Fear no more! In this article, we explore a script that allows you to automatically delete deprecated fields in your current database. This script, although 6 years old, still works like a charm. Take a look and feel free to suggest any improvements!

Shrinking Truncate Log File – Log Full – Part 2

Shrinking a database or MDF file is generally not recommended, but there are rare occasions where shrinking or truncating the log file becomes necessary. In this article, we discuss the precautions to take before and after truncating or shrinking the log file. Remember, taking backups before and after the operation is crucial in case of a disaster. Use this feature with caution!

Simple Use of Cursor to Print All Stored Procedures of Database Including Schema

Have you ever needed to print all the stored procedures of your database? In this article, we explore a simple stored procedure that uses a cursor to achieve this task. Although there might be cleaner ways to accomplish this now, this stored procedure still proves to be useful when documenting all the stored procedures in a database. Give it a try!

Interesting Observation about Order of Resultset without ORDER BY

Many developers believe that using an ORDER BY clause is unnecessary when the index is enforcing the order. However, in this interesting example, we demonstrate that without using ORDER BY, the same table and similar query can return different results. The query optimizer always chooses the method optimized for performance. The key takeaway is that there is no guaranteed order unless ORDER BY is used. Let’s explore this fascinating concept!

Size of Index Table – A Puzzle to Find Index Size for Each Index on Table

Are you up for a puzzle? In this article, we present a challenge where you need to find the index size for each table. We provide multiple solutions to this problem and encourage you to try solving it yourself before checking out the solutions. Test your SQL skills and see if you can come up with an even better solution!

Understanding Table Hints with Examples

Table hints are options and strong suggestions specified for enforcement by the SQL Server query processor on DML statements. In this article, we delve into the world of table hints and provide examples to help you understand their usage. It’s important to note that suggesting hints to the query optimizer should only be attempted when absolutely necessary and by experienced developers who know exactly what they are doing. Let’s explore this powerful feature!

Interesting Observation – TOP 100 PERCENT and ORDER BY

Have you ever wondered about the usage of TOP 100 PERCENT along with ORDER BY in SQL Server views? In this article, we discuss the common practice of including ordering inside a view and whether it is necessary. We explore the theoretical aspects and provide insights into the best practices. Let’s unravel this interesting observation together!

SQLPASS Nov 8-11, 2010-Seattle – An Alternative Look at Experience

In 2010, I had the privilege of attending the prestigious SQLPASS event in Seattle. In this article, instead of providing a typical event recap, I share my personal experiences and reflections on the event. Join me as I take you on a journey through the highlights of this unforgettable summit. Relive the excitement and relish the memories!

Change Database Access to Single User Mode Using SSMS

Have you ever needed to change the database access to single user mode using SQL Server Management Studio (SSMS)? In this article, we provide a step-by-step guide on how to accomplish this task. Follow the instructions and gain the knowledge to efficiently manage your database access. Let’s get started!

SQL Server 2012 Analytic Functions

SQL Server 2012 introduced new analytic functions that were long-awaited by developers. In this article, we celebrate the availability of these native functions and discuss their benefits in terms of performance and readability. Say goodbye to writing lengthy T-SQL code to simulate these functions and embrace the power of SQL Server 2012. Let’s explore these functions together!

That concludes our journey through various SQL Server concepts and ideas. We hope you found these articles informative and insightful. Stay tuned for more exciting content in the future!

Click to rate this post!
[Total: 0 Average: 0]

Let's work together

Send us a message or book free introductory meeting with us using button below.