How to Execute an Operating System Command From Within SQL
Server ?

Answer Posted / sanjeev kumar

If your server is not configured for "xp_cmdshell" command
then at first you need to reconfigure for that. To
reconfigure, execute the following:-

sp_CONFIGURE 'xp_cmdshell', 1
GO
RECONFIGURE
GO

Then execute the following:-

EXEC master.dbo.xp_cmdshell 'Dir c:\'


Regards
Sanjeev kumar
Contact If your problem are still not solved.
thanks
skdeveloper0@gmail.com

Is This Answer Correct ?    4 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Are resultset updatable?

522


How to round a numeric value to a specific precision?

569


Define indexes?

601


how to use DTS package in 2000,2005,2008 in sql server

1451


please differentiate between delete and truncate?

556






What are the different types of sql server replication? : sql server replication

622


How can you find out how many rows returned in a cursor?

547


What is dbcc? Give few examples.

570


How to Insert multiple rows with a single insert statement?

543


What is the command to change the recovery model?

565


What are commonly used mssql functions in php?

556


What are data regions?

90


What do you understand by sql server agent?

527


Explain an automatic checkpoint

559


How should i optimize the time for execution of stored procedure having single input and many output from the different tables?

1465