SQL Server Error Log is the best place for a Database Administrators to look for informational messages, warnings, critical events, database recover information, auditing information, user generated messages etc. By...
Search results for - Error Log
Limit SQL Server Error Log File Size in SQL Server
SQL Server Error Log contains valuable information which can be used by database administrators to troubleshoot issues with SQL Server. A typical Error Log file contain informational messages, warnings, critical events...
How to Recycle SQL Server Error Log file without restarting SQL Server Service
SQL Server Error Log is the best place for a Database Administrators to look for informational messages, warnings, critical events, database recover information, auditing information, user generated messages etc. SQL...
How to Fix “BACKUP detected corruption in the database log” Error in SQL Server
Due to an unplanned reboot of SQL Server one of the transaction log file of a database become corrupt. DBA noticed this issue once regular transaction log backup job started failing with “BACKUP detected...
Fix Cannot open user default database. Login failed. Login failed for user SQL Server Error
In this article we will take a look at the steps which you need to follow when you receive “Cannot open user default database. Login failed. Login failed for user ‘UserName’. (Microsoft SQL Server, Error: 4064)“ SQL...
How to Change SQL Server Login Properties to Enforce Password Policies and Expiration Settings
How to set SQL Server Password Policy | Set SQL Password Policy This article demonstrates the steps to create an SQL Server Login which enforces password policies and password expiration policies. Let us start by...
TAIL-LOG Backup in SQL Server Step by Step Tutorial with Examples
A tail-log backup captures any log records which has not yet been backed up i.e., the tail of the transaction log to prevent any work loss and to keep the transaction log chain intact. Before you can recover a SQL...
SQL Server Database Engine Service Startup Options
SQL Server Database Engine supports different startup options for SQL Server Database Engine Service. A database administrator can set the startup options very easily using SQL Server Configuration Manager. In this...
How to Repair Database in Suspect Mode in SQL Server
Summary There are times when you connect to an SQL Server Instance you will find the database being marked as SUSPECT. In such a scenario, you will not be able to connect to the database to read and write data...
How to Start SQL Server without TempDB Database
Recently, after the scheduled maintenance window when the database administrator started the SQL Server it failed to start due to corruption issues with storage subsystem. On further investigation it was identified that...
Identify Deadlocks Using Graphical Deadlock Chain Event in SQL Server Profiler
This article explains how to identify deadlocks in SQL Server using graphical deadlock chain event in SQL Server Profiler. We would highly recommend you to read “Identify Deadlocks in SQL Server Using Trace Flag 1222...
How to Use Dedicated Administrator Connection in SQL Server
To use a Dedicated Administrator Connection (DAC) in SQL Server, open new query window and in Connect to Server dialog box one need to prefix the word “admin:” before the SERVERNAME as shown in the...
How to Repair Suspect Database in SQL Server
There can be a possibility that when you connect to an SQL Server Instance you will find the database being marked as SUSPECT. During such scenarios, you will not be able to connect to the database. Steps to Fix...
Identify Deadlocks in SQL Server Using Trace Flag 1222 and 1204
This article outlines the steps which one can follow to enable Trace Flag 1222 on SQL Server to capture deadlock information. You can also use Trace Flag 1204 in conjunction with Trace Flag 1222. Difference between...
SQL Server Best Practice Auto Close Database Option Should Remain OFF
Introduction In this article, we will take a look at why it is essential to leave AUTO CLOSE database option turned OFF for a Production or a Non-Production SQL Server Database across all versions and editions of SQL...
How to Verify and Register SPN for SQL Server Authentication with Kerberos Connections
Introduction This article explains how to verify and register Service Principal Names (SPN) for SQL Server Authentication with Kerberos Connections. Kerberos Authentication is a widely accepted network authentication...
Database Consistency Checker DBCC CHECK For Analysis Services Database in SQL Server 2016 for Tabular and Multidimensional Databases
In SQL Server 2016 you will see a new feature in Analysis Services to perform Database Consistency Checker (DBCC Check) to find corruption issue against Analysis Services Database or in Individual Objects. The Database...
How to Configure TempDB on Local Disk in SQL Server 2012/2014 Failover Cluster to Improve Performance
Starting SQL Server 2012 Failover Cluster installation supports Local Disk to be used for TempDB Data and Log files. This article explains the steps to be followed by the DBA to configure SQL Server 2012 Failover...
How to Restore Database in SQL Server?
Summary This article mentions different methods to restore the database in SQL Server from the backup files (.bak files). You can RESTORE a database from a backup file using SQL Server Management Studio (SSMS) or...
Backup Database SQL Server
SQL Backup | How to Create a Full Backup of Database in SQL Server This article explains the steps you need to follow to take a FULL Backup of Database in SQL Server Using SQL Server Management Studio and by using TSQL...
How to Drop Database in SQL Server by Closing Existing Connections
SQL Server DROP Database | SQL DROP Database Statement This article outlines the steps to DROP Database in SQL Server when the users are connected to a SQL Server Database. You may need to closing existing connections...
How to Enable XP_CMDSHELL & Disable XP_CMDSHELL using SP_CONFIGURE in SQL Server
How to Enable xp_cmdshell | How to Disable xp_cmdshell In this tip we will take a look at the step to follow to Enable XP_CMDSHELL and how to Disable XP_CMDSHELL using SP_CONFIGURE system stored procedure. In order to...
Steps to Connect to SQL Server When all System Administrators are Locked Out
Getting Sysadmin Access to SQL Server When Locked Out SQL Server Security is one of the key responsibilities of a Database Administrator. However, there can be scenarios when a DBA will be asked to manage SQL Server...
MAXDOP for DBCC CHECKDB, DBCC CHECKTABLE and DBCC CHECKFILEGROUP T-SQL Enhancement in SQL Server 2016
SQL Server 2016 brings MAXDOP settings, for DBCC CHECKDB, DBCC CHECKTABLE and DBCC CHECKFILEGROUP command. Database Administrators can leverage MAXDOP settings to above mentioned DBCC commands to achieve Max Degree of...
Permissions Required to Take Database Backup in SQL Server
For a user to take database backups in SQL Server a user must be a member of DBCREATOR Server Role and DB_OWNER Database Role. Else you will receive the below mentioned error while performing backups...
SQL Server FULL Recovery Model Step by Step Tutorial with Examples
In Full Recovery Model Point in Time recovery of the database is possible as long as you have all the valid database backups along with the transaction log tail backup file. In Full Recovery model all the transactions...
How to Export records from SQL Server to Text File using BCP Command
Introduction Is there a quick way to export records from SQL Server to text file? In this tip we will take a look at an example to export records from SQL Server to text file using BCP. In this tip we will learn how to...
Troubleshooting SQL Server blocked access to procedure sp_send_dbmail
Use sp_send_dbmail to send email from SQL Server | How to Use Database Email SQL Server Feature Troubleshooting SQL Server blocked access to procedure ‘dbo.sp_send_dbmail’ of component ‘Database Mail...
Different Ways to Find Default Trace Location in SQL Server
How to Find SQL Server Default Trace Location Starting SQL Server 2005, Microsoft introduced a light weight trace which is always running by default on every SQL Server Instance. The trace will give very valuable...
SQL Server: How to Find which user deleted the database in SQL Server
Introduction In this article we will take a look at the steps which you can follow to quickly identify the user who deleted the user database in SQL Server. There are two different methods by which one can easily find...
How to Enable and Refresh IntelliSense in SQL Server Management Studio (SSMS)
Introduction In SQL Server 2008, Microsoft had introduced IntelliSense feature in SQL Server Management Studio (SSMS). As a Developer or as a DBA you may face issues with IntelliSense feature not to be working or not...
Drop Database in SQL Server by Killing Existing Connections
DROP Database SQL Server Let’s learn how to Drop Database in SQL Server when the users are connected to the SQL Server Database. You may find the need to close all the existing database connections in a database...
Display Line Numbers in SQL Server Management Studio (SSMS)
SSMS Show Line Numbers | SSMS Line Numbers This article explains how to enable SSMS show line numbers. SHOW Line Numbers in SQL Server Management Studio As a developer you may have often encounter errors while debugging...
How to Move TempDB to New Drive in SQL Server
There are times when as a DBA you find the need to move TempDB Data and Log Files to a new Drive. This article explains all the steps you need to follow to move TempDB files.