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...
Tag - SQL Server
SERVERPROPERTY Function T-SQL Enhancement in SQL Server 2016
SERVERPROPERTY is an inbuilt function which gives you information about the server instance. Learn How To Get SQL Server Info Using SERVERPROPERTY Function in SQL Server. This is Part 10 of 10 Part T-SQL Enhancements in...
STRING_SPLIT Function and STRING_ESCAPE Function in SQL Server 2016
SQL Server 2016 introduces two new string functions namely STRING_SPLIT and STRING_ESCAPE. This is Part 8 of 10 Part T-SQL Enhancements in SQL Server 2016 for Developers and DBAs. Click here to read it from the...
COMPRESS and DECOMPRESS T-SQL Enhancement in SQL Server 2016
SQL Server 2016 introduces two new system functions namely COMPRESS and DECOMPRESS. This is Part 7 of 10 Part T-SQL Enhancements in SQL Server 2016 for Developers and DBAs. Click here to read it from the beginning…...
ALTER DATABASE SET AUTOGROW_ALL_FILES T-SQL Enhancement in SQL Server 2016
SQL Server 2016 introduces two new options to ALTER DATABASE statement which can be used to modify database files namely AUTOGROW_SINGLE_FILE and AUTOGROW_ALL_FILES. In the earlier versions of SQL Server...
ALTER DATABASE SET AUTOGROW_SINGLE_FILE T-SQL Enhancement in SQL Server 2016
SQL Server 2016 introduces two new options to ALTER DATABASE statement which can be used to modify database files namely AUTOGROW_SINGLE_FILE and AUTOGROW_ALL_FILES. In the earlier versions of 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...
ALTER TABLE WITH (ONLINE=ON | OFF) T-SQL Enhancement in SQL Server 2016
SQL Server 2016 introduces an interesting T-SQL enhancement to improve performance and reduce downtime ALTER TABLE WITH (ONLINE = ON | OFF). This statement will help you alter data types, change column/table collation...
DROP IF EXISTS SQL Server T-SQL Enhancement in SQL Server 2016
DROP IF Exists SQL Server | DROP IF Exists Table | DROP IF Exists Procedure SQL Server 2016 introduces a new DROP IF EXISTS SQL Server statement to DROP objects such as tables, columns, indexes, stored procedures...
TRUNCATE TABLE WITH PARTITIONS T-SQL Enhancement in SQL Server 2016
Truncate Table WITH Partitions SQL Server | Truncate Table SQL Server | It is a well known fact that TRUNCATE TABLE is faster than DELETE statement. TRUNCATE TABLE SQL Server uses lesser system resources and transaction...
How to Enable an Index in SQL Server
In this article we will take a look at how to enable an index in SQL Server. This is a very useful feature which will help you enable an index which was disabled earlier to check whether the index was really useful or...
How to Disable an Index in SQL Server
In this article we will take a look at how to disable an index in SQL Server. This is a very useful feature which will help you identify whether the index is really useful or not without actually dropping the index...
DIFFERENTIAL Database Backups in SQL Server Step by Step Tutorial with Examples
What is a Differential Backup SQL Server? Differential Backup SQL Server will only record the data which has changes since the last successful full database backup. Differential Backup SQL Server | Differential Database...
FULL Database Backups in SQL Server Step by Step Tutorial with Examples
FULL Database Backup is used to back up the whole database in SQL Server. A database full backup will include parts of transaction log so that if the need arises a database can be recovered completely by restoring full...
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 BULK-LOGGED Recovery Model Step by Step Tutorial with Examples
When a database is configured to use a BULK-LOGGED Recovery Model then SQL Server will log minimal amount of information for operations such as SELECT INTO, BULK INSERT, BCP, CREATE INDEX, ALTER INDEX, and REBUILD INDEX...
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...
Different SQL Server Recovery Models Step by Step Tutorial with Examples
Recovery Models in SQL Server are basically designed to control the transaction log maintenance and to help you recover your data from a disaster. Based on the choice of Recovery Model, SQL Server decides which data it...
SQL Server Database Backup Tutorial with Examples
Introduction It is very critical for any organization to protect its data within the database. Hence it is must for an organization to perform database backups at regular intervals. In this tutorial, you will learn...
How to Start SQL Server in Single User Mode?
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 such as...
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...
Download SQL Server 2016 Developer Edition for Free
SQL Server 2016 Download Developer Edition for Free Microsoft announced the release of the Release to Manufacturing (RTM) version of SQL Server 2016 on June 1, 2016. The good news is that you can download SQL Server...
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...
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...
Convert Seconds to Minutes, Hours and Days in SQL Server
As a developer there are times when yo need to convert seconds to minutes, hours and days. The TSQL script mentioned in this article can be used to easily Convert Seconds to Minutes, Hours and Days. Learn How to FORMAT...
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...
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...
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...