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

Answers were Sorted based on User's Feedback



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

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

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

Answer / guest

The xp_cmdshell extended store procedure makes it possible
to execute operating system commands from within SQL
Server.
Example:

EXEC Master..xp_cmdshell 'Dir c:\'

Is This Answer Correct ?    3 Yes 0 No

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

Answer / thatiparthi brahma reddy

EXEC Master.dbo.xp_cmdshell 'Dir d:\'

Is This Answer Correct ?    3 Yes 0 No

Post New Answer

More SQL Server Interview Questions

What is a non equi join?

0 Answers  


What purpose does the model database server?

0 Answers  


What are various limitations of the views?

0 Answers  


What is Covering Indexes? Plz explain with example

3 Answers  


How do I get to sql server configuration manager?

0 Answers  






How to query multiple tables jointly?

0 Answers  


What are Magic Table?

34 Answers   3i Infotech, Digiweb, Evalueserve, NIIT, PL,


How to Run a Query on a Remote SQL Server?

2 Answers  


Tell me what is normalization? Explain different forms of normalization?

0 Answers  


How many files can a database contain in sql server?how many types of data files exists in sql server? How many of those files can exist for a single database?

0 Answers  


How to perform key word search in tables?

0 Answers  


what is the difference between table and view

1 Answers  


Categories