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

Hello,
I created Application test.exe using C# (VS2005).
How can I run this exe file from SQL Server 2005 every night?
Thanks.
ErikminasAsked:
Who is Participating?
 
dbbishopConnect With a Mentor Commented:
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
 
Aneesh RetnakaranDatabase AdministratorCommented:
use windows  "Scheduled tasks" which will do the same
0
 
SQL_SERVER_DBACommented:
You could also execute as a job
0
Free Tool: IP Lookup

Get more info about an IP address or domain name, such as organization, abuse contacts and geolocation.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

 
Racim BOUDJAKDJIDatabase Architect - Dba - Data ScientistCommented:
Program the agent to run it as a command line job step...
0
 
ErikminasAuthor Commented:
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
 
Racim BOUDJAKDJIDatabase Architect - Dba - Data ScientistCommented:
You need to enable xp_cmdshell in the Surface Area Manager..By default it's not enabled...
0
 
ErikminasAuthor Commented:
Thanks.
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.