2012年6月6日

A note for sql: xp_cmdshell & sp_configure

-- 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

-- Execute file
EXEC master..xp_cmdshell 'C:\Users\Irene\Desktop\FromSQLExecute.exe -memberid 9527'

沒有留言: