Executing a job by another job using exec command

Hi All,
I have  a requirement as follows,I am triggerring the jobs from one parent job,where triggered jobs should run in  parallel.Below code waits for Job_Test_1 to complete and then triggers the Job_Test_2.But what I want is Job_Test_2 also should start when Job_Test_1 is running.How to achive this in SAP BODS.
[$G_JOB_NAME]=Job_Test_1;
print('The job is [$G_JOB_NAME] ');
exec('D:\Installation_folder\Data Services\log\[$G_JOB_NAME].bat','',1);
print('Failed job [$G_JOB_NAME] triggered');
[$G_JOB_NAME]=Job_Test_2;
print('Second job triggered ');
exec('D:\Installation_folder\Data Services\log\[$G_JOB_NAME].bat','',1);
print('The job second job triggered');
Thanks for your help in advance.
Indira

Hi Indra,
Request you to go through the below link in which anoop has beautifully explained the various ways to schedule the jobs.
http://scn.sap.com/docs/DOC-34648
In particular, I would request you to go through "Scheduling using  Web service" Part. In this part, Anoop has shown how to publish the jobs and in the subsequent steps showed us how to call the webservice in the Query transform.
In his example he took two query transforms to execute the job sequentially.
If you wann to execute the jobs parallel then just check by calling both the webservices in a single query transform.

Similar Messages

  • How to move folders from one server to another serve using unix command

    Hi All,
    How to move the folders from one server to another server using unix command.
    scp -r armops@sjarmprd01:/ARM/scripts [email protected]:/ARM/scripts/
    but it is giving an error like not a regular file .. what it means .. please let me know if any one knows about it
    Thanks
    Sreedhar

    not a regular file .. what it meansProbably you have some fifo (named pipe) files...
    Said that this has nothing to do with database (you should post on some nix forum, for example http://forums.oracle.com/forums/forum.jspa?forumID=135), you may try rsync* command (man rsync).

  • Trying to use grep from within java,using exec command!

    Hi all!
    I would like to run a grep function on some status file, and get a particular line from it, and then pipe this line to another file.
    Then perfom a grep on the new file to check how many of the lines above are present in that file, and then write this value to a new file.
    The final file with a numerical value in it, i will read from within java,as one reads normal files!
    I can run simple commands using exec, but am kinda stuck with regards to the above!
    Maybe i should just do all the above from a script file and then run the script file from exec. However, i dont want to do that, because it kinda makes the system dependent,..what if i move to a new machine, and forget to install the script, then my program wont work!
    Any advise?
    Thanks
    Regards

    With a little creativity, you can actually do all that from the command line with a single command. It'll look a little crazy, but it can be done.
    Whether the script exists on the local machine or not has zero to do with platform indpendence. You assumedly have to get the application onto the local machine, so including the script is not really an issue at all. However, you're talking about system independence, yet still wishing to run command line arguments? The two are mutually exclusive.

  • How do I highlight and copy material from one document to another by using keyboard commands? The tool bar is not appearing as it typically does.

    How do I copy material from one document to the next by using keyboard commands.  I am copying from Word into and external database and the external system seems to be covering my tool bar from which I would typically click editing shortcut commands.

    Highlight what you want to copy, then command - C. To paste, select where you want it to go, then command - V.

  • Executing a MS Assess Data base using exec() problem

    I am trying to run an access database from java. I would also like to pass it a command line argument. My code is as follows:
    Runtime rt = Runtime.getRuntime();
    String fileName = "c:\invoices\aspen\aspen.mdb " /cmd "100"
    Process ps = rt.exec(new String[] {"cmd.exe", "/c", "start", fileName});
    Every time I run the application, it opens a command window but does not run the access database. Can anyone shed any light on what I am doing wrong.
    Thanks.

    Newbie here. Sorry for the misunderstanding. The problem I am having is with formating the fileName string. When I do "start: c:\invoices\aspen\aspen.mdb" from the command line, it works fine.
    I am having problems formating the fileName parm that is listed on the exec(). I need to point to the correct path where the mdb is located, and also, add the suffix "/cmd 100" where 100 is a command argument that access accepts and act on.

  • How to execute the job from script ??

    How to execute the job from script ?? i have 2 jobs  A AND B . I want to execute job B  from job A'S Script ?? how can i ??

    Hi Kishore,
    Please refer the below link for BODS Job execution using Script
    Executing a job by another job in BODS 4.1 using simple script
    http://scn.sap.com/community/data-services/blog/2013/12/04/executing-a-job-by-another-job-in-bods-41-using-simple-script
    Steps for executing BODS job from Unix Script with user defined global parameters
    http://scn.sap.com/community/data-services/blog/2013/09/02/steps-for-executing-bods-job-from-unix-script-with-user-defined-global-parameters
    Executing a job using batch file
    http://scn.sap.com/thread/3503338
    How to add a schedule for job2 with a condition after job 1 is finished
    http://scn.sap.com/message/14523514#14523514
    Scheduling BODS Jobs Sequentially and Conditionally
    http://scn.sap.com/docs/DOC-34648
    Thanks,
    Daya

  • Method to execute all jobs at a time

    Hi Experts,
    I have 100 jobs i want to execute all at a time,
    Any idea or suggestion,
    If we can do throught script ,Sample Script please
    Thanks
    Madhu

    Hi Madhu,
    You can execute all jobs using different method like through "Data Services management Console scheduling option" or through script (SHELL/BATCH).
    But here again you have to check the below points before executing all jobs
    Check the current server configuration because if you schedule all 100 job in one time it will put more load on server
    If you have dependency in jobs please run that jobs/schedule that jobs first.
    Please refer the below link for how to execute for LINUX or Windows
    Steps for executing BODS job from Unix Script with user defined global parameters
    http://scn.sap.com/community/data-services/blog/2013/09/02/steps-for-executing-bods-job-from-unix-script-with-user-defined-global-parameters
    SAP Data Services - Running & Scheduling Data Services Jobs from Linux Command Line using Third party Scheduler
    http://scn.sap.com/community/data-services/blog/2012/08/22/sap-bods--running-scheduling-bods-jobs-from-linux-command-line-using-third-party-scheduler
    http://www.dwbiconcepts.com/etl/23-etl-bods/39-one-stop-to-sap-bodibods.html?showall=1
    Thanks,
    Daya

  • Can a dbms_job.run execute a job that execute another dbms_job.run?

    Hi,
    I'm using Oracle9iR2 database.
    I create a package procedure that loop through a list of jobs from user_jobs table and run it using dbms_job.run(jobid).
    Then I schedule this package procedure as a job (say JobA) itself to execute the above procedure every 15 minutes.
    However, it always fail. When I execute JobA manually from sqlplus, I get the folllowing error. Any idea what's wrong?
    SQL> exec dbms_job.run(55805);
    BEGIN dbms_job.run(55805); END;
    ERROR at line 1:
    ORA-12011: execution of 1 jobs failed
    ORA-06512: at "SYS.DBMS_IJOB", line 406
    ORA-06512: at "SYS.DBMS_JOB", line 272
    ORA-06512: at line 1
    Please advise.
    Thank you.
    Message was edited by:
    bchurn

    Hi,
    I am bchurn's colleague who is currently also looking into this problem. The code that we have is similiar to yours except there's a cursor looping through all the failed jobs and executing them.
    I am not sure what is the actual difference but it is actually a job running a procedure instead of through SQL Plus.
    However, we found out that a job cannot run another job. But it seems to be alright with your settings :-/
    What we have is actually a job created for every email to be sent out to our users (jobA). But many a times, the emails were not sent out because of unknown problems (during that time - I think it's the ORA-00600 error).
    The last time we created the second job (jobB) for the purpose of re-executing failed jobA jobs. The errors are that a job cannot execute another job.
    Then, we worked around to change jobB to re-adjust the execution time for all the jobA jobs instead of directly reexecuting them. While some failed jobA jobs are executed successfully because of it, some still remains. We found out that the errors from failed execution of jobA jobs as following:
    ORA-00600: internal error code, arguments: [kgassg_2], [], [], [], [], [], [], []
    ORA-29279: SMTP permanent error: 555 5.5.4 <fieldNameHere> parameter unrecognized
    The second error very seldom. First one most common. The jobs eventually being executed successfully after many re-execution (sometimes about 3 to 4 times, some over 20 or 60 times). Anyone can give suggestions or inputs on the first error? The error log file and its trace files do not give much information on the errors with something like the following:
    Error log file:
    Errors in file /opt/app/oracle/products/920/admin/testapp/bdump/somefilename.trc:
    ORA-00600: internal error code, arguments: [kgassg_2], [], [], [], [], [], [], []
    And when I go and search for the somefilename.trc, it does not exist.
    Any idea on how to solve this or identifying the actual problem?
    Thank you in advance.

  • Short dump while executing job SM:EXEC SERVICES for EWA alert generation

    Hello All,
    I'm getting short dump error while executing job SM:EXEC SERVICES for EWA alert generation.I'm using EHP1@SP22 of Sol Man.
    Please find the logs
    Error in the ABAP Application Program
    The current ABAP program "SAPLDSVAS_PROC" had to be terminated because it has
    come across a statement that unfortunately cannot be executed.
    The following syntax error occurred in program "RDSVASCABAP_TRANS__________073
    " in include "RDSVASIABAP_TRANS__________073 " in
    line 1782:
    "Field "STATEMENT_SUMMARY001019" is unknown. It is neither in one of th"
    "e specified tables nor defined by a "DATA" statement. "DATA" statement"
    The include has been created and last changed by:
    Created by: "SAP "
    Last changed by: "SAP "
    Error in the ABAP Application Program
    The current ABAP program "SAPLDSVAS_PROC" had to be terminated because it has
    come across a statement that unfortunately cannot be executed.
    If anyone came across such kind of dump, please reply asap, due to this, i could not generate EWA report for R/3 system 6.04.
    Thanks,
    Anand.

    >
    Anand Tigadikar wrote:
    > Thx Paul, but i already did checked this note and its not solving my issue
    Dear Anand,
    Did you perform a complete service definition replacement for SDCC/SDCCN as described in the note?
    These are manual steps you need to perform on the system and are not code corrections.
    I would suggest you perform it, if you have not, and check the SDCCN logs to review the process ran cleanly.
    Note: Please make sure SDCC_OSS is functioning and a connection to SAP can be made before
    deleting the service definitions.
    If you have already replaced the service defintions on the Solution Manager system, then no point doing it again. However checking a note and applying it are not the same thing. So I am uncertain if you replaced the service definitions or not. The dump you are getting in SM:EXEC SERVICES suggests its due to a problem with the service definitons. The recommendation is to replace them according to the process described in SAP Note 727998. If you have not done so please do so.
    If you have successfully replaced the service definitions are you still getting the same dump, or has it possibly changed?
    Regards,
    Paul

  • Getting error while trying to execute a external job using dbms_scheduler

    Hello,
    I create a job using alpha account.
    begin
    dbms_scheduler.create_job(
    job_name => 'jps_test_executable',
    job_type => 'EXECUTABLE',
    job_action => '/usr/bin/ksh',
    number_of_arguments => 2
    dbms_scheduler.set_job_argument_value (
    job_name => 'jps_test_executable',
    argument_position => 1,
    argument_value => '/tmp/abc.sh'
    and when I execute the job in the schema using alpha account it works fine.
    BEGIN
    DBMS_SCHEDULER.run_job (job_name => 'jps_test_executable',
    use_current_session => FALSE);
    END;
    Works fine.
    But if I try to execute the same job using some other account say beta in the same schema , I am getting error
    ORA-27476 :”SMS.RUN_SMS_JOBS Does not exist ORA-06512 at “SYS.DBMS_ISCHED” line 2793 ORA-06512 :at “SYS.DBMS_SCHEDULER”,line 1794
    even I give the fill qualifier, still I am getting the error.
    BEGIN
    DBMS_SCHEDULER.run_job (job_name => 'alpha.jps_test_executable',
    use_current_session => FALSE);
    END;
    Any help will be appreciated.
    Thank you,
    Raj

    It's the expected behavior:
    http://download.oracle.com/docs/cd/B19306_01/appdev.102/b14258/d_sched.htm#CIHHBGGI
    RUN_JOB requires that you be the owner of the job or have ALTER privileges on that job. You can also run a job if you have the CREATE ANY JOB privilege.So, you need to grant the required privilege:
    aplha@orcl> grant alter on alpha.jps_test_executable to beta;HTH
    Enrique
    PS If your problem was solved consider marking the question as answered.

  • Executing a Job via Web Services using a Server Group?

    When executing a job from Designer or from the Management Console you have the option to select a specific job server or a server group.
    But when executing a job via Web Services it uses the first job server with which the repository was associated (i.e. the first job server listed in AL_MACHINE_INFO).
    Is there a way to get the job to execute using a server group instead simply choosing the first job server in the list?
    Note: We are using FIM to execute the jobs via web services and don't have access to additional parameters.

    Joe
    Here is the where you can change the server group/job server.
    - After you add the Batch/real Time job as a webservice.
    - Go to the Webservice Batch Job Attribute and from the drop down choose the "Enable job Attributes" and hit apply.
    - After this if you use the WSDL URL http://<Data Services Web Server>:<Web server Port>/DataServices/servlet/webservices?ver=2.0&wsdlxml
    - You will see the job attributes that you can change based on the allowed parameters mentioned in the documentation.
    The batch job or real time job is published without the job parameters by default. Once you enable the job attributes, remove and re publish the batch job as a web service. The application making the call to this webservice should be able to read the WSDL generated by Data services and pickup all the input and output parameters of the method.
    Refer to the Data Services Integrator guide (Chapter 3 : pages 25 - 33 ) to get the exact parameter values permitted via Data Services jobs called via web services.
    Hope this helps!
    Thanks & Regards
    Tiji

  • Execute the SSIS packages (2008 version) using SQL job 2008

    We need to execute the SSIS packages (2008 version) using SQL job Please help with details information how to execute it.
    1.Protection level of the SSIS packages.
    2.Configuration File (Curently using XML file)
    3.Please provide details how to create Credential (Windows User etc)  Do we need to create windows cred explicitly to run the Job etc..
    4.Please provide details for creating Proxy.
    5.How can we configure the xml file since the xml is reading from local box but when the package is moved from developement box to production box
    then the local drive might not be mapped with Production box .
    6.Roles that need to be tagged for the Proxy/Credential.
    7.Which is the best and safest way to execute ssis packages either msdb deployment or filesystem deployment and other necessary details.

    Hi,
    If you want to Execute your SSIS package using SQL job then best solution is to first deploy your Package
    either using msdb deployment or filesystem deployment.The simplest approach to deployment is probably to deploy to the file system.
    So, here is the deployment steps;
    There are four steps in the package deployment process:
        The first optional step is optional and involves creating package
    configurations that update properties of package elements at run time. The configurations are automatically included when you deploy the packages.
        The second step is to build the Integration Services project to create a package deployment utility. The deployment utility for the project contains the packages that you want to deploy
        The third step is to copy the deployment folder that was created when you built the Integration Services project to the target computer.
        The fourth step is to run, on the target computer, the Package Installation Wizard to install the packages to the file system or to an instance of SQL Server.
    you can use below link also;
    http://bharath-msbi.blogspot.in/2012/04/step-by-step-ssis-package-deployment.html
    After that you need to Schedule package using SQL Agent then  Have a look at the following link. It explains how to create an SQL job that can execute an SSIS package on a scheduled basis.
    http://www.mssqltips.com/sqlservertutorial/220/scheduling-ssis-packages-with-sql-server-agent/
    Deployment in msdb deployment or filesystem deployment has there own merits and demerits.
    For security point of view msdb deployment is good.
     it provides Benefits from database security, roles and Agent interaction
    Protection Level;
    In SQL Server Data Tools (SSDT), open the Integration Services project that contains the package.
    Open the package in the SSIS designer.
    If the Properties window does not show the properties of the package, click the design surface.
    In the Properties window, in the Security group, select the appropriate value for the
    ProtectionLevel property.
    If you select a protection level that requires a password, enter the password as the value of the
    PackagePassword property.
    On the File menu, select Save Selected Items to save the modified package.
    SSIS Provide different Protection levels;
        DontSaveSensitive
        EncryptSensitiveWithUserKey
        EncryptSensitiveWithPassword
        EncryptAllWithPassword
        EncryptAllWithUserKey
        ServerStorage
    For better undertsnading you can use below link;
    http://www.mssqltips.com/sqlservertip/2091/securing-your-ssis-packages-using-package-protection-level/
    Thanks

  • Solution Manager - Error when executing Job SM:EXEC SERVICES

    Hi,
    I am trying to get the data from the earlywatch alert report and when i start the job SM:EXEC SERVICES.
    The jobs starts but i get an error during is execucion:
    Runtime errors         SYNTAX_ERROR                                          
           Occurred on     17.01.2008 at   14:06:28                                                                               
    Syntax error in program "RDSVASAEW_DBMSS____________052 ".                                                                               
    What happened?                                                                               
    The following syntax error occurred in the program                           
    RDSVASAEW_DBMSS____________052 :                                            
    "INCLUDE report "/1CAGTF/IF_LOGFUNC_000208" not found."                      
    Error in ABAP application program.                                                                               
    The current ABAP program "SAPLDSVAS_PROC" had to be terminated because one of
    the                                                                         
    statements could not be executed.                                                                               
    This is probably due to an error in the ABAP program.   
    I tried to generate all the function modules and i get this error:
    Logical function:  MSQ_TEMPDB_DOWNLOAD            :                    
    Error      1  during generation of  /1CAGTF/IF_LOGFUNC_000208          
    Syntax error.
    Can you help me on this error?
    Best regards,
    Nuno Silva

    Hi Pedro,
    I insert my answer from a similar thread.
    As a pitty, that's a well known error.
    Please check [SAP Note 727998|http://service.sap.com/sap/support/notes/727998]
    Basically, these three steps needs to be performed:
    1) BDL_DELETE_ALL_TABLES
    2) SDCCN - Refresh Service Definitions
    3) Generate Logfuncs
    SE37: /BDL/_GENERATE_LOGFUNCINCLUDES
    OPTION: ALL
    It's also described in the Implementation Guide (IMG), transaction SPRO in the SAP Solution Manager system:
    SAP Solution Manager -> Configuration -> Basic Settings -> Standard Configuration of Basic Settings -> Solution Manager -> Service Data Control Center
    -> Activate the Service Data Control Center in the Solution Manager
    -> Generate Includes for Service Data Contol Center
    With the next ST-PI Support Package. The steps can be triggered via the menu of transaction SDCCN.
    Best regards,
    Ruediger Stoecker

  • Schedule a job using dbms_job package

    SQL to schedule a job using DBMS_JOB.
    variable jobno number;
    variable status number;
    begin
    dbms_job.submit(:jobno, 'x(:status);', trunc(sysdate)+8/24,
    'trunc(sysdate)+1+8/24', null);
    commit;
    end;
    It fails and returns the following error ...
    ORA-01008: not all variables bound
    Is it possible to schedule a job to run a procedure with "IN OUT" parameter? I would appreciate any assistance.
    Proc runs if I execute it from command mode and there are no issues.

    You cannot pass parameters back from a job-- Oracle spawns a separate session to run your job, so that session would receive any OUT parameters and end immediately after the job finishes. Even if Oracle let you do this, you would lose the OUT value as soon as the job ended.
    If you want a job to return a status, you can-
    1) Store the status in a table
    2) Queue a status message in an Oracle Advanced Queue
    3) Use dbms_alert to alert another process
    Justin
    Distributed Database Consulting, Inc.
    http://www.ddbcinc.com/askDDBC

  • Re: Error when executing the Job.

    Hi,
    I am trying to Migrate data from SAP to MySQL. When I try to execute the JOB, it gives me the following error:
    1. 3964     1660     DBS-070401     6/29/2010 4:37:23 PM     |Dataflow DF_Sales_Headers|Loader Query_sales_headers
    2. 3964     1660     DBS-070401     6/29/2010 4:37:23 PM     ODBC data source <MyODBC> error message for operation   <SQLExecute>: <[MySQL][ODBC 3.51
    3. 3964     1660     DBS-070401     6/29/2010 4:37:23 PM     Driver][mysqld-5.0.34-enterprise-nt]Duplicate entry '0010000000' for key 1>.
    4. 3964     1660     RUN-051005     6/29/2010 4:37:23 PM     |Dataflow DF_Sales_Headers|Loader Query_sales_header     Execution of <Regular Load Operations> for target <sales_headers> failed. Possible causes: (1) Error in the SQL syntax; (2) Database connection is broken; (3) Database related errors such as transaction log is full, etc.; (4) The user defined in the datastore has insufficient privileges to execute the SQL. If the error is for preload or postload operation, or if it is for egular load operation and load triggers are defined, please check the SQL. Otherwise, for (3) and (4), please contact your local DBA.
    [Note: But when I validate the DataFlow before Executing, it does not show any error msgs.]
    This is pretty simple Batch Job, with one source Table and a Target table. I have used Query for mapping the columns.
    I am Pretty much new to BODI, so please bare with me, if the question seems silly.
    Any kind of help is appreciated. Thank You!!

    Hi all,
    Sorry for any inconvenience. I found out that, my Job has already executed and also populated the data. But, somehow, i missed that and was trying to re-execute it.
    But then again, I am trying to execute another job and has another peculiar problem.[This time, Have checked everything before posting].
    Following is the Error Message:
    5412     6600     R3C-151001     6/29/2010 6:13:35 PM     |Dataflow DF_Sales_Item Error calling R/3 to get table data: <RFC Error: Key: RFC_ERROR_SYSTEM_FAILURE Status: Error in ASSIGN assignment in program SAPLSDTX >.
    I am not sure why, as i have checked all the connections and i dont see any problems.
    Any kind of help is appreciated.
    Thank You!!
    Edited by: Ragini_sri on Jun 30, 2010 5:35 PM

Maybe you are looking for