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 |
What command is used to create a database in the sql server and how?
Explain what is raid and what are different types of raid levels?
Why we should not use triggers?
What is the purpose of a table?
Give me a SQL Query to find out the second largest company?
What is row_number()?
Define synonym?
Which databases are part of SQL server default installation? Explain the usage of each?
What is Files and Filegroups in SQL Server & it's implementation.
What are the different types of backups that exist?
Which feature in sql server 2008 has surprised you? You can name just one. : sql server database administration
what stored procedure can you use to display the current processes? : Sql server administration