Showing posts with label exe. Show all posts
Showing posts with label exe. Show all posts

Friday, March 23, 2012

Job runs for a long time in SQL Server Agent 2005

I have an exe in C# in .Net 1.1. This accesses an Oracle database and an SQL Server 2000 database. It is scheduled in SQL Server Agent. It runs for normally 30 seconds and stops

Recently we migrated the database to SQL Server 2005. We created this job manually in SQL Server Agent. Even after running for 3 minutes it never stops (abnormal)

However this exe runs normally in the Windows 2003 scheduler and the command prompt.

Am stumped for an answer.

Any help

Thanks and regards

jarathna

Do have relevant oracle client drivers installed on this SQL 2005 instance?

Ibelieve this is something related to the Operating system related process, if this is scheduled via SQLagent job then ensure SQLserver serivces do have relevant privileges on that C# & Oracle based components share.

Wednesday, March 21, 2012

job keep running if fail

Dear All

In SQL Server 2000, I schedule a job to run a exe. I expect the return of this result show the success or fail. However, I find the job keep running if fail. Actually, I want to see the failed status in enterprise manager.


Could you give me some suggestions how to return a fail from VB6 program to SQL Server? Maybe give me other directions to solve the problem? Thanks a lot.


More Information
I run the exe by double click. if it fail, it return a prompt message box.

Alex

This is a SSIS not DTS or VB6 forum, so you may get better responses on a more appropriate forum or newsgroup-

http://www.devx.com/vb2themax/Tip/18288

|||

Reading again is see you mention a message box. This will cause the scheduled job to just hang. You should never throw message boxes or any other form of UI when running unattended. I think there may have been an option suppress errors in message boxes, somewhere in project properties, but it has been a long time since I used VB6. Try the newsgroup, or just searching Google Groups.

sql

Job issue

Dear all,
I want to define a job which might be able to launch a .BAT where its
location is my local workstation. Is it possible? That .BAT call a .EXE and
we wish to keep out of our production server. That job will be scheduled fro
m
the server...
Thanks a lot,There are a couple of things to consider here. If you create the job on your
sql server, and have the first step be an OS Command (CmdExec) with a value
like
\\yourworkstation\c$\yourbatch.bat
-although the file resides on the machine yourworkstation, the program is
actually executed from the server (and since the exe that the bat file calls
won't be on the server, it will fail)
-if the sql server is running under the local system account, you won't be
able to connect over the network to your workstation anyway.
If you needed the program to physically reside and execute from your
workstation, you're best bet would be to create a scheduled task on your
workstation, and call the command from the sql server like
schtasks /run /tn YourTask /s yourworkstation
where YourTask is the name given to your task when you create it. If the sql
server is running under the local system account, you will need to specify a
user account that has local administrative priveledges on yourworkstation,
like so
schtasks /run /tn YourTask /s yourworkstation /u administrator /p password
The security implications here are that you have an administrator password
stored with the job on the sql server.
"Enric" wrote:

> Dear all,
> I want to define a job which might be able to launch a .BAT where its
> location is my local workstation. Is it possible? That .BAT call a .EXE an
d
> we wish to keep out of our production server. That job will be scheduled f
rom
> the server...
> Thanks a lot,

Monday, March 19, 2012

Job from Local DTS Package not running

Hi,

I created a DTS to run a VB.net exe from local packages dts.
If I execute the package, it would do what I want.
I scheduled it to be a job running every minute of every day to test out the schedule.

The job status only stays at "Excuting Job Step 1"...and this hangs there forever.

I've check my SQLServerAgent is started.

Some info:
my sqlserveragent service is run under a username specifically for SQLServer I call "SQLService".
I'm using SQL Server Developer Edition.

Anyone can explain why this is happenning? I'm running into dead alleys here.Why do you want to do that using SQL . Can It not be done through Windows task Scheduler ?|||Cause it needs to be refresh almost a few minutes...or hour..depending..

Windows Task shceduler...I'm using w2k...only details the time of the day, and repeats only on "daily" basis.

So...anything I should check?|||Try going to the advanced schedule properties in windows task scheduler ... you can schedule for every hour nad minute|||Thanks, I can see the detail settings from my home pc...(XP)...
Will try that once I'm at work.

Well...if it works...anything goes...but for knowledge sake, what could have possibly cause the job to just hang? Any ideas?|||I dont think you can call an external exe from a job or xp_cmdshell ... havent found out a way to do so yet.

Monday, March 12, 2012

Job Failing if shceduled from DTS

Hi,
I have an .exe executed from DTS and it is running successfully but when I
schedule a job for the DTS it fails."Detail Records: Error: -214722033
0
(80040496); Provider Error: 0 (0) Error string: CreateProcessTask
'DTSTask_DTSCreateProcessTask_1': Process returned code -532459699, which
does not match the specified Succ... Process Exit Code 1. The step failed.
"
Can anyone please help me?
Thanks.
Riz"Riz" <Riz@.discussions.microsoft.com> wrote in message
news:8032F201-CA6F-42C7-97B4-38F99003331E@.microsoft.com...
> Hi,
> I have an .exe executed from DTS and it is running successfully but when I
> schedule a job for the DTS it fails."Detail Records:
Error: -2147220330
> (80040496); Provider Error: 0 (0) Error string: CreateProcessTask
> 'DTSTask_DTSCreateProcessTask_1': Process returned code -532459699, which
> does not match the specified Succ... Process Exit Code 1. The step
failed."
When you run the job it is running under your permissions, when the SQL
Agent runs a scheduled job it runs under the Agent's permissions.
Most likely the agent does not have access to a resource such as the Network
or a particular share. Or, you need to use the full path in the DTS.
Try the Following:
1. Check in Services to see what account the SQL Server Agent is logging in
as.
If it is logging in to local machine it does not have access to any network
resources.
2. Make sure the executable, including any necessary data files, is
available to the SQL Server Agent account.
3. Use UNC Paths (\\CompName\ShareName\) to avoid drive mapping issues.
Good Luck,
Jim

Wednesday, March 7, 2012

Job Exe calling MAPI object, fails

Hi!
I have got a VB.NET exe which is using MAPI object to read the emails.
Now, the exe works excellent if I execute it independently. However, my
requirement is, I have to call this exe through SQL Jobs (SQL Agent). Now,
when I do that way, the MAPI logon fails, everytime.
It is giving me this error:
[Collaboration Data Objects - [MAPI_E_LOGON_FAILED(80040111)]]
Please help!
Regards,
Sachin VaishnavThe SQL agent will use a MAPI profile associated with the SQL Agent service
login, not the currently logged-in console user. Log in to the console
using the SQL Agent service account and create the correct MAPI profile.
Geoff N. Hiten
Senior Database Administrator
Microsoft SQL Server MVP
"Sachin Vaishnav" <SachinVaishnav@.discussions.microsoft.com> wrote in
message news:01864869-CAC2-45C9-A88A-6E8102BF1F70@.microsoft.com...
> Hi!
> I have got a VB.NET exe which is using MAPI object to read the emails.
> Now, the exe works excellent if I execute it independently. However, my
> requirement is, I have to call this exe through SQL Jobs (SQL Agent). Now,
> when I do that way, the MAPI logon fails, everytime.
> It is giving me this error:
> [Collaboration Data Objects - [MAPI_E_LOGON_FAILED(80040111)]]
> Please help!
> Regards,
> Sachin Vaishnav

Job Exe calling MAPI object, fails

Hi!
I have got a VB.NET exe which is using MAPI object to read the emails.
Now, the exe works excellent if I execute it independently. However, my
requirement is, I have to call this exe through SQL Jobs (SQL Agent). Now,
when I do that way, the MAPI logon fails, everytime.
It is giving me this error:
[Collaboration Data Objects - [MAPI_E_LOGON_FAILED(80040111)]]
Please help!
Regards,
Sachin VaishnavThe SQL agent will use a MAPI profile associated with the SQL Agent service
login, not the currently logged-in console user. Log in to the console
using the SQL Agent service account and create the correct MAPI profile.
--
Geoff N. Hiten
Senior Database Administrator
Microsoft SQL Server MVP
"Sachin Vaishnav" <SachinVaishnav@.discussions.microsoft.com> wrote in
message news:01864869-CAC2-45C9-A88A-6E8102BF1F70@.microsoft.com...
> Hi!
> I have got a VB.NET exe which is using MAPI object to read the emails.
> Now, the exe works excellent if I execute it independently. However, my
> requirement is, I have to call this exe through SQL Jobs (SQL Agent). Now,
> when I do that way, the MAPI logon fails, everytime.
> It is giving me this error:
> [Collaboration Data Objects - [MAPI_E_LOGON_FAILED(80040111)]]
> Please help!
> Regards,
> Sachin Vaishnav

Job Exe calling MAPI object, fails

Hi!
I have got a VB.NET exe which is using MAPI object to read the emails.
Now, the exe works excellent if I execute it independently. However, my
requirement is, I have to call this exe through SQL Jobs (SQL Agent). Now,
when I do that way, the MAPI logon fails, everytime.
It is giving me this error:
[Collaboration Data Objects - [MAPI_E_LOGON_FAILED(80040111)]]
Please help!
Regards,
Sachin Vaishnav
The SQL agent will use a MAPI profile associated with the SQL Agent service
login, not the currently logged-in console user. Log in to the console
using the SQL Agent service account and create the correct MAPI profile.
Geoff N. Hiten
Senior Database Administrator
Microsoft SQL Server MVP
"Sachin Vaishnav" <SachinVaishnav@.discussions.microsoft.com> wrote in
message news:01864869-CAC2-45C9-A88A-6E8102BF1F70@.microsoft.com...
> Hi!
> I have got a VB.NET exe which is using MAPI object to read the emails.
> Now, the exe works excellent if I execute it independently. However, my
> requirement is, I have to call this exe through SQL Jobs (SQL Agent). Now,
> when I do that way, the MAPI logon fails, everytime.
> It is giving me this error:
> [Collaboration Data Objects - [MAPI_E_LOGON_FAILED(80040111)]]
> Please help!
> Regards,
> Sachin Vaishnav