How To Shrink A Database In SQL Server

How To Shrink A Database In SQL Server

Recently, my team got a requirement to reduce the size of one of our SQL Server databases to boost the performance of that DB. As a team, we analyzed this requirement and identified a few ways to do this. In this article, I will walk you through multiple ways to shrink a database in SQL … Read more

How To Generate Script Of Table With Data In SQL Server

How To Generate Script Of Table With Data In SQL Server

Recently, we were working on an SQL Server database migration project. For the critical tables, we generated scripts, including their data, which made our job easy during migration activities. In this article, I will walk you through all the steps to generate the script for the table with data in SQL Server in real-time. How … Read more

How To Get The Primary Key Of A Table In SQL Server

How To Get The Primary Key Of A Table In SQL Server

As a SQL developer, as part of my daily tasks, I used to work on multiple issues where I used to find the primary key of a table in an SQL server. In this article, I will walk you through multiple approaches. How To Get The Primary Key Of A Table In SQL Server Let … Read more

How To Count Number Of Columns In A Table In SQL Server

How To Count Number Of Columns In A Table In SQL Server

Being a senior developer in SQL Server, I have often been asked to count the number of columns in different tables in SQL server concerning performance optimization. I have identified a few simple approaches to do this. In this article, I will walk you through all those ways to count the number of columns in … Read more

How To Create A User In SQL Server Database

How To Create A User In SQL Server Database

As a DBA working with SQL server and managing SQL Server environments, I have created tons of users in SQL server. It is crucial to know how to do this task smoothly. In this article, I will walk you through the simplest approaches I used to follow to create SQL server user. How To Create … Read more

Grant Write Access To Table In SQL Server

Grant Write Access To Table In SQL Server

As a database administrator working in an SQL server, one of my daily activities is to grant different users access to different database objects. In this article, I will walk you through multiple ways to grant write access to SQL server tables. Check out How To Create A User In SQL Server Database before starting. … Read more

Partition Columns For A Unique Index Must Be A Subset Of The Index Key.

Partition Columns For A Unique Index Must Be A Subset Of The Index Key.

Recently, I was trying to create a partitioned table in an SQL server; after executing the SQL script, I got this error. In this article, I will walk you through the solution. Partition Columns For A Unique Index Must Be A Subset Of The Index Key. I tried executing the SQL script below. The moment I executed … Read more

Table Partitioning In SQL Server With Example

table partitioning in sql server with example

As a senior SQL developer working with a reputed MNC, my daily activities involved dealing with large tables, and that’s where table partitioning helped me a lot. In this article, I will walk you through all the complete steps to implementing table partitioning in SQL servers with real-time examples. Table Partitioning In SQL Server With … Read more

SQL Server If Object_ID Is Not Null Drop Table

SQL Server If Object_ID Is Not Null Drop Table

As an SQL developer, I often need to drop a table based on certain conditions. After my analysis, I identified that OBJECT_ID IS NOT NULL DROP TABLE, which is a great way to achieve this. In this article, I will walk you through the complete steps to use this pattern. SQL Server If Object_ID Is … Read more