Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...


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

Why Do you want to work in this company?

4 Answers   HCL,


how to select a field with firstletter as capital and remaining are small letters

11 Answers  


What is replication and database mirroring?

0 Answers  


What are the different ways of moving data/databases between servers and databases in SQL Server?

3 Answers   HCL,


What the difference between UNION and UNIONALL?

0 Answers   HCL,


Give me a SQL Query to find out the second largest company?

0 Answers   Ernst Young,


Please illustrate physical database architecture? : SQL Server Architecture

0 Answers  


how many non clustered index in sql server 2008,2010,2012

2 Answers   Accenture,


Which data type can be used only on OUTPUT parameters of the stored proceduer?

2 Answers  


How do you delete duplicate records in sql server?

0 Answers  


What is primary key index?

0 Answers  


explain the storage models of olap? : Sql server database administration

0 Answers  


Categories