Job steps

Hi Gurus
I have some question that I can not resolve, maybe you can help me.
I have to create several job steps in a background job.
Let say:
1 step program ztest01.
2 step program ztest02.
I want my 2nd step (ztest02) always executed regardless what happend in 1 step (ztest01).
My problem is it happened that a message error of type 'E' in my 1st step (ztest01) has been triggered resulting  my 2nst step never executed. How to resolve that?
Thank you

If the second step job does not need to be dependent on first one, it is always better to create two different jobs.
Regards,
Aravind

Similar Messages

  • Problem creating job steps variants

    Hi Gurus!
    I have a problem with job steps creation.
    In my program I need to copy the exist job with some condition accords to job steps variants.
    But when I create the new job and it steps and variants in SM37, I can not see the variants names, only number.
    For example in template that I am copying it looks like that:
    No. Program name/command      Prog. type  Spool list   Parameters              User Lang.
    1              RMCVNEUA                  ABAP                        BW_TEMPLATE       aaa     EN
    But in job that I create it is:
    Program name/command      Prog. type   Spool list   Parameters               User  Lang.
    RMCVNEUA                          ABAP                           &0000000000271     ddd     EN
    How can I create steps with variant names instead of numbers/indexes?   BW_TEMPLATE instead of &0000000000271.
    My code:
    CALL FUNCTION 'JOB_OPEN'
        EXPORTING
          jobname          = lv_jobname
          sdlstrtdt        = lv_date
          sdlstrttm        = lv_time
        IMPORTING
          jobcount         = lv_jobcount
        EXCEPTIONS
          cant_create_job  = 1
          invalid_job_data = 2
          jobname_missing  = 3
          OTHERS           = 4.
    SUBMIT (ps_tbtcp-progname) VIA JOB pv_jobname NUMBER pv_jobcount
                                     USING SELECTION-SET ls_cat-variant
                                     AND RETURN.
    CALL FUNCTION 'JOB_CLOSE'
        EXPORTING
          jobcount                          = lv_jobcount
          jobname                           = lv_jobname
         direct_start                      = lv_imm_run
       EXCEPTIONS
         cant_start_immediate              = 1
         invalid_startdate                 = 2
         jobname_missing                   = 3
         job_close_failed                  = 4
         job_nosteps                       = 5
         job_notex                         = 6
         lock_failed                       = 7
         invalid_target                    = 8
         OTHERS                            = 9
    Edited by: Dani_K on Oct 27, 2010 4:35 PM

    No any suggestions?

  • Pass value from SQL agent job step

    Hi 
    I have created one SSIS package and I am scheduling the same using SQL Agent job. Now I want to pass one value from SQL job agent and want to use that value in SSIS package and then run that package.  Can someone point to the solution.
    Aniruddha http://aniruddhathengadi.blogspot.com/

    I have created one parameter on SSIS package named strValue and assigned a empty value "". After that I have created one SQL job and step wherein I have set the value to "Nike" for parameter under Parameters tab.
    Now I am expecting Nike value which I have set on SQL job step should get reflected on SSIS package when I am running my job. Am I doing anything wrong ?
    Aniruddha http://aniruddhathengadi.blogspot.com/
    Not sure what's going wrong but you can have quick look at below step by step tutorial:
    Parameterizing Connections and Values at Runtime Using SSIS Environment Variables (via SQL Agent)
    Cheers,
    Vaibhav Chaudhari

  • Background Job Step

    Hi,
    I have 3 steps in my job. I want to check the status of each job step and if that job step fails , send email to certain people.
    How do i go abt doing abt it??
    In table TBTCP --  it gives the status of each job step as 'P' ie scheduled even for the finished ones... so i cant get correct data from TBTCP.
    Is der any FM implementing the same??
    Its Urgent.
    Answers will be rewarded,
    regards,
    Rohan

    Hi Rohan,
    Instead of creating the stpes, why don't you create the Job after completing the Fisrt job and for the Third Job select after completion of the Second job, so that you will get the Status in TBTCP table from there you can write the code to send the email
    Regards
    Sudheer

  • SQL Server Agent Job Failing on Job Step

    Hi,
    Firstly, apologies if this post has been made in the wrong group.  Running SQL Server 2012.  I'm attempting to add a SQL Server Agent Job which calls a stored procedure that sends a Database Mail message.  The SQL Server and SQL Server Agent
    both run under the NT AUTHORITY\NETWORK SERVICE account.  The Database Mail service has been enabled, and a public profile created.  When running the stored procedure manually, I receive no errors - everything runs as expected and I do receive an
    email containing the expected information.
    I've created the job, job step, job schedule, attached the schedule to the job, and assigned the job to server, all using T-SQL without error.  I've also enabled the mail profile on the SQL Server Agent, and I know that part is working because when
    the job fails, I get an email notification of the failure.
    I've checked the command text in the job step and parsed it within the SQL Job Step Edit window to confirm, it shows as parsing correctly.  However, when I manually run the job itself, I get the following:
    Execution of job failed.  See the history log for details.
    I check the history log and it shows:
    [474] Unable to refresh Database Mail profile Database Mail Profile. (reason: ) (Not a typo, the history log shows no reason)
    [260] Unable to start mail session.
    [396] An idle CPU condition has not been defined - OnIdle job schedules will have no effect
    The command text on the failing job step is as follows:
    DECLARE @date [varchar](10)
    SET @date = CAST(GETDATE() AS [varchar](10))
    EXEC [dbo].[GetExceptions]
    @company = 'MyCompany',
    @checkDate = @date
    With regard to the date value being passed as varchar: This stored procedure is used to check for exceptions against multiple databases on this server (hence the company parameter) via dynamic SQL.  I'd much prefer to use proper data typing but this
    is the only way I could get it to work.
    Does anyone have any suggestions on anything else I could check, or insights into why this is failing?  Any help is greatly appreciated!
    Best Regards
    Brad

    I am not sure if this really helps but I would do follow the below steps:
    1. make sure sql server agent has database mail enabled(rigt click on server agent--properties--alert system--enable database mail and choose right profile.) and RESTART THE SQL SERVER AGENT.(i know you said it i working, but sometimes,  restart the
    sql server agent might fix)
    2. check agent error log and check if any error messages.
    3. run the command text you mentioned in sql server and see if it is working.(i know you said it is working but just to make sure).
    4. make sure sql server agent service user has permissions to run database mail in msdb. check this https://msdn.microsoft.com/en-us/library/ms186358.aspx
    5. Check the output from select * from msdb.dbo.sysmail_log and if it says anything
    6.it does not look like the job log is getting truncated but to make sure, get the job step output to a text file.to do this, edit the job step and on the job step properties click on advanced,  enter path to the output file. this will give the complete
    output for the step.
    Hope it Helps!!

  • "Failed to open package file ..." when modifying job step on remote server

    I have SSIS package setup on a remote SQL Server to run on schedule via SQL Server Agent. It was setup initially by remote desktop-ing to the server and connecting to it via SSMS running on the same machine where SQL Server is running. Package source is
    "File System" and absolute path is specified (D:\Folder1\Package1.dtsx). There is just one step in the job - to run SSIS package. Everything works as it should.
    Now I want to modify this job - change number of retry on failure attempts. I can successfully connect to this SQL Server instance via SSMS from my developer workstation. I can then go to "Advanced Settings" for this job step and change "Retry attempts"
    to some other number. However, when I press "OK" I get this error message:
    TITLE: SSIS Execution Properties
    Failed to open package file "D:\Folder1\Package1.dtsx" due to error 0x80070003 "The system cannot find the path specified.".  This happens when loading a package and the file cannot be opened or loaded correctly into the XML document. This can
    be the result of either providing an incorrect file name was specified when calling LoadPackage or the XML file was specified and has an incorrect format.
     ({105912C7-6345-42B4-99B4-58566291867B})
    ADDITIONAL INFORMATION:
    Failed to open package file "D:\Folder1\Package1.dtsx" due to error 0x80070003 "The system cannot find the path specified.".  This happens when loading a package and the file cannot be opened or loaded correctly into the XML document. This can
    be the result of either providing an incorrect file name was specified when calling LoadPackage or the XML file was specified and has an incorrect format.
     ({105912C7-6345-42B4-99B4-58566291867B})
    Interestingly enough, in spite of this error message the number of retries is successfully changed.
    I understand it happens because SSMS tries to locate package on my local hard drive and the same folder doesn't exist on my development PC. It still doesn't make sense to me. Does SSMS not know I am accessing remote server? How come I don't get any errors
    when I just execute this job via SSMS when SSMS runs on my development PC?

    Hi, Am facing same issue, but I am trying run SSIS package via C# code, I have given full access to all the folder in which the package is available.
    In the below line am getting error,
    using Microsoft.SqlServer.DTS.Runtime;
    Application app=new Application();
    Package package=null;
    package=app.LoadPackage("PackageFullPath",null) --error line
    Failed to open package file "C:\SSIS\Package.dtsx" due to error 0x800C0006 "The system
    cannot locate the object specified.".  This occurs when loading a
    package and the file cannot be opened or loaded correctly into the XML document
    full access to which account? also trying to run from where? In the same machine where package resides?
    Please Mark This As Answer if it solved your issue
    Please Vote This As Helpful if it helps to solve your issue
    Visakh
    My MSDN Page
    My Personal Blog
    My Facebook Page

  • SSIS - Change Config File Path LOCATION in SQL Agent Job Step (NOT USING DTEXEC)

    SSISers;
    I am not new to ssis but am trying to deal with promoting of ssis config files differently for a specific project. We are using SQL 2008 R2.
    As a standared pattern used for years, we just use SQL Agent, build a job step for the ssis package, add the ssis package as SQL Integration Services Package type from fileshare (not using Integration Services), and add the necessary production
    config files in the configutation tab of the job step. Easy.  We do not execute our packages with DTEXEC command line.
    A new project has the developers leaving the config files in the package - not removing the config files for deployment. Is there a way to override JUST THE CONFIG FILE PATH LOCATION in the job step for ssis package? Remember, we are NOT using dtexec. 
    I was told that /SET might do it but I do not see a good example anywhere of hooking this in and how it works for a CONFIG FILE PATH LOCATION - I see variable overrides but not CONFIG FILE PATH LOCATION. The packages were written with Absolute config file
    path and not Relative path.
    Please understand that my goal is to let them leave the packages as is, we move the config files to the production sever and all we have to do is flip the location of where the config files are sitting for the ssis pacakge to look for them.  We would
    rather NOT have to use DTEXEC command  line with the job step for reasons that I do no need to get into on this forum.
    Any suggestions are appreciated.

    Hi mg30,
    There is no way to overwrite the XML configurations file just through modifying the SQL Server Agent job steps.  The Dtexec utility will apply the default package configurations for the second time after applying the options specified in the command
    lines or other package configurations configured in the job step.
    If the package is not deployed/installed, the Dtexec utility looks for the XML configurations file according to the file path defined in the Package Configurations Organizer window. In this situation, you need to either disable the package configurations
    or modify the XML file path in the BIDS.
    If the package is already deployed/installed, you need to modify the package as above or re-specify the install folder for the package configurations file. 
    Regards,
    Mike Yin
    If you have any feedback on our support, please click
    here
    Mike Yin
    TechNet Community Support

  • SQL Agent job step - SSIS package - adding a config file - will it override the one that the package specifies?

    If I setup a job step to run a package and set the config file location on the "Configurations" tab, will that override the config file that the SSIS package is configured to use?  Or is this a "cumulative" type configuration option?
    I typically have my config file mixed in with my project files, but that path wont exist on the server.

    Hi Shiftbit,
    ETL vs ELT is right.
    In SSIS 2005, the DTExec utility loads and runs the package, events occur in the following order:
    The package file is loaded.
    The configurations specified in the package at design time are applied in the order specified in the package (except for Parent Package Variables).
    Any options specified from the command line are applied. Any configurations specified on the command line overwrite the current values; however, they do not trigger a reload of the configurations if a changed value impacts a configuration dependency. For
    example, if the connection string used for SQL Server configurations is updated from the command line at run time, the package will still retain any other values from the design-time SQL Server configuration database.
    Parent Package Variable Configurations are applied.
    The package is run.
    In SSIS 2008 and higher, utility loads and runs the package, events occur in the following order:
    The dtexec utility loads the package.
    The utility applies the configurations that were specified in the package at design time and in the order that is specified in the package. (The one exception to this is the Parent Package Variables configurations. The utility applies these configurations
    only once and later in the process.)
    The utility then applies any options that you specified on the command line.
    The utility then reloads the configurations that were specified in the package at design time and in the order specified in the package. (Again, the exception to this rule is the Parent Package Variables configurations). The utility uses any command-line
    options that were specified to reload the configurations. Therefore, different values might be reloaded from a different location.
    The utility applies the Parent Package Variable configurations.
    The utility runs the package.
    So, we can see that no matter we use SSIS 2005 which applies the Configurations once or use SSIS 2008 (or higher) which applies the configurations twice, the configurations specified in the command line will affect and not be overwritten by the configurations
    specified at design-time.
    Reference:
    http://technet.microsoft.com/en-us/library/ms141682(v=sql.110).aspx.
    Regards,
    Mike Yin
    TechNet Community Support

  • Background Job step and Variant

    Hi,
       We are undergoing process of renaming user IDs(Eg from ABC to XYZ). I would like to know the effect on Background jobs due to renaming. I am sure we need to update the job step(s) with the new user ID. Do we need to do anything with variants too or will they work for new IDs also. Your help is highly appreciated.
    Thanks,
    Venu.

    Hi,
    This is SAP Business one system administration forum. Please find correct forum and repost your discussion to get quick assistance.
    Please close this thread here with helpful answer.
    Thanks & Regards,
    Nagarajan

  • Check Job step status

    HI,
       My scenario goes like this :
          I have 3 steps in a background job with 3 diff variants. I want to find out a way
    to find the status of each of my job steps, and after each job step is submitted on knowing its status i want to send a corresponding mail to a few people .
    How do i do this.
    Answers will be rewarded,
    Regards,
    Rohan

    Hi,
    CALL FUNCTION 'BP_JOB_READ'
        EXPORTING
          job_read_jobcount     = w_jobcount
          job_read_jobname      = w_jobname
          job_read_opcode       = '20'
        IMPORTING
          job_read_jobhead      = wa_jobhead
        TABLES
          job_read_steplist     = i_jobsteplist
        EXCEPTIONS
          invalid_opcode        = 1
          job_doesnt_exist      = 2
          job_doesnt_have_steps = 3
          OTHERS                = 4.
      IF sy-subrc <> 0.
        MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
                WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
      ENDIF.
    To Display the status text as per the status type
      CASE wa_jobhead-status.
        WHEN 'S'. WRITE: / text-033. "'Scheduled'.
        WHEN 'R'. WRITE: / text-034. "'Released'.
        WHEN 'F'. WRITE: / text-035. "'Completed'.
        WHEN 'A'. WRITE: / text-036. "'Cancelled'.
        WHEN OTHERS.
      ENDCASE.
    Best regards,
    Prashant

  • How to run a SQL Server Agent job step on certain days/frequency

    I've a SQL Server Agent job. One of the requirement is that a particular step should only run on certain frequency i.e. Certain Date and time. Any suggestions how can that be done?
    GBM

    yes
    1. Make first step as a Transact SQL step. Keep command as below
    IF DAY(GETDATE()) = <Your date value>
    AND DATEPART(hh,GETDATE()) = <your time hour)
    AND DATEPART(minute,GETDATE()) = <your time minute)
    SELECT 1
    ELSE
    RAISERROR 'Job cant be run at this time'
    Then for job step properties set the following properties in advanced tab
    This would make sure it will quit the job without executing other core steps untill it reaches the required day and time
    You can add more conditions in IF based on requirement like if you want time to be on certain second or month to be particular value etc
    Please Mark This As Answer if it helps to solve the issue Visakh ---------------------------- http://visakhm.blogspot.com/ https://www.facebook.com/VmBlogs

  • Account is SysAdmin - but Non-SysAdmins have been denied permission to run DTS Execution job steps without a proxy account.

    Hi,
    I have a SQL Agent Job that executes an SSIS package.  However when I manually execute the SQL Agent job from SSMS I get the following seemingly common error:
    "Non-SysAdmins have been denied permission to run DTS Execution job steps without a proxy account."
    However, the job owner is a member of both the SQL SysAdmin role, and also a member of the operating system's Administrators group.
    The SQL Agent Service is running under Local Service (not something within my control unfortunately).
    I have found many posts suggesting setting up a proxy account etc, but that seems to be for the case where the job owner is not a sys admin.  To be clear, the job owner IS a sysadmin.
    This is occurring in the Production environment.  I have two other, seemingly identical environments that are working fine, so i am wondering if I have missed something obvious.
    Any idea what I've missed?
    details:
    Windows Server 2008 R2 Standard
    SQL Server 2008 R2 (SP2) - 10.50.4000.0 (X64)    Enterprise Edition
    Note - the jobs were migrated to the broken environment by scripting them from Env 1, with If exists, drop, create etc.
    Thanks
    Guy
    Guy

    Obviously, as soon as I post this I figure out the issue:
    In the script i had provided for migrating the job to the new environment (to which I have no access) the DBA replaced the @owner_login_name value with a different login.  The account he used does have SysAdmin privileges  but for some reason
    changing the account in the script did not correctly update in the job.
    On opening the job in SSMS it appeared to have the correct owner account, but using GUI to look up the specific account and adding it this way, while appearing to make no difference, has in fact solved the problem.
    My assumption therefore is that updating the @owner_login_name when scripting the job is not the same as actually editing the job owner itself.
    Guy
    Guy

  • MiniSAP - SE80 Prompts Error "Printer not suitable for job step..."

    Hi all,
    I bought an ABAP Objects book. I installed the MiniSAP. When I run SAP GUI and SE80, both with BCUSER and DDIC, it gives me error message "Printer not suitable for job step. Automatic printing not possible."
    If I double-click on the message, it does not show the description of the error message, instead it displays an Internet Explorer error message "The page cannot be found."
    Furthermore, the same error message, "The Page cannot be found", also appears in the area where the listbox and textbox for selecting Development Class, Program, Function Group, etc. Making these function becomes unavailabale. I cannot see the listbox and textbox in the Object Navigator. The only development class show is "$_TMP_BCUSER" (if I recall correctly). But nothing is in the development class.
    How do I solve this problem?
    OS: Windows XP Professional
    Browser Installed: Internet Explorer and Firefox
    Other info: I put incorrect IP Address in the Hosts file while installation was in progress. This created error. I then correct the IP Address in the Hosts file and resume installation. I still encountered error until I restarted my computer and resume installtion. I use IP Address 10.10.0.10.
    Thanks in advance.
    Regards,
    Goh Tiam Tjai

    I searched the solution in the other SDN sub forum (ABAP Programming). The following patch solves the problem.
    http://www.sap-press.de/download/dateien/473/sapgui_patch.zip
    Regards,
    Goh Tiam Tjai

  • Check Status of job step

    Hi,
    i have a job having 3 steps. table TBTCO gives u the status of the 3 steps together -- job as a whole.
    How can i come to know of the status of the job at every step. i mean how will i confirm if at every step the job is executed properly or not.??
    Untill the complete job is executed, the status of each job step is Scheduled.
    Only after complete job excution u can find out the status . either finished or aborted.
    What if i want to know status at each job step?
    Kindly help,its urgent.
    Answers will be rewarded,
    regards,
    Rohan

    Hi,
    Checking  your job status with SM50 (processor type BTC) is more accurate then SM37.  SAP updates the tables TBTCO wheneveryour background jobs status change.  If SAP is shutdown, the currentjobs might not be update ontime to the table. (e.g. a background job wasshown as Active (SM37), in fact it real status should be Cancelled.
    Look at the function module <b>GET_JOB_RUNTIME_INFO</b>
    Regards
    Sudheer

  • Check Status of a job step

    Hi,
    Can anyone tell me how to check the true status of a job step.
    Using tables TBTCP , or FM BP_JOB_READ what i can come to know is the status of a job step to be 'P" ie Scheduled even when the job containing that step has finished succesfully(Status from TBTCO ).
    My Job has 3 steps.
    I want to know the status of my 1st job step and based on the status (either Aborted or Finished) i want it to proceed further n execute the 2nd step.and so on.
    IS any there way out??
    Answers will be rewarded,
    regards,
    Rohan

    Hi,
    Checking  your job status with SM50 (processor type BTC) is more accurate then SM37.  SAP updates the tables TBTCO wheneveryour background jobs status change.  If SAP is shutdown, the currentjobs might not be update ontime to the table. (e.g. a background job wasshown as Active (SM37), in fact it real status should be Cancelled.
    Look at the function module <b>GET_JOB_RUNTIME_INFO</b>
    Regards
    Sudheer

  • No output on job step output log with perl's print statement under WINDOWS

    Running a perl script ( ActivePerl 5.8.8.x ) on a remote WINDOWS box through llinux-based EM 10.2.04 deployment procedure, in the EM job step output log I've noticed that the print statement in that perl script displays nothing for array or element from array but displays proper value for any scalar variable. Any clue for this kind of issue ?

    Running a perl script ( ActivePerl 5.8.8.x ) on a remote WINDOWS box through llinux-based EM 10.2.04 deployment procedure, in the EM job step output log I've noticed that the print statement in that perl script displays nothing for array or element from array but displays proper value for any scalar variable. Any clue for this kind of issue ?

Maybe you are looking for