[Okta Webinar] Learn how to a build a cloud-first strategyRegister Now

x
?
Solved

How can I run this exe file from SQL Server 2005 every night?

Posted on 2007-09-28
7
Medium Priority
?
963 Views
Last Modified: 2008-01-09
Hello,
I created Application test.exe using C# (VS2005).
How can I run this exe file from SQL Server 2005 every night?
Thanks.
0
Comment
Question by:Erikminas
7 Comments
 
LVL 75

Expert Comment

by:Aneesh Retnakaran
ID: 19979404
use windows  "Scheduled tasks" which will do the same
0
 
LVL 16

Expert Comment

by:SQL_SERVER_DBA
ID: 19979433
You could also execute as a job
0
 
LVL 23

Expert Comment

by:Racim BOUDJAKDJI
ID: 19979916
Program the agent to run it as a command line job step...
0
VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

 
LVL 15

Accepted Solution

by:
dbbishop earned 500 total points
ID: 19979944
to schedule it as a job in SQL Server, create the job, add a step, for command enter
EXEC master..xp_cmdshell '\path to program\test.exe'
and add a schedule to run nightly.
0
 

Author Comment

by:Erikminas
ID: 19980047
Message
Executed as user: "UserName". SQL Server blocked access to procedure 'sys.xp_cmdshell' of component 'xp_cmdshell' because this component is turned off as part of the security configuration for this server. A system administrator can enable the use of 'xp_cmdshell' by using sp_configure. For more information about enabling 'xp_cmdshell', see "Surface Area Configuration" in SQL Server Books Online. [SQLSTATE 42000] (Error 15281).  The step failed.

Thanks.
0
 
LVL 23

Expert Comment

by:Racim BOUDJAKDJI
ID: 19980107
You need to enable xp_cmdshell in the Surface Area Manager..By default it's not enabled...
0
 

Author Comment

by:Erikminas
ID: 19980213
Thanks.
0

Featured Post

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This article shows gives you an overview on SQL Server 2016 row level security. You will also get to know the usages of row-level-security and how it works
MSSQL DB-maintenance also needs implementation of multiple activities. However, unprecedented errors can hamper the database management. In that case, deploying Stellar SQL Database Toolkit ensures fast and accurate database and backup repair as wel…
Viewers will learn how to use the SELECT statement in SQL to return specific rows and columns, with various degrees of sorting and limits in place.
Viewers will learn how to use the UPDATE and DELETE statements to change or remove existing data from their tables. Make a table: Update a specific column given a specific row using the UPDATE statement: Remove a set of values using the DELETE s…
Suggested Courses

872 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question