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 |
Can you move the resources after pausing the node? : sql server database administration
What happens if you insert a duplicate key for the primary key column in ms sql server?
What is bulkcopy in sql?
What is stored in the mssqlsystemresource database? : sql server database administration
Explain sql delete command?
What is sqlservr.exe - process - sql server (sqlex?press)?
What is collation sensitivity?
What is the name of the system variable that returns the number of rows affected by a SQL statement?
What are the basic functions for master, msdb, model, tempdb databases?
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?
When would you prefer to have a minimum number of indexes?
Explain how many normalization forms?
Oracle (3259)
SQL Server (4518)
MS Access (429)
MySQL (1402)
Postgre (483)
Sybase (267)
DB Architecture (141)
DB Administration (291)
DB Development (113)
SQL PLSQL (3330)
MongoDB (502)
IBM Informix (50)
Neo4j (82)
InfluxDB (0)
Apache CouchDB (44)
Firebird (5)
Database Management (1411)
Databases AllOther (288)