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

how many layers of tcp/ip protocol combined of? : Sql server database administration

775


Explain syntax for disabling triggers?

766


How many replicas are maintained for each SQL Azure database?

138


What are null values in ms sql server?

812


what are statistics, under what circumstances they go out of date, how do you update them? : Sql server database administration

756


How to write a query with a right outer join in ms sql server?

717


What is the default Port No on which SQL Server listens?

874


What is sql server english query?

801


What is recursion? Is it possible for a stored procedure to call itself or recursive stored procedure? How many levels of sp nesting are possible?

790


How to disconnect from a sql server using mssql_close()?

836


What is a result set object returned by odbc_exec()?

776


What are the properties of primary key?

758


What are the types of indexes?

820


What is indexed view?

803


How to convert numeric values to integers in ms sql server?

754