Tuesday, March 27, 2012
Executing exe delphi program with Agent
I'm trying to execute a program from de agent. The program executes(i can see it in the task manager), but it block in that step and still in the task manager.
I tried with the calc.exe command with de same result.
?only DOS commands can execute the agent or there is another way to make it work?
Thanks in advance
Lomu
Hi
If the program shows a GUI then you should not run it from a scheduled job.
If you make it a command line program that will run and exit correctly then
you may be ok. Depending on what you are wanting to do there could be other
alternatives, such as writing an extended stored procedure, making it a COM
object.
John
"Lomu" <Lomu@.discussions.microsoft.com> wrote in message
news:BCDDC329-81E3-457E-90E4-3C38A830AF92@.microsoft.com...
> Hi,
> I'm trying to execute a program from de agent. The program executes(i can
see it in the task manager), but it block in that step and still in the task
manager.
> I tried with the calc.exe command with de same result.
> only DOS commands can execute the agent or there is another way to make
it work?
> Thanks in advance
> Lomu
Executing exe delphi program with Agent
I'm trying to execute a program from de agent. The program executes(i can see it in the task manager), but it block in that step and still in the task manager.
I tried with the calc.exe command with de same result.
¿only DOS commands can execute the agent or there is another way to make it work?
Thanks in advance
LomuHi
If the program shows a GUI then you should not run it from a scheduled job.
If you make it a command line program that will run and exit correctly then
you may be ok. Depending on what you are wanting to do there could be other
alternatives, such as writing an extended stored procedure, making it a COM
object.
John
"Lomu" <Lomu@.discussions.microsoft.com> wrote in message
news:BCDDC329-81E3-457E-90E4-3C38A830AF92@.microsoft.com...
> Hi,
> I'm trying to execute a program from de agent. The program executes(i can
see it in the task manager), but it block in that step and still in the task
manager.
> I tried with the calc.exe command with de same result.
> ¿only DOS commands can execute the agent or there is another way to make
it work?
> Thanks in advance
> Lomu
Executing exe delphi program with Agent
I'm trying to execute a program from de agent. The program executes(i can se
e it in the task manager), but it block in that step and still in the task m
anager.
I tried with the calc.exe command with de same result.
?only DOS commands can execute the agent or there is another way to make it
work?
Thanks in advance
LomuHi
If the program shows a GUI then you should not run it from a scheduled job.
If you make it a command line program that will run and exit correctly then
you may be ok. Depending on what you are wanting to do there could be other
alternatives, such as writing an extended stored procedure, making it a COM
object.
John
"Lomu" <Lomu@.discussions.microsoft.com> wrote in message
news:BCDDC329-81E3-457E-90E4-3C38A830AF92@.microsoft.com...
> Hi,
> I'm trying to execute a program from de agent. The program executes(i can
see it in the task manager), but it block in that step and still in the task
manager.
> I tried with the calc.exe command with de same result.
> only DOS commands can execute the agent or there is another way to make
it work?
> Thanks in advance
> Lomu
Monday, March 12, 2012
Execute SSIS Package using SQl Server Agent
Hi
I hv created a new Job for my SSIS Package... but when i start the job manually it gives me this error below:
"Executed as User:localhost/SYSTEM. THe package could not be loaded.the Step Failed".
i have my package deployed in Storage Packages[MSDB]...
Could you help me on this....
THanks!
Karthik
it's all to do with security:
Your localhost/SYSTEM account probably has no access to the SISS storage [MSDB].
Either you have modify the sql agent job to run as a user with sufficient rights on the SISS store or you grant this account access.
Then there is also the possibility that this user account has not access to the databases that are opened by the package.
Execute SSIS Package Job fails
Hey Folks,
I've got here a strange Problem. If I try to execute the SQL Server Agent Job, that executes my SSIS Package, it fails. The job succeedes when I run the Job as the Proxy, that maps on the User, that has deployed the Package, or when I run the Job under an System Administrator Proxy. Now my Question - how must I set up an Service-Account, which is no Admin and not has deployed the Package?
I already know, that the User has to be in the sysadmin role, and in all msdb SQLAgent*
Thanks and greez
Karsten
I assume the service account is suitable for running SQL Agent. To be sure you may want to review this rather long BOL topic "Setting Up Windows Service Accounts" (ms-help://MS.SQLCC.v9/MS.SQLSVR.v9.en/instsql9/html/309b9dac-0b3a-4617-85ef-c4519ce9d014.htm), but plenty of good info buried in there.
So if the job fails when using the base service account rather than a higher privileged proxy it says to me that the service account does not have correct permissions. If it errors, then you need to find out why. Here are some tips on doing just that, in particular look at using a CmdExec step, and the Package Store File Permissions section.
Scheduled Packages
(http://wiki.sqlis.com/default.aspx/SQLISWiki/ScheduledPackages.html)
Wednesday, March 7, 2012
execute sql server agent job task - Job immediately returns success... However agent job is
when I run a package from a command window using dtexec, the job immediately says success.
DTExec: The package execution returned DTSER_SUCCESS (0).
Started:3:37:41 PM
Finished: 3:37:43 PM
Elapsed:2.719 seconds
However the Job is still in th agent and the status is executing. The implications of this are not good. Is this how the sql server agent job task is supposed to work by design.
Thanks,
Larry
Just to get this right. Your SSIS package starts a SQL Agent job. You are executing the package and it completes immediately. This is by design. There is no synchronous hook into the SQL Agent Job Scheduling, you can implement a waiting loop to check the job has completed but that is quite messy.Execute sp_start_job from stored procedure
I need to disable and move orphaned computer objects in my Active Directory. The SQL Agent has permission to do this. I have created a stored procedure for the task with intentions of executing it with sp_start_job. However, I cannot execute it in SQL 2005. How can I grant permission to this (login) to execute sp_start_job? This is all run from a web page and NOT the Query Window.
The Agent is just a robot itmusthave correct permissions to run Jobs and other things replication included. So you clone admin level permissions to run it. Try the link below for SQL Server proxy account. Hope this helps.
http://msdn2.microsoft.com/en-us/library/ms190698.aspx
Wednesday, February 15, 2012
execute batch file as sql job
When I try to run the job it fails with an "Access is denied" error on both the source and destination directories (as read from job history).
Any ideas?I'd try to log into the server under the sql service acct and try to execute the batch file directly that way. It may give you some more clues.
Beyond that, maybe place some output in the SP to verify the user it is running under when executed from the job.
SELECT SYSTEM_USER|||I can log in and run the job under the service account. I imagine there must be some kind of proxy account or something that it's run under. Like aspuser in .net.|||Create a simple table with a varchar column in it. From the stored procedure, insert SYSTEM_USER into the table. After the job executes, check the table and see what the user name was.
Something like:
CREATE tmpTable (c1 varchar(30) )
INSERT INTO tmpTable SELECT SYSTEM_USER|||maske sure the sql service is running under a domain account and that account has permissions over both directories.