Running multiple refreshes using a VBA macro

My company has just moved from BO 5.1.5 to BO XI 3.0 and I'm having some probelms running a VBA macro which extracts a large ammount of sales data to a text file. The macro uses an array and a For Each Next loop to enter variable details before the Refresh and then it downloads the text data, looping back to enter different Major Product values before the next refresh.
Here is the code I'm using in BO 5.1.5 and would like to rewrite as event based code ie BeforeRefresh/AfterRefresh.
Sub Main_Report()
    Dim Docs As Documents
    Dim Doc As Document
    Dim Rep As Report
    Dim Reps As Reports
    Dim DocNum As Integer
    Dim RepNum As Integer
    Dim Location As String
    Dim VarName As Variable
    Dim DataPro As DataProvider
    Dim FileName
    Dim Majors
    Dim MajorList
    Dim Period
    Dim Counter
    MajorList = Array("001", "002", "003")
    Period = Format(DateAdd("m", -1, Now), "YYYYMM")
    Counter = 0
'   Enter user prompt values into query for current period and YTD
    For Each Majors In MajorList
    Counter = Counter + 1
        For i = 1 To ActiveDocument.Variables.Count
            Set VarName = ActiveDocument.Variables(i)
            If VarName.IsUserPrompt Then
                Select Case VarName.Name
                    Case "Major Group"
                        ActiveDocument.Variables(i).Value = Majors
                    Case "Period"
                        ActiveDocument.Variables(i).Value = Period
                End Select
             End If
        Next i
    '   Refresh the current report and save data
        Application.Interactive = False
        ActiveDocument.Refresh
        Location = "
seausdcff015\saracm$\My Documents\Tables\Sales\"
        Set Docs = Application.Documents
        Set Reps = ActiveDocument.Reports
    '   Export each report as "TXT" files from current document
        Set Doc = Docs.Item(1)
        FileName = Location & Doc.Name & "_" & Counter & ".txt"
        Set DataPro = ActiveDocument.DataProviders.Item(1)
        Call DataPro.ConvertTo(boExpAsciiTab, 1, FileName)
        Application.Interactive = True
    Next
End Sub
Can you please help. Cheers Milos.

A coworker found this thread on asktom:
http://asktom.oracle.com/pls/asktom/f?p=100:11:861518416236107::::P11_QUESTION_ID:10498431232211
It sort of details a similar (if not the same) method to that above.

Similar Messages

  • Copying Graphs and Pie Charts generated in Analysis View to Email item using Excel VBA Macro Code

    Hi
    I am currently working on an exce VBA macro code that would help me take snapshots of the Graphs and Pie charts generated in QC for a particular application and copy the same to an email item using excel VBA macro code.
    I was able to write the code to create an email item. But I have no clue of how i can take snapshot of the graphs in Analysis View using excel VBA
    Any help would be highly appreciated.
    Thanks in Advance
    Regards
    Amit

    useramit,
    You are in the consumer end products forum.  You will also want to ask your question over at the Enterprise Business Community.
    Click the plus sign (+) next to Discussion Boards to drop down all the options for servers, networking and any other professionally related problems.
    http://h30499.www3.hp.com/

  • How to run multiple motors using NI 9501 in parallel

    I want to run three motors at the same time using NI 9501 c series module and compac rio 9074 with the in built example of open loop velocity control..
    what all I need to change in code...I actually copied the same fpga code and change the module setting..motors are working but for motor 2 when i try to disable its drive it disables motor 1..do I need to change something in RT code too??
    Solved!
    Go to Solution.

    Hi SaraBaber,
    Thanks for posting. You will need to modify both the FPGA code and the Real Time code. In the FPGA code you should copy the contents of the drive status loop another 2 times (It is not necessary to make another 2 while loops, simply make the while loop bigger to include the extra code) and changing the modules to modules 2 and 3. Similiarly for the RT code, you can copy the existing code another 2 times wiring the extra two paths to the same 'Open FPGA VI Reference' and 'Close FPGA VI Reference'. You will also have to update the Read/Write controls for the second and third motor.
    I hope this helps!
    Paul
    Applications Engineer
    NI UK
    I accept Kudos and BTC Tips :-D
    Address: 1NyXnWf9kdjVzjWcW5w4P1V3b1EY4yXP12

  • How to run multiple Thread using Scheduler's in 1.5

    Hi,
    I have a scenario, in which I have to run a Thread at every 15 minutes, If the first Thread is not Finished in 15 min then new Thread has to start.
    Currently I implemeted with java 1.5 schedulers, but the problem is if my first Thread is taking more than 15 min, then no new Thread is starting.
    Following is my Code:
    TestAccountingThread accountingThread = new TestAccountingThread();
    ScheduledExecutorService scheduler = Executors.newScheduledThreadPool(10);
    scheduler.scheduleAtFixedRate( accountingThread, 0, 60, SECONDS );
    Can any one help on this, This is really urgent.
    Regards,
    Suman

    if my first Thread is taking more than 15 min, then no new Thread is startingIf it takes more than 15 min, manually run a new scheduler with initial-delay=0 and shutdown the current one when the current execution is finished --- and repeat this logic in a conditional loop.
    Could this be what you want?

  • VBA Macros Running Before BPC Routine is Done

    Hello, All -
    Working on converting our BPC 7.5 templates to version 10 and I'm having an issue with our custom VBA macro codes.
    In our 7.5 system, all our input templates call custom VBA macro routines when certain SAP functions are done executing (i.e.: once a Refresh is done, execute this macro code).  In 7.5, we have macro codes within the BEFORE_REFRESH, AFTER_REFRESH, BEFORE_EXPAND, and AFTER_EXPAND routines (note: our templates utilize the EvDRE function) and our custom macro codes would not run until the SAP function was done processing, which worked out perfectly however, it appears that something has changed in version 10 as all our macro codes are executing even though the SAP system is still processing in the background.  I confirmed this behavior by placing a macro stopper next to certain macro codes and noticed that VBA is already at that point of executing those codes yet in the background, I can still see the 'processing' box. In 7.5, the processing box is already gone before the custom macro code executed.  Not sure why the macros are executing when SAP is not done fully processing yet.
    Has anyone encountered this type of behavior where custom VBA code is running prematurely before SAP is done processing?
    In addition, it appears that SAP is no longer utilizing the Excel Status bar when certain processes are being executed. In 7.5, when a Refresh command was executed (for example), the status bar at the bottom of Excel would be updating (ready...retrieving data...calculating...formatting, etc...), which allowed us to check the Status bar for the word 'COMPLETED' as this was our indicator that SAP was done processing.  In version 10, it appears that SAP has done away with the use of the Status bar because I am no longer seeing any kind of message flowing through down there when certain SAP functions are running.  Correction: the only messages I see are 'Ready' and a brief moment of 'Calculate'.  Because nothing is appearing on the status bar, our custom macro codes are not working in the new version.
    Does anyone know if this feature no longer available in version 10?
    Other Information:
    + Office 2010
    + BPC v10 on Microsoft platform
    + EPM Server version: 10.0 SP16
    + EPM Add-in version: 10.0 SP21 .NET 3.5; Build: 9094
    Thanks,
    Carlo

    ADDENDUM:
    7 hours later.... to log in was "random", replies mostly not possible, two different error massages, the nice "looking for" and a generic "too many server access try later" (<<in German, my humble translation)
    there IS a lot of working going on, only explination...
    hope, we read some "Announcement"...
    it's late here, byebye, nitynite...

  • Run Data Package from custom Menu00F9/VBA macro

    HI guys,
    I have a problem:when creating VBA macro to run Data Package.
    I get the pop-up error "400" . This is the VBA code I'm using:
    Application.Run "MNU_eDATA_RUNPACKAGE(""Opening""; ""/CPMB/Opening_Balances""; ""Company""; ""Financial Processes"")"
    Have you any suggestion for me?
    Thanks
    Marco Uccello

    Hi Marco,
    I'm guessing by prompts you mean user inputs for Entity, Category, Time etc.
    These are controlled by the dynamic script associated with the data package.
    If you go to the menu eData -> Organise Packages then select a package and go through :
    Modify Package -> View Package -> Advanced
    You should get to the Data Manager Dynamic Script window.
    The following is an example of what should be in here. This is taken directly from the SAP How to Guide "How To Pass Dynamic Parameters to script logic.pdf"
    It's the "PROMPT" parts at the start that control the prompts shown to the user (and passed to the data package) :
    PROMPT(SELECTINPUT,,,,"%ENTITY_DIM%,%CATEGORY_DIM%,%CURRENCY_DIM%,%TIME_DIM%")
    PROMPT(TEXT,%WS_PERCT%,"Input W/S Percent in decimals",)
    PROMPT(TEXT,%EXP_PERCT%,"Input Exp. Percent in decimals",)
    INFO(%EQU%,=)
    INFO(%TAB%,;)
    TASK(ZBPC_PROMPT_EXP_RUN_LOGIC,TAB,%TAB%)
    TASK(ZBPC_PROMPT_EXP_RUN_LOGIC,EQU,%EQU%)
    TASK(ZBPC_PROMPT_EXP_RUN_LOGIC,SUSER,%USER%)
    TASK(ZBPC_PROMPT_EXP_RUN_LOGIC,SAPPSET,%APPSET%)
    TASK(ZBPC_PROMPT_EXP_RUN_LOGIC,SAPP,%APP%)
    TASK(ZBPC_PROMPT_EXP_RUN_LOGIC,SELECTION,%SELECTION%)
    TASK(ZBPC_PROMPT_EXP_RUN_LOGIC,LOGICFILENAME, INCREASEPERCENTAGE.LGF)
    TASK(ZBPC_PROMPT_EXP_RUN_LOGIC,REPLACEPARAM,WS_PERCT%EQU%%WS_PERCT%%TAB%EXP_PERCT%EQU%%EXP
    _PERCT%)
    If you paste that in exactly it will resolve into the right package information which can be seen one step back (via Modify Package -> View Package).
    You can modify the prompts as appropriate for the script you are running - the one above from the how to guide has two inputs for percentages which are used within the associated script logic calculation.
    Hope this helps.
    Thanks.
    Bradley Newcombe.

  • Using AppleScript to Launch Excel VBA Macro

    Using MS Office 2004 and AppleScript 1.9.3. I want to use AppleScript in MS Entourage to kick off a VBA macro in Excel. But no luck.
    To test things, I created an Excel file ("test.xls") with a one-line VBA macro named "test." It just puts up a dialog box with the message "success." I'm calling it from A.S as follows (per the AppleScript Dictionary for Excel 2004):
    tell application "Microsoft Excel"
    run VB macro "hard disk:users:xxx:desktop:test.xls!test"
    end tell
    I get two successive error messages:
    1. 'test.xls' cannot be accessed. The file may be read-only or you may be trying to access a read-only location."
    2. "Microsoft Excel got an error: "hard disk:users:xxx:desktop:test.xls!test" doesn't understand the run VB macro message."
    "test" file permissions are -rw-r--r-- and it is sitting right on the desktop.
    FWIW, I did not remove the old Office vX yet, but renamed old Excel "Microsoft ExcelOld". I read on some other site that this may cause problems.
    This has been endlessly frustrating. HELP!!??
    Steve

    Hi Steve,
    Have you tried dealing with the return value from your macro? If you are invoking the MsgBox function in your test macro, you may need to allow the return value from MsgBox to pass thru back to AS. Something like :
    set MyRetCode to run VB macro "Macintosh HD:Users:xxx:Desktop:test.xls!test"
    (Note unless you've changed the hard drive name to "hard drive", the default boot drive name will probably be "Macintosh HD". Case does matter here)
    I also suspect you'll need to have Entourage up as well in the full case of running a macro in Entourage from Excel (or the other way around). Hence, the command ActivateMicrosoftApp in the Excel dictionary may also be useful.
    Second, you can have a macro, in a startup template, in Entourage call a macro in a startup template in Excel to accomplish what you want without going into AppleScript at all. This latter, VB-only, method will require a "Reference", as it's called in VBA, to be added to the TemplateProject in Entourage that points to the Excel macro you want to fire off. The added benefit of this latter method is that you will have access to the full range of VBA commands/options, rather than the smaller dictionary available in AS.
    Ed
    PB G4   Mac OS X (10.2.x)  

  • How do I use the Profile Manager to run multiple PHP sessions?

    I have a website that tracks the session and state of users as they traverse through the site. Several users can "work together" simultaneously. To test this cooperative functionality, I ran multiple Firefox profiles simultaneously on my computer, using Firefox's Profile Manager. After logging in as two users (one on each separate running Firefox instance), one of my Firefox instances still works, while the other one does not seem to track the session.
    How do I create and run multiple Firefox instances to allow me to test the functionality of such sites? I believe this worked a few months ago. Perhaps this is a new bug?
    I even tried running normal Firefox and Firefox Extended Support Release simultaneously, but I ran into the same error.

    Disregard the question. The solution has nothing to do with any "Firefox bug". Turns out that my session wasn't being managed properly. Or rather, I was accidentally deleting other users' information when new users logged in. So if I had user 1 and user 2, and user 2 logged in after user 1, some of user 1's information would be deleted, resulting in the errors.
    Oops; sorry about the false alarm. :)
    (Was hoping to retract the question, but it looks like others have a similar problem.)

  • Multiple select queries used in Excel BI report ,fetching data from Sharepoint DB(SP2010_Prod_ProjectServer) causing blockage on DB ,when more than one workbook(same copy of Excel BI Report) refreshed using Refresh All option.

    I am using mutiple select queries to fetch data from Project Server 2010 DB(its sharepoint DB) and these queries fetch data in Excel BI report by establishing connection with DB using instance name and all. I have enhance all these select queries and data
    is being fetched in secs. but when more than one copy of same Excel BI report is refreshed using 'Refresh All' option, then these select queries cause blockage on DB.
    Please let me know mitigation for this blockage issue.
    Should I use begin transaction and commit transaction statements/ shared lock statements.
    please reply

    Hi,
    run same query at the same time?

  • PowerShell using start job to run multiple code blocks at the same time

    I will be working with many 1000’s of names in a list preforming multiple function on each name for test labs.
    I notice when it is running the functions on each name I am using almost no CPU or memory.  That led me to research can I run multiple threads at once in a PowerShell program. That lead me to articles suggesting start-job would do just want I am looking
    for. 
    As a test I put this together.  It is a simple action as an exercise to see if this is indeed the best approach.  However it appears to me as if it is still only running the actions on one name at a time.
    Is there a way to run multiple blocks of code at once?
    Thanks
    Start-Job {
    $csv1 = (Import-Csv "C:\Copy AD to test Lab\data\Usergroups1.csv").username
    foreach ($name1 in $csv1) { Write-Output "Job1 $name1"}
    Start-Job {
    $csv2 = (Import-Csv "C:\Copy AD to test Lab\data\Usergroups2.csv").username
    foreach ($name2 in $csv2) { Write-Output " Job2 $name2"}
    Get-Job | Receive-Job
    Lishron

    You say your testing shows that you are using very little cpu or memory in processing each name, which suggests that processing a single name is a relatively trivial task.  
    You need to understand that using a background job is going to spin up another instance of powershell, and if you're going to do that per name what used to require a relatively insignificant amount of memory is going to take around 60 MB.  
    Background jobs are not really well suited for multi-threading short-running, trivial tasks.  The overhead of setting up and tearing down the job session can be more than the task itself.
    Background jobs are good for long-running tasks.  For multi-threading short, trivial tasks runspaces or a workflow would probably be a better choice.
    [string](0..33|%{[char][int](46+("686552495351636652556262185355647068516270555358646562655775 0645570").substring(($_*2),2))})-replace " "

  • I run a mac air on a single user account but multiple people using it, which is ok for the situation. All have their accounts in the apple mail app. what is missing for me is a separate password to access the mail account. otherwise anyone can see anyones

    I run a mac air on a single user account but multiple people using it, which is ok for the situation. All have their accounts in the apple mail app. what is missing for me is a separate password to access the mail account. otherwise anyone can see anyones
    Any clue, how i can add a mail account to apple mail app, but with separate password / pin to open it.
    Years ago there was a program called mail switcher which added this functionality, but thats gone.
    cheers
    Tom

    They would have to be logged in as separate users in order not to see your account in Mail. Whatever accounts put in Mail under your account will show up. All mail accounts usually have there own user and password. The only thing you can do is to remove the password from Keychain and take the account offline so you don't keep getting prompts for passwords each time it checks for mail.
    Not a great solution.
    Best way is to give the other user their own user account with their own mail and enable fast user swithcing to log between the different users if all access the computer frequently.

  • How to run multiple CodedUI Ordered Tests over multiple Test Agents for parallel execution using Test Controller

    we are using VS 2013, I need to run multiple Coded UI Ordered Tests in parallel on different agents.
    My requirement :
    Example:   I have 40 Coded UI Test scripts in single solution/project. i want to run in different OS environments(example 5 OS ).  I have created 5 Ordered tests with the same 40 test cases. 
    I have one Controller machine and 5 test agent machines. Now I want my tests to be distributed in a way that every agent gets 1 Ordered test to execute. 
    Machine_C = Controller (Controls Machine_1,2,3,4,5)
    Machine_1 = Test Agent 1 (Should execute Ordered Test 1 (ex: OS - WIN 7) )
    Machine_2 = Test Agent 2 (Should execute Ordered Test 2 (ex:
    OS - WIN 8) )
    Machine_3 = Test Agent 3 (Should execute Ordered Test 3
    (ex: OS - WIN 2008 server)  )
    Machine_4 = Test Agent 4 (Should execute Ordered Test 4 (ex:
    OS - WIN 2012 server) )
    Machine_5 = Test Agent 5 (Should execute Ordered Test 5 (ex:
    OS - WIN 2003 server) )
    I have changed the  “MinimumTestsPerAgent” app setting value
    as '1' in controller’s configuration file (QTController.exe.config).
    When I run the Ordered tests from the test explorer all Test agent running with each Ordered test and showing the status as running. but with in the 5 Test Agents only 2 Agents executing the test cases remaining all 3 agents not executing the test cases but
    status showing as 'running' still for long time (exp: More then 3 hr) after that all so  its not responding. 
    I need to know how I can configure my controller or how I can tell it to execute these tests in parallel on different test agents. This will help me reducing the script execution time. 
     I am not sure what steps I am missing. 
    It will be of great help if someone can guide me how this can be achieved.
    -- > One more thing Can I Run one Coded UI Ordered Test on One Specific Test Agent?
    ex: Need to run ordered Test 1 in Win 7 OS (Test Agent 1) only.
    Thanks in Advance.

    Hi Divakar,
    Thank you for posting in MSDN forum.
    As far as I know, we cannot specify coded UI ordered test run on specific test agent. And it is mainly that test controller determine which coded UI ordered test assign to which test agent.
    Generally, I know that if we want to run multiple CodedUI Ordered Tests over multiple Test Agents for parallel execution using Test Controller.
    We will need to change the MinimumTestsPerAgent property to 1 in the test controller configuration file (QTControllerConfig.exe.config) as you said.
    And then we will need to change the bucketSize number of tests/number of machines in the test settings.
    For more information about how to set this bucketSize value, please refer the following blog.
    http://blogs.msdn.com/b/aseemb/archive/2010/08/11/how-to-run-automated-tests-on-different-machines-in-parallel.aspx
    You can refer this Jack's suggestion to run your coded UI ordered test in lab Environment or load test.
    https://social.msdn.microsoft.com/Forums/vstudio/en-US/661e73da-5a08-4c9b-8e5a-fc08c5962783/run-different-codedui-tests-simultaneously-on-different-test-agents-from-a-single-test-controller?forum=vstest
    Best Regards,
    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click
    HERE to participate the survey.

  • Using ms project 2007 and vba macro to list all the custom fields used in the project?

    Hi,Using ms project 2007 vba macro, I would like to be able to list all the custom fields used in the project and their corresponding field names. e.g. let us say I create a calculated duration field and name it "expected duration" and the name
    of the field I select is Duration1.
    I am trying to write a macro that will list all the used custom fields such as the result would look like:
    Duration1 ---> "expected duration"
    Text1       ---> "anything"
    Flag1        ---> "....."
    Number1  ---> "..............."
    Can anyone provide me with the solution?
    Regards,
    Chuck

    John,
    I found this module, which provides the the list of custom fields used in the project but does not provide the name given to the field. Here below is the module and hope you could help me achieve this by modifying the macro to list the renamed field.
    ' MSP Checks all Custom Task Fields
    Sub checkfields2()
    'This macro will check and report out which custom task fields are used
    'It requires Project 2002 and above as it relies on the GetField
    'and FieldNameToFieldConstant methods which were not introduced until
    '2002.
    'It does not include resource fields, however it is a simple matter to
    'do it by replacing the pjTask constant with pjResource.
    'Copyright Jack Dahlgren, Oct. 2004
    Dim mycheck As Boolean
    Dim myType, usedfields As String
    Dim t As Task
    Dim ts As Tasks
    Dim i, it As Integer
    Set ts = ActiveProject.Tasks
    usedfields = "Custom Fields used in this file" & vbCrLf
    myType = "Text"
    usedfields = usedfields & vbCrLf & "--" & UCase(myType) & "--" & vbCrLf
    For i = 1 To 30
    mycheck = False
    it = 0
    While Not mycheck And (it < ts.Count)
    it = it + 1
    If Not ts(it) Is Nothing Then
    If ts(it).GetField(FieldNameToFieldConstant(myType & i, pjtask)) <> "" Then
    usedfields = usedfields & myType & CStr(i) & vbCr
    mycheck = True
    End If
    End If
    Wend
    Next i
    myType = "Number"
    usedfields = usedfields & vbCrLf & "--" & UCase(myType) & "--" & vbCrLf
    For i = 1 To 20
    mycheck = False
    it = 0
    While Not mycheck And (it < ts.Count)
    it = it + 1
    If Not ts(it) Is Nothing Then
    If ts(it).GetField(FieldNameToFieldConstant(myType & i, pjtask)) <> 0 Then
    usedfields = usedfields & myType & CStr(i) & vbCr
    mycheck = True
    End If
    End If
    Wend
    Next i
    myType = "Duration"
    usedfields = usedfields & vbCrLf & "--" & UCase(myType) & "--" & vbCrLf
    For i = 1 To 10
    mycheck = False
    it = 0
    While Not mycheck And (it < ts.Count)
    it = it + 1
    If Not ts(it) Is Nothing Then
    If Left(ts(it).GetField(FieldNameToFieldConstant(myType & i, pjtask)), 2) <> "0 " Then
    usedfields = usedfields & myType & CStr(i) & vbCr
    mycheck = True
    End If
    End If
    Wend
    Next i
    myType = "Cost"
    usedfields = usedfields & vbCrLf & "--" & UCase(myType) & "--" & vbCrLf
    For i = 1 To 10
    mycheck = False
    it = 0
    While Not mycheck And (it < ts.Count)
    it = it + 1
    If Not ts(it) Is Nothing Then
    If ts(it).GetField(FieldNameToFieldConstant(myType & i, pjtask)) <> 0 Then
    usedfields = usedfields & myType & CStr(i) & vbCr
    mycheck = True
    End If
    End If
    Wend
    Next i
    myType = "Start"
    usedfields = usedfields & vbCrLf & "--" & UCase(myType) & "--" & vbCrLf
    For i = 1 To 10
    mycheck = False
    it = 0
    While Not mycheck And (it < ts.Count)
    it = it + 1
    If Not ts(it) Is Nothing Then
    If ts(it).GetField(FieldNameToFieldConstant(myType & i, pjtask)) <> "NA" Then
    usedfields = usedfields & myType & CStr(i) & vbCr
    mycheck = True
    End If
    End If
    Wend
    Next i
    myType = "Finish"
    usedfields = usedfields & vbCrLf & "--" & UCase(myType) & "--" & vbCrLf
    For i = 1 To 10
    mycheck = False
    it = 0
    While Not mycheck And (it < ts.Count)
    it = it + 1
    If Not ts(it) Is Nothing Then
    If ts(it).GetField(FieldNameToFieldConstant(myType & i, pjtask)) <> "NA" Then
    usedfields = usedfields & myType & CStr(i) & vbCr
    mycheck = True
    End If
    End If
    Wend
    Next i
    MsgBox usedfields
    End Sub
    This is what the module gives me. But I would like to have beside Text 1 the name that is shown as below. e.g Text1 is "Test".
    Would you mind helping me achieve this?
    Thanks in advance.
    Chuck

  • Running multiple SSIS packages using SQL Server Agent question.

    I have a multitude of SSIS packages I want to run using SQL Server Agent.  What would the best practice be for running these jobs using SQL Server Agent?  One job per package or running all pakages from one job?  If you have an answer can
    you explain the technical reasoning behind your answer?  Thanks in advance.
    Stan Benner

    Hi, maybe a bit more analysis will give a better answer
    Do all the packages have to run in sequence? (if yes, single job better)
    Can the list of packages to be executed be grouped by dependency (ex package 1,2 and 5 must run in sequence and can be executed by one job, while package 3,4 are not dependent on package 1,2 and 5 can be run by a separate job).
    Can any jobs be run in parallel?
    How often will the package execution sequence change?
    How will you deploy your packages and job? (the more jobs to create the more install script needed and upgrade scenarios become messy).
    My personal preference:
    I create ONE ssis package which is executed by ONE sql agent job. lets call this 'PackageExecutionWrapper.dtsx'
    PackageExectionWrapper then contains multiple 'Execute Package' tasks for the packages you want to execute.
    In the package you can apply any package execution rules - which packages have to run after the other, which packages can run concurrently, which packages should only run if previous succeeded.
    If you need to change the sequence, simple, just update the PackageExecutionWrapper package.

  • Run Multiple SSIS Packages in parallel using SQL job

    Hi ,
    We have a File Watcher process to determine the load of some files in a particular location. If files are arrived then another package has to be kick-started.
    There are around 10 such File Watcher Processes to look for 10 different categories of files. All 10 File Watcher have to be started at the same time.
    Now these can be automated by creating 10 different SQL jobs which is a safer option. But if a different category file arrives then another job has to be created. Somehow I feel this is not the right approach.
    Another option is to create one more package and execute all the 10 file watcher packages as 10 different execute packages in parallel.
    But incase if they don’t execute in parallel, i.e., if any of the package waits for some resources, then it does not satisfy our functional requirement . I have to be 100% sure that all 10 are getting executed in parallel.
    NOTE: There are 8 logical processors in this server.
    (SELECT cpu_count FROM sys.dm_os_sys_info
    i.e., 10 tasks can run in parallel, but somehow I got a doubt that only 2 are running exactly in parallel and other tasks are waiting. So I just don’t want to try this  option.
    Can someone please help me in giving the better way to automate these 10 file watcher process in a single job.
    Thanks in advance,
    Raksha
    Raksha

    Hi Jim,
    For Each File Type there are separate packages which needs to be run.
    For example package-A, processes FileType-A and package-B processes FileType-B. All these are independent processes which run in parrallel as of now. 
    The current requirement is to have File Watcher process for each of these packages. So now FileWatcher-A polls for FileType-A and if any of the filetype-A is found it will kick start package-A. In the same way there is FileWatcher-B, which looks for FileType-B
    and starts Package-B when any of FileType-B is found. There are 10 such File Watcher processes.
    These File Watcher Processes are independent and needs to start daily at 7 AM and run for 3 hrs. 
    Please let me know if is possible to run multiple packages in parallel using SQL job.
    NOTE: Some how I find it as a risk, to run these packages in parallel using execute package task and call that master package in job. I feel only 2 packages are running in parallel and other packages are waiting for resources.
    Thanks,
    Raksha
    Raksha

Maybe you are looking for