How to Execute an Operating System Command From Within SQL
Server ?
Answers were Sorted based on User's Feedback
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 |
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 |
Answer / thatiparthi brahma reddy
EXEC Master.dbo.xp_cmdshell 'Dir d:\'
Is This Answer Correct ? | 3 Yes | 0 No |
how to insert the values in 5 table at a time with triggers . if u have any solution then co-operate me ?
Well sometimes sp_reanmedb may not work you know because if some one is using the db it will not accept this command so what do you think you can do in such cases?
What is the difference between delete and truncate statements?
Why Do you want to work in this company?
What are the differences between sql server and mysql.
Tell me what are the advantages of using stored procedures?
What is the system function to get the current user's user id?
Explian different types of BACKUPs avaialabe in SQL Server? Given a particular scenario, how would you go about choosing a backup plan?
What is lock escalation and what is its purpose?
What do you understand by the denormalisation?
How to get number of days in a given year?
What is the syntax to execute the sys.dm_db_missing_index_details?