Introduction There can be certain scenarios when one needs to connect to an SQL Server Instance in a Single User Mode by using the Startup Option -m. For example, the need could be to recover a damaged system database...
Category - Learn SQL Server
SQL Server: How to Start SQL Server with Minimal Configuration
Introduction There can be certain scenarios when SQL Server is not starting because of configuration problems. During such scenarios one need to start an instance of SQL Server by using minimal configuration...
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...
Configure Network Drive Visible for SQL Server During Backup and Restore Using SSMS
Introduction Most of the Development and Test Database Servers will not have enough disk space to store both the database and backup files in order to perform the periodic database refreshes. In such scenarios, the best...
Convert Seconds to Minutes, Hours and Days in SQL Server
Introduction The TSQL script mentioned in this article can be used to Convert Seconds to Minutes, Hours and Days in SQL Server. /* Example: Where Time Is Given In Seconds Output: In “Day(s) : Hour(s) : Minute(s) :...
How to Fix Cannot execute script. Insufficient memory to continue the execution of the program (mscorlib) error in SQL Server
Introduction Database Administrators often need to get involved in code deployments wherein they release new code from one environment to another. As a best practice it is highly recommended to note down issues faced...
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...
How to Enable & Disable XP_CMDSHELL using SP_CONFIGURE in SQL Server
Introduction In this tip we will take a look at the step to follow to enable or disable XP_CMDSHELL using SP_CONFIGURE system stored procedure. In order to use XP_CMDSHELL you need to be a system administrator. Read the...
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...
Fix Cannot open user default database. Login failed. Login failed for user SQL Server Error
Introduction 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:...