Start job from portlet

Hi,
I try to start a job from a portlet with this the following code:
IPTObjectManager obm = ipSession.GetObjectManagers(PT_CLASSIDS.PT_JOB_ID); IPTJob job = (IPTJob)obm.Open(jobId,true); serverCtx = (IPTServerContext)job.GetInterfaces("IPTServerContext"); IPTSchedule sched = job.GetSchedule(); PTDateTime dt = new PTDateTime(new Date()); sched.SetStartTimestamp(dt); serverCtx.Store(); serverCtx.UnlockObject();
The jobId is correct (if I omit the UnlockObject call the right job is still locked) and I the code does not catch any exception. The report from PTSpy is ok (no error logged).
Can enyone help me?
My portal version si 5.0.1
Thanks

A little more information. We can start the job from a OS or database script, and have access to the OEM repository if needed.
Note: We are running Grid Control 10.2.0.3.
Thanks Again,
Gary

Similar Messages

  • Starting job from the point which it Canceled .

    Hi ,
    I have a program which updated/insert records to a massive tables.
    The program is running with fetch on 10K on each round.
    Is there any way to start the job/program on the same point which it been canceld/stop?
    so the program will not have to run the records that already been updated again.
    10x,
    gil.

    Other way is to check if i already updated the field.
    Then it will start with 10*.
    the select will look like this -
    select * from tabname  where
    field <> '10%'.
    The problem is that this field is not always a key filed and it will cause a long response times.
    What do you think about it ?
    Thanks.

  • Starting the datapump jobs from client side

    sir
    please make me understand
    datapump is server side utility means we can not invoke it from client. but in documents (oracle).
    they r talking that we can start the datapump job from client(Sqlplus) but the dmp files will be saved and the process will run on the server side
    so how can invoke the datapump from the client side (SQL Plus) ?

    user13014926 wrote:
    sir
    please make me understand
    datapump is server side utility means we can not invoke it from client.That's wrong to say and understand. The correct understanding should be that it's configured only for server side which means, that the folder where the dump files would be created would be available on a folder which must be there on the server side and over which, proper permissions must be available to you in the form of Directory object. There is no such thing that it can't be invoked sitting on the client side. It surely can but unlike the traditional export, there is no facility available anymore to give absolute file paths which would store the file on the local client machine.
    but in documents (oracle).
    they r talking that we can start the datapump job from client(Sqlplus) but the dmp files will be saved and the process will run on the server sideAll what they are saying is that since the datapump's API, DBMS_DATAPUMP , is completely exposed and is documented, it can be used by the client and as like any other package, either stored or created, can be invoked from the sqlplus session. The dump files location would indeed be on the server side only.
    so how can invoke the datapump from the client side (SQL Plus) ?As mentioned already by Srini, using the API .
    Aman....

  • Can not see running jobs from, package

    I have a problem with processing parallely runing jobs:
    I am creating another immediately runned jobs in a main job. Those two parallel jobs (2 loads from different databases) have to be finished before I run next operation (working out loaded data). Problem is that, after starting those 2 parallel jobs, I can not see them by select from ALL_SCHEDULER_RUNNING_JOBS that is executed immediately after I create those jobs in a package. If I take a look into ALL_SCHEDULER_RUNNING_JOBS from anonymous statement I can see all my running jobs. Let's sum it up:
    1/ Start of main job
    2/ Running 2 immediately created jobs (load data)
    3/ Checking in loop if jobs created in step 2 are still running
    3.1/ Jobs are running (ALL_SCHEDULER_RUNNING_JOBS check) - sleep for a
    while - It never happens - can't see any running jobs from select executed in
    package but can see them in
    anonymous statement
    3.2/ Jobs finished - start processing loaded data
    Can somebody help me with this task?
    Thanks alot!
    Jakub

    Hi,
    There is no reason a job should be visible from an anonymous block but not from inside a job. There are two things that may be happening here.
    - jobs scheduled to run immediately my not start running as soon as they are created/enabled, you may need to wait a bit before they start running (they will appear in all_scheduler_jobs immediately but maybe not all_scheduler_running_jobs immediately)
    - you may be running into privilege issues. Is the user that executes the anonymous block the same as the user that the job is running as (the job's schema) ? If not maybe the job user does not have privileges to see the job (you can grant alter on the job to the user to ensure this).
    Can you see the jobs in the all_scheduler_jobs view from within the job with status RUNNING ? If you can see jobs in all_scheduler_jobs as RUNNING but not in all_scheduler_running_jobs then this is a bug of some sort.
    Thanks,
    Ravi.

  • Starting CS4 from bat file

    I can successfully start Photoshop from a .bat file (.bat file has the line "START Photoshop") when I'm logged onto my Vista user account.  But when I switch to the guest account and the bat file continues to run in my normal user session, it is unable to launch Photoshop.  A Microsoft Windows error box reports: "Adobe Photoshop CS4 has stopped working".  I'm able to start Bridge or notepad with this method, that is, with the bat file running in my normal account while logged in to the guest account.  Seems you have to be logged on directly for PS to launch.  Any experience with this?

    On what operating system? windows xp professional
    What script ? Ms Dos script (.bat file)
    With what version of Oracle? Oracle 9i
    and why would you want to? Every month I need a job which when called will load a certain file from a predefined path to the target Oracle database using sql loader.
    I haave not worked with control files in the recent past and have a faded memory regarding this usage.
    All i remeber is calling sqlldr from cmd prompt specifying the ctl files and stuff......
    any other ideas are welcome..... thnkx!

  • How to Create Linux-Cron Job  from a Java Program

    Hello,
    Can anybody help me to CREATE/EDIT/DELETE Linux Cron job from Java Program. Its Very Urgent.Thanks in advance..
    from
    Chakri

    I decided this didn't sound too tough so I played around with it a little. Basically because I'd never tried executing external processes out of java before, so I wanted to see how it was done.
    Just change whatever you like in the jobs ArrayList and call writeJobs.
    If you call writeJobs without putting anything in the list first you'll wipe out all of your crontab entries.
    import java.lang.*;
    import java.io.*;
    import java.util.*;
    public class cron {
        ArrayList jobs;
        Runtime rt;
        cron() {
         rt = Runtime.getRuntime();
         jobs = new ArrayList();
        void readCron() {
         String[] list = { "crontab", "-l" };
         jobs = new ArrayList();
         try {
             // Stick a job into crontab
             Process child = rt.exec(list);
             BufferedReader cronout = new BufferedReader(new InputStreamReader(child.getInputStream()));
             String cronjob = cronout.readLine();
             while (cronjob != null) {
              jobs.add(cronjob);
              cronjob = cronout.readLine();
             child.waitFor();
         catch(IOException e) {
             System.err.println("IOException starting process!");
         catch(InterruptedException e) {
             System.err.println("Interrupted waiting for process!");
        void listJobs() {
         Iterator iter = jobs.iterator();
         while (iter.hasNext()) {
             System.out.println((String)iter.next());
        void writeJobs() {
         String[] edit = { "crontab"};
         try {
             // Stick a job into crontab
             Process child = rt.exec(edit);
             PrintWriter cronIn = new PrintWriter(child.getOutputStream());
             Iterator iter = jobs.iterator();
             while (iter.hasNext()) {
              cronIn.println((String)iter.next());
             cronIn.close();
             child.waitFor();
         catch(IOException e) {
             System.err.println("IOException starting process!");
         catch(InterruptedException e) {
             System.err.println("Interrupted waiting for process!");
        void doStuff() {
         readCron();
         listJobs();
         jobs.add("* * * * 4 cronjob");
         writeJobs();
         readCron();
         listJobs();
        public static void main(String[] args) {
         cron c = new cron();
         c.doStuff();
    }

  • Start Button from Control Center Manager OWB 10.2.0.3.33

    Hi Folks,
    the start Button from the Control Center Manager is grey and I cannot run drop, replace, etc. jobs. I've tried with the owb owner with the same result. The Service is running. I also restart the data base but again the same result. Any ideas...?
    Thanks
    Pavel

    Please forgive the simple first question:
    Have you deployed these objects yet?

  • Multidimensional array with start-job

    Hi! I'm trying to improve a script that will read in a CSV file to an array, divide it up to 4 chunks. So I will have 4 arrays and inside each array I have properties for computername, ip addresses and so forth. ($arrComputers[0][56].ComputerName)
    So what I want to do is:
    # Send 1 chunk array at a time to a Start-Job. 1 chunk consits of 100 computers.
    # Read each object,  $arrComputers[index][row].Status ,
    # If Status says "OK" don't continue to check, Else continue to fetch info and write back to
    $arrComputers[index][row].<property>
    So for I've only gotten to 
    $Script={
    Param($comp)
    <Do Check, Read and Write for each computer here>
    for($i=0;$i -lt 4;$i++)
    $compCollection[$i] | Start-Job -ScriptBlock $Script -ArgumentList ($compCollection[$i]
    I hope I have been clear what I'm trying to do. This is my first time trying it, so wouldn't surprise me if you guys got a better idea how to achieve what I want or what I've done wrong. I'm all ears and also to pointers to guides and such where I can read
    up more about advanced powershelling. 

    $computerlist | 
         ForEach-Object{
             Start-Job -Script $script
    -ArgumentList $_
    but
    $script={Param($computer)
    if($computer.Status -eq "OK"){
    #Do Nothing
    else
    #Do Something
    $computer.Status = #Assign new value
    #write back the same chunk it derived from.
    for($i=0;$i -lt 4;i++){
    $computerlist[$i] |
    ForEach-Object{
    Start-Job -Script $script -ArgumentList $_

  • R/3 jobs from BW

    Hi,
    Is there any way we can run a R/3 job from a BW process chain?
    We are working with IS/U and CRM as source systems for BW. Some of the data we need to load, has to be generated by a job in the source system. We have had some problems when the source system's job takes longer than spected. We would like to put this job calling as one step in the BW process chain, so the job can take all the time it needs, and the rest of the loading process will wait.
    is there any way we can do this?
    thank for the help.
    mauricio

    You can also trigger an event in R/3 from the Process Chain in BW.  The event can be set up as the start condition for your R/3 job.  However, as stated before, your ABAP request in your Process Chain will stay open (yellow) until it knows that the R/3 job has finished.  You need to create an ABAP program in R/3 that calls the RFC function module:
    CALL FUNCTION 'RSPC_ABAP_FINISH'
        DESTINATION p_rfc
         EXPORTING
           I_VARIANT              = p_var
         EXCEPTIONS
           ALREADY_FINISHED       = 1
           OTHERS                 = 2
    where p_rfc is the BW system name in R/3 and p_var is the name of the ABAP process in the Process Chain.  By calling this function module in R/3, it notifies the Process Chain in BW that the ABAP process in the Process Chain is complete!  So you can set up a job in R/3 that is triggered by the event, and the last step in the job is to call this function module.  Then control is passed back to the Process Chain in BW.
    BTW, you will get warnings on how to do this if you create an ABAP process in the Process Chain that executes a remote call.
    Hope this helps.

  • How to call Provisioning Job from On-Demand Job.

    Hi Experts,
    I need your help.
    I am using SAP IDM 7.2
    Please tell me how to call provisioning Job from ON-Demand Job.
    Regards,
    C Kumar

    As everyone else has already mentioned, the uProvision function is probably what you're looking for. It's well documented in the helpfile so I won't add the parameter description here. A provisioning task can only be run on a mskey/taskid combination so you need to provide both to start the task. That means that you should have a global or job constant pointing to the task, and a script or source select statement that looks up the mskey that you want to start.
    Simple example, using a To Generic pass to start the task "Dispatcher test #1.0.0" for 1000 entries whos names start with "USER.10K.TEEST"
    Source:
    To Generic pass destionation:
    TASKID could also be a global constant w. a task reference since tasknames have no uniqueness.
    Source SQL Statement:
    select top 1000 mcmskey mskey,(select taskid from MXP_Tasks where TaskName = 'Dispatcher test #1.0.0') as taskid
    from idmv_entry_simple where mcMskeyValue like 'USER.10KTEEST.%'
    Destionation script:
    // Main function: execT
    function execT(Par){
      mskey = Par.get("MSKEY");
      taskid = Par.get("TASKID");
      OutString = uProvision(mskey,taskid,0,0,"test dispatcer #1.0.0",0);
      // uInfo(mskey+":"+taskid+":"+OutString);
      return "";
    Br,
    Chris

  • Kicking off Background Job from Another SAP system

    Hi,
    Does anybody know how to kick off a background job from a separate SAP system?? 
    i.e I have a job on our CRM system that is dependant on a Job finishing from our ECC6 system first.
    Does anyone know how to do this?  I know I might be able to use events, is there anything else I should be making use of??
    Many Thanks

    Hi Daniel,
    Guess there is one more solution. In system A write a report (let us name it X) that would trigger a job in system B through an RFC call.
    Now in System A create a job with 2 steps. First step would be normal one, the second one for report X. Only when step 1 is over would step 2 start. So indirectly end of the existing Job A would trigger the required Job B.
    Regards.
    Ruchit.

  • Triggering Real time job from Batch jobs..

    Can we trigger real time jobs from the batch jobs. As soon as batch job completes we need to start real time job automatically. Is this possible with BODI XI?

    Greetings Post Originator,
    This post is older than 60 days and there are no entries in the past 30 days.  Based on the content discussed, it appears that you question has been answered. This message is being marked as answered and points are being assigned if available where possible. 
    Thank you for being an active participant in the SAP Forums,
    Rob Siegele
    Forum Moderator
    SAP Americas

  • How do I cancel a rman job from command line?

    Hello to all,
    I am having some problems with a rman job that is running via OEM-GC. I get an error message regading the SPFILE and control file being locked due to another job accessing it. I found this in the RMAN ref guide:
    To determine which job is holding the conflicting enqueue:
    1. After you see the first RMAN-08512: waiting for snapshot controlfile enqueue message, start a new SQL*Plus session on the target database:
    % sqlplus sys/sys_pwd@prod1
    2. Execute the following query to determine which job is causing the wait:
    SELECT s.sid, username AS "User", program, module, action, logon_time "Logon", l.*
    FROM v$session s, v$enqueue_lock l
    WHERE l.sid = s.sid and l.type = 'CF' AND l.id1 = 0 and l.id2 = 2;
    You should see output similar to the following (the output in this example has been truncated):
    SID User Program Module Action Logon
    9 SYS rman@h13 (TNS V1-V3) backup full datafile: c1 0000210 STARTED 21-JUN-99
    Solution
    After you have determined which job is creating the enqueue, you can do one of the following:
    * Wait until the job creating the enqueue completes
    * Cancel the current job and restart it once the job creating the enqueue completes
    * Cancel the job creating the enqueue
    So with this in mind; How do I cancel the job from RMAN command line!!!
    This is my output by the way:
    SID User PROGRAM MODULE ACTION Logon ADDR KADDR SID TY ID1 ID2 LMODE REQUEST CTIME BLOCK
    475 SYS [email protected] (TNS V1-V3) backup full datafile 0000018 STARTED16 23-APR-09 00000023EB8D488 000000023EB8D4A8
    475 CF 0 2 4 0 113123 0
    Any help will be gratefully received
    Thanks to all that reply

    I used the following to get the spid and killed the process on the OS.
    set linesize 120
    col sid for 999
    col username for a14 trunc
    col osuser for a18 trunc
    col spid for 99990
    col logon_time for a12
    col status for a9 trunc
    col machine for a26 trunc
    col running for a10 trunc
    select s.sid
    , s.username
    , s.osuser
    , s.machine
    , s.status
    , p.spid spid
    , to_char( logon_time, 'Mon dd@hh24:mi') logon_time
    , rtrim (s.module)||decode( nvl(length( rtrim(s.module)),0),0,'',' ')|| upper(s.program) running
    from v$session s
    , v$process p
    where ( p.addr = s.paddr ) and s.type!='BACKGROUND'
    and upper(s.program) not like '%CJQ0%' and s.program is not null and s.username is not null
    order by s.sid;

  • Can't start listener from OEM. It appears as Stopped although it is not.

    Hi,
    I can't make the EM show the listener as running, it always shows it as stopped. I checked it with lsnrctl and it is running, but in EM appears as stopped. I refreshed the screen and nothing; I tried to start it from the EM, and it displays a message like "The listener has been correctly started", but when I check the status in EM it is still stopped. And when I check the details, it shows an error "Access denied", NET_ADMIN_ERROR,REMOTE_OP_ERROR,No such file or directory. I think I have the right credentials (I'm in the administrators group, and I have log on as batch job)
    I would appreciate any help on this.
    Thanks a lot
    Ricardo

    Hi Nicolas- here's the SQLNet and listener file:
    -----------------LISTENER
    # listener.ora Network Configuration File: C:\oracle\product\10.1.0\Db_1\network\admin\listener.ora
    # Generated by Oracle configuration tools.
    LISTENER2 =
    (DESCRIPTION_LIST =
    (DESCRIPTION =
    (ADDRESS_LIST =
    (ADDRESS = (PROTOCOL = TCP)(HOST = localhost)(PORT = 1521))
    jon =
    (DESCRIPTION_LIST =
    (DESCRIPTION =
    (ADDRESS_LIST =
    (ADDRESS = (PROTOCOL = TCP)(HOST = localhost)(PORT = 1521))
    -----------------SQLNET
    # sqlnet.ora Network Configuration File: C:\oracle\product\10.1.0\Db_1\network\admin\sqlnet.ora
    # Generated by Oracle configuration tools.
    #SQLNET.AUTHENTICATION_SERVICES= (NTS)
    #NAMES.DIRECTORY_PATH= (TNSNAMES, EZCONNECT)
    I can't see any excess protocols in the listener. As per some metalink entries - I've commented out the "SQLNET.AUTHENTICATION_SERVICES= (NTS)" line from the SQLNet file.
    Still the same problem.
    To be honest - all replies to postings for this error have not worked. I've contacted some guys with the same problem - and their resolution was to completely reinstall XP and then Oracle again. Just removing and reinstall Oracle was insufficient. So - i guess i'm going to have to follow suit.
    Any last minute suggestions before this bit of drastic action?!

  • Dhcpcd start job fail

    I use arch after last update for packages when my system want boot I see error about dhcpcd and my lan card can not get IP from ADSL modem and I do not have internet and network
    When my system want boot I see this message :
    A start job is running for dhcpcd on enp0s1
    After this message I see error about dhcpcd and I see error line in red line

    karol wrote:Please remember to mark the thread as solved https://bbs.archlinux.org/viewtopic.php?id=130309
    I don't know that this is necessarily solved.  I think there is still an issue between the most recent dhcpcd and OpenWRT (and friends).  Switching to connman seems like a workaround.
    Edit: BTW, connman has its own dhcp client.
    Last edited by WonderWoofy (2014-03-13 03:53:39)

Maybe you are looking for