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 types of local tables are there in sql server?

677


How do I open port 1433?

694


How to encrypt data between dialogs?

764


Define model database?

741


What is named calculation? : sql server analysis services, ssas

728






What is the difference between stored procedure and functions?

774


Explain primary key?

726


What is dml command?

713


How do you check sql server is up and running?

690


You have a table ‘test’ which is a copy of northwind employee table you have written a trigger to update the field ‘hiredate’ with the current date

816


Suggest a method of joining two tables.

809


How to list all dsn entries on your local machine using odbc_data_source()?

751


Explain in details security in SQL azure?

115


What is an inner join?

707


When you use @@error and try-catch?

758