seeker
seeker

Reputation: 3333

Execute commands within tsql

How can I execute system command like dir other than xp_cmdshell?

Upvotes: 1

Views: 564

Answers (1)

Royi Namir
Royi Namir

Reputation: 148624

I dont see any problem , here is an example :

dstest is a remote server ...

enter image description here

edit

run this to activate :

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

Upvotes: 1

Related Questions