-
TSQL to find list of all index not used for last 30 days
16 May 2023This code is designed to provide information about the indexes in the database, including their creation dates, last usage dates, and whether they have been used recently. TSQL — Create…
-
Use ProcDump to capture sql server unexpected crash dump
11 May 2023To use ProcDump to capture a SQL Server unexpected crash dump, follow these steps: Download and extract ProcDump: Navigate to the directory where ProcDump is located: Capture the SQL Server…
-
SQL Server (MSSQLSERVER) service terminated unexpectedly
One day, we suddenly discovered that the SQL Server was not running and was in a stopped state. In a rush, we quickly enabled the SQL Server and Agent services…
-
TSQL to find index fragmentation in SQL Server
10 May 2023To determine index fragmentation in SQL Server, you can use the following steps: SELECT OBJECT_NAME(DMV.object_id) AS TABLE_NAME , SI.NAME AS INDEX_NAME , avg_fragmentation_in_percent AS FRAGMENT_PERCENT , DMV.record_count FROM sys.dm_db_index_physical_stats(DB_ID(), NULL,…
-
SQL Server DBA Daily Routine Tasks
8 May 2023As a SQL DBA, there are various essential tasks to perform every day to ensure the smooth operation and security of the database system. These responsibilities include:
-
All About DBCC and DMV Interview Question
What is the use of DBCC commands? DBCC stands for Database Console Commands, a few of us also call it database consistency checker. There are many DBCC commands in SQL Server. We…
-
List all Login, User & DB Role in SQL Server
11 April 2023Description This script generates a list of Logins, Users and the Database Roles that the user belongs to in all the databases in A SQL Server; with a couple of…
-
How to Check Database Encryption Status in SQL Server
3 April 2023Introduction Data security is a critical aspect of database management, and encrypting sensitive data is crucial to safeguarding it from unauthorized access. In SQL Server, Transparent Data Encryption (TDE) provides…
-
Find the users connected to SQL Server
28 March 2023In a SQL Server environment, it can be useful to monitor the user activity and track who is connected to the databases, from which machine they are connected, when they…
-
Check SQL Server Version & license details
12 March 2023As a SQL Server DBA, I would rephrase the statement as follows: While SQL Server does not keep track of license information, it can provide you with details about the…