473,701 Members | 2,389 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

How to execute a "batch file" using SQL Server 2005?

Hi all,

As the topic describes, I'd like to run a batch file using sql server.
How do i do it?

Thanks in advance

Dec 23 '05 #1
1 8410
One method is with a SQL Server agent CmdExec job step. Another is via
xp_cmdshell. If you choose to use xp_cmdshell, be sure you fully understand
the security implications and don't grant direct execute permissions on the

Happy Holidays

Dan Guzman
SQL Server MVP

"coosa" <co*****@gmail. com> wrote in message
news:11******** *************@o 13g2000cwo.goog legroups.com...
Hi all,

As the topic describes, I'd like to run a batch file using sql server.
How do i do it?

Thanks in advance

Dec 23 '05 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

by: carrot | last post by:
With .Net Studio, I have a solution includes some projects. I want to execute a batch file during build solution time. For example, 1'st project is builded. 2'nd project is builded. " a batch file is executed."! 3'rd project is builded.
by: den 2005 | last post by:
Hi Everybody, Is anybody knows how to Hide Execution of batch file at background? I mean without displaying the DOS Prompt window while batch file is being executed. I used code below to execute batch file. Is there other ways to do this? I need help. Thanks. Code: System.Diagnostics.Process.Start("batchfile1.bat");
by: Mr Gordonz | last post by:
Hi all, I want to put a button on a page, and when the user clicks it, the standard Windows "Open File" dialogue box opens, and the user can browse/select a file on their PC. Having selected a file, the user clicks Open, and I then want to capture the file path and name in a string variable. Finally, I want to upload the file to the server. BUT: I don't want to use an <input type="file"> control.
by: Z0gS | last post by:
I use the following code to run a batch file on the server side but it not working. The code is working fine on a c# window console program. Can anyone help me? Process myProcess = new Process() myProcess.StartInfo.FileName = "C:\\mapDrv.bat" myProcess.StartInfo.CreateNoWindow = true myProcess.Start();
by: Mark Rendle | last post by:
Hi I'm writing a page which outputs CSV data for download. It's all working fine, setting ContentType to "text/csv", except when the "Open/Save" dialog appears, the filename shown is "ExportRun.aspx". Is there any way I can change this to, e.g., "mydata.csv" without having to generate a temporary file on the server? Thanks Mark
by: rsine | last post by:
I need to execute a batch file (.bat) on a remote system. Can this be done? I have been trying to use the System.Diagnostics.Process.Start with no success. So, I am wondering if I am using the wrong class, not using it properly, or it simply is not possible. Any guidance would be appreciated. -Thanks
by: mcolson | last post by:
Is it possible to use sql to execute a batch file? I would like to execute the following "C:\BTW\bartend.exe /f=C:\BTW\Toolbox\Formats \carnum.btw /p", 6 Thanks, Matt
by: byjufromgamut | last post by:
I created a batch file, when executes gives a preview window(using swings & JFrame). I created another java fie in which used a Process object and Runtime.getRuntime().exec(path) , where path specifies the location of above batch file. when indepedantly executes i am able to execute the bath file through this second program. Now the problem is that i want to execute the batch file in my JSP where i have tried a lot to execute the batch file...
by: Ira Sinha | last post by:
I have created a batch file, which is using 7z command to encrypt and compress a file. The command in the batch file is 7za -TZIP a -p I am able to run the batch file successfully from the command prompt, however when I try to execute the same file from the SQL Server using the xp_CMDShell, it gives me the following errors: Can not open file Access is denied. I am logged into the sql server with a Windows account, which is a member of...
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.