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

What is ssl in sql server?

776


You schedule a job to run every minute what will happen if the first job runs more than 1 min? Will the second instance of the job start?

821


What is the order in which the sql query is executed?

727


What is an entity-relationship diagram (erd)?

852


Define tempdb database?

778


How to assign new column names in a view?

700


What are the joins in sql server? : sql server database administration

764


What is stretch database in sql server?

809


How do you rebuild an identity column?

748


what do you understand by change data capture?

780


whats the maximum size of view state??

1926


What are triggers in ms sql server?

841


How to get all stored procedures in sql server?

716


What is the process of normalising?

782


How can change procedure in sql server?

746