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 find the date and time of last updated table?
What are the basic features of a trigger in ms sql server?
What is the difference between views and stored procedures? Can we have input parameters for views?
What are out-of-range errors with date and time literals?
What is multilevel indexing?
What is Fragmentation and Defragmentation? For 32GB Table,How can we do the fragmentation?
Can we create clustered index on composite key?
What is log in sql server?
How many clustered indexes can be created on a table? I create a separate index on each column of a table. what are the advantages and disadvantages of this approach?
What is the difference between primary key and unique constraints?
How to display n-1 columns from n number of columns, from a single table in MS SQL server 2005?
Explain about Views?
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)