Skip to content
Wednesday, October 1, 2025

Ramblings of a Crafty DBA

  • Home
  • About John

Tag: sp_xp_cmdshell_proxy_account

Server Settings – Part 2

January 10, 2012October 12, 2017 admin

Some of the settings that are listed in Server Properties dialog box in SQL Server Management Studio (SSMS) are stored in the local registry. These registry settings can be read from and written to by TSQL code. Thus, scripts can be created to standardize settings for all servers that you manage. The purpose of today’s talk is talk about security page of the Server Properties dialog box and how a DBA can change the settings. All of the settings can be changed by selecting the correct radial button, check box…

Database AdminAuditLevel, C2 audit tracing, Common Criteria compliance, CREATE CREDENTIAL, Cross database ownership chaining, database admin, DROP CREDENTIAL, free code, John F. Miner III, Login Auditing, LoginMode, RECONFIGURE, Security Page, Server Authentication, Server proxy account, sp_configure, sp_xp_cmdshell_proxy_account, SQL Server, xp_regread, xp_regwrite2 Comments

Command Shell

January 5, 2012January 5, 2012 admin

It is sometimes necessary to execute external commands in windows command shell from TSQL. The xp_cmdshell extended stored procedure allows you to do just that. Because this command shell can be a potential target for hackers, it is turned off by default. Today, I am going to use this command to solve a real world ETL problem. The following SQL snippet uses the sp_configure command to enable this option.

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
<span style="color: #008000;">-- 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
 
-- To enable the feature.
EXEC sp_configure 'xp_cmdshell', 1
GO
 
-- To update the currently configured value for this feature.
RECONFIGURE
GO
</span>

The xp_cmdshell command takes a valid DOS string as input and executes asynchronously in a windows command shell until the…

Database Developerdatabase developer, free code, John F. Miner III, sp_xp_cmdshell_proxy_account, SQL Server, TSQL, xp_cmdshell2 Comments

Search Site

Categories

  • Database Admin (43)
  • Database Developer (81)
  • Fabric (6)
  • Other (39)
  • Power Query (4)
  • Presentations (66)
  • SQL Tidbits (101)

Archives

Meta

  • Log in
  • Entries feed
  • Comments feed
  • WordPress.org

Crafty Dba © 2024

Proudly powered by WordPress | Theme: AcmeBlog by Acme Themes