Sometimes we need SQL Server to run commands that require it to interact directly with the server's OS.
Creating backups of our databases and log files is just one of the things that require this type of interaction.
The following command enables SQL Server to interact with the OS so we can run the Database and Log file backups.

Perform the following actions to set xp cmdshell as enabled.
  1. Right-click on your Server-Name, choose New Query
  2. Copy and paste the script
  3. Click Execute.
[SQL Script - xp cmdshell]
CFFCS | CarrzSynEdit: | SQL Script
EXEC sp configure 'show advanced options', '1'

RECONFIGURE
-- this enables xp cmdshell

EXEC sp configure 'xp cmdshell', '1' 

RECONFIGURE