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 is the difference between count () and rowcount ()?
I have a table Events Events containing cardno,time,id,name- -each id has a cardno my requirement is every day each employee swipe the card several times i want to calculate first and last time of each card the output should be name 1 2 6 7 in out in out holiday holiday xxx 09:30 06:30 09:40 06:45 where 1,2...... are dates for example january 1,2, etc. 6 and 7 are saturday and sunday how it is posssible
What is a with(nolock)?
Explain stored procedure?
How and why use sql server?
Does any body please help me what question's have asked for SSRS in the interview?
what is IDE,DMV in sql server?
How to write a query with a full outer join in ms sql server?
What are triggers? How do you invoke a trigger on demand?
You have a table ‘test’ which is a copy of northwind employee table you have written a trigger to update the field ‘hiredate’ with the current date
What is the difference between UNION and UNIONALL?
5 Answers CarrizalSoft Technologies, CTS,
you notice that the transaction log on one of your databases is over 4gb the size of the data file is 2mb what could cause this situation, and how can you fix it? : Sql server administration
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)