Sessions: 195 The postings on this site are my own and do not represent my Employer's positions, advice or strategies.

LifeAsBob

  Thursday, March 28, 2024
Wider View Login

Cluster
DOS
IBM - AS400
MOM
Performance Counters
Service Broker
SQL Server
     Temporary Database
     Views
     Backup
     SQL Mail
     DTS - Data Transformation Services
     Memory
     Security
     Excel
     Jobs SQL Agent
     MSDE
     Install
     DBCC
     User Management
     System Databases
     BCV
     Deadlocks
     Temp Tables
     Find the physical se...
     Enable xp_cmdshell
     Intermittent Connect...
     Connection String Pr...
     Login Error ( State)...
     Turn Default Tracing...
     Re-index fails when ...
     SMO AND DMO
     Tracing of Errors
     Extra carriage Retur...
     Query to find Object...
     Named Instance Port ...
     Adding Domain Login ...
     Rename Logical File ...
     Error 3624 Delete st...
     SQL DMO Error 21776
     NetworkConnections
     SQL Server Service m...
     Trace Flags for Dead...
     Change Server Name
     Alternate to Count(*...
Windows OS




Will be added as a sub-category of, SQL Server
Enable xp_cmdshell
First we should configure the advance options, before configuring  for xp_cmdshell.

-- To allow advanced options to be changed. 

EXEC sp_configure 'show advanced options', 1 
GO 

-- To update the currently configured value for advanced options. 

RECONFIGURE 
GO 

SELECT * FROM SYS.CONFIGURATIONS WHERE Name = 'show advanced options'

Disabling xp_cmdshell

EXEC sp_configure 'xp_cmdshell', 0
GO
RECONFIGURE
GO

-- Check the Disabled record.
SELECT * FROM SYS.CONFIGURATIONS WHERE Name = 'xp_cmdshell'

Enabling xp_cmdshell

EXEC sp_configure 'xp_cmdshell', 1
GO
RECONFIGURE
GO

-- Check the Enabled record.
SELECT * FROM SYS.CONFIGURATIONS WHERE Name = 'xp_cmdshell'