Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2000 Forums
 Transact-SQL (2000)
 how to place exe file in sql server?

Author  Topic 

chidambaram
Starting Member

6 Posts

Posted - 2008-07-23 : 05:44:58
hi all,

I am working in VB.NET 2003 and SQL Server 2000 version.

I want to run my program in scheduled manner. It have to run once in a day by 5 AM.

I finished my program and created exe file.

how can i schedule this exe file in SQL server?

Thanks in advance..

visakh16
Very Important crosS Applying yaK Herder

52326 Posts

Posted - 2008-07-23 : 06:16:29
just add a new job in sql agent and in job call xp_cmdshell to call this exe file.
Go to Top of Page

chidambaram
Starting Member

6 Posts

Posted - 2008-07-23 : 06:33:46
thanks for ur reply..

please give some detail about xp_cmdshell and sample for that
Go to Top of Page

spirit1
Cybernetic Yak Master

11752 Posts

Posted - 2008-07-23 : 06:46:21
how about you just look at the sample provided in books online = sql server help

_______________________________________________
Causing trouble since 1980
Blog: http://weblogs.sqlteam.com/mladenp
Speed up SSMS development: www.ssmstoolspack.com <- version 1.0 out!
Go to Top of Page

chidambaram
Starting Member

6 Posts

Posted - 2008-07-23 : 08:15:01

i tried like this

exec hr..xp_cmdshell 'C:\watch\importswipe\SwipeImport\Release\Setup.Exe',no_output

but the job is failed.
Go to Top of Page

visakh16
Very Important crosS Applying yaK Herder

52326 Posts

Posted - 2008-07-23 : 11:02:59
quote:
Originally posted by chidambaram


i tried like this

exec hr..xp_cmdshell 'C:\watch\importswipe\SwipeImport\Release\Setup.Exe',no_output

but the job is failed.


refer link below

http://www.databasejournal.com/features/mssql/article.php/3372131
Go to Top of Page

rmiao
Master Smack Fu Yak Hacker

7266 Posts

Posted - 2008-07-23 : 23:00:27
And xp_cmdshell is in master db.
Go to Top of Page

madhivanan
Premature Yak Congratulator

22864 Posts

Posted - 2008-07-24 : 03:17:58
quote:
Originally posted by chidambaram

hi all,

I am working in VB.NET 2003 and SQL Server 2000 version.

I want to run my program in scheduled manner. It have to run once in a day by 5 AM.

I finished my program and created exe file.

how can i schedule this exe file in SQL server?

Thanks in advance..


Cant you make use of Windows scheduler?

Madhivanan

Failing to plan is Planning to fail
Go to Top of Page

chidambaram
Starting Member

6 Posts

Posted - 2008-07-24 : 09:03:53
I tried the Windows Scheduler sir

I got the error as

An error has occured while attempting to set task account information
The specific error is
0*80041310: Unable to establish existence of the account specified
Ensure the account name specified is valid

I used my user account which i was currently logged in.


Go to Top of Page

chidambaram
Starting Member

6 Posts

Posted - 2008-07-25 : 06:16:04
I changed the account name.

Thank you sir. Its working fine.
Go to Top of Page
   

- Advertisement -