Export (0) Print
Expand All

How to: Run the SSIS Package to Update the Mobile Staging Database

To update the mobile staging database with data from Microsoft Dynamics applications that is used by Mobile Sales on mobile devices, you run the Mobile Sales SSIS package. Before you run the SSIS package, gather the following information:

  • The connection string for the Microsoft Dynamics AX or Microsoft Dynamics NAV databases.

  • The mobile staging database server name.

You can run the SSIS package in three ways:

  • Manually using the Execute Package utility, as described in the Running the Package Manually section.

    NoteNote

    When you use the manual process, the package runs only once. Use this option for testing, and use one of the other options for maintenance.

  • As a scheduled task using Execute Package Utility SSIS and Windows Scheduled Tasks, as described in the Running the Package Using Windows Scheduled Tasks section.

  • As a scheduled task using a SQL Server Agent job. For more information, see How to: Run a Package Using a SQL Server Agent Job

For more information about installing Mobile Sales, see How to: Install Microsoft Dynamics Mobile - Device Components.

Running the Package Manually

You can run the SSIS package manually using the SSIS Execute Package utility.

To run the SSIS package manually

  1. On the computer where Mobile Sales is installed, locate the folder that contains the SSIS package file for Microsoft Dynamics AX or Microsoft Dynamics NAV.

    By default, the folder as follows:

    C:\Program Files\Microsoft Dynamics Mobile\Solutions\Microsoft Dynamics\Mobile Sales\Server\Staging Database\SSIS SQLversion

    Where Microsoft Dynamics is your Microsoft Dynamics AX or Microsoft Dynamics NAV version and SQLversion is your Microsoft SQL Server version number (2005 or 2008).

  2. Double-click the .dtsx file, for example, Mobile Sales-NAV4-Package.dtsx, to open the Execute Package Utility.

  3. In the Execute Package Utility window, in the left pane, select Connection Managers.

  4. In the pane on the right, select the connection manager for your Microsoft Dynamics database, for example, NAV DB. In the Connection String field, set Data Source to the Microsoft Dynamics database server name and Initial Catalog to the Microsoft Dynamics database name, for example:

    Data Source=ServerName;Initial Catalog=DatabaseName;Provider=SQLNCLI.1;Integrated Security=SSPI;Auto Translate=False;
    
  5. Select Staging DB and, in the Connection String field, set Data Source to the mobile staging database server name and Initial Catalog to the mobile staging database name, for example:

    Data Source=MobileStagingServerName;Initial Catalog=MobileStagingDatabaseName;Provider=SQLNCLI.1;Integrated Security=SSPI;Auto Translate=False;
    
  6. If you changed the company account in the SSIS Package .dtsConfig file from the default account, add the modified .dtsConfig file as follows:

    1. Select Configurations.

    2. Click Add.

    3. Select the .dtsConfig file, for example, Mobile Sales-NAV4.dtsConfig, and then click Open.

  7. Click Execute.

    The Package Execution Process window appears and shows the execution progress.

  8. When the process completes, close the Package Execution Process window.

  9. In the Execute Package Utility window, click Close to exit.

Running the Package Using Windows Scheduled Tasks

You can schedule the Mobile Sales SSIS package to run as a scheduled task using Windows, which enables you to specify recurrence and timing.

To load the package in the utility

  1. On the computer where Mobile Sales is installed, locate the folder that contains the SSIS package file for Microsoft Dynamics AX or Microsoft Dynamics NAV.

    By default, the folder as follows:

    C:\Program Files\Microsoft Dynamics Mobile\Solutions\Microsoft Dynamics\Mobile Sales\Server\Staging Database\SSIS SQLversion

    Where Microsoft Dynamics is your Microsoft Dynamics AX or Microsoft Dynamics NAV version and SQLversion is your Microsoft SQL Server version number (2005 or 2008).

  2. Double-click the .dtsx file, for example, Mobile Sales-NAV4-Package.dtsx, to open the Execute Package Utility.

  3. In the Execute Package Utility window, in the left pane, select Connection Managers.

  4. In the pane on the right, select the connection manager for your Microsoft Dynamics database, for example, NAV DB. In the Connection String field, set Data Source to the Microsoft Dynamics database server name and Initial Catalog to the Microsoft Dynamics database name, for example:

    Data Source=ServerName;Initial Catalog=DatabaseName;Provider=SQLNCLI.1;Integrated Security=SSPI;Auto Translate=False;
    
  5. Select Staging DB and, in the Connection String field, set Data Source to the mobile staging database server name and Initial Catalog to the mobile staging database name, for example:

    Data Source=MobileStagingServerName;Initial Catalog=MobileStagingDatabaseName;Provider=SQLNCLI.1;Integrated Security=SSPI;Auto Translate=False;
    
  6. If you changed the company account in the SSIS Package .dtsConfig file from the default account, add the modified .dtsConfig file as follows:

    1. Select Configurations.

    2. Click Add.

    3. Select the .dtsConfig file, for example, Mobile Sales-NAV4.dtsConfig, and then click Open.

To run the SSIS package using Windows schedule tasks

  1. In the Execute Package Utility window, in the left pane, select Command Line, and then select all the text in the command line text box.

    NoteNote

    If you are using a configuration file, it will also be included.

  2. Click Close to close the package.

  3. On your computer, create a new batch file. For example, UpdateMobileStagingDatabase.bat.

  4. Paste the command line from the package into the batch file.

  5. Add the command DTexec before the /FILE “C:\… statement.

    The following code example illustrates the contents of the batch file for Microsoft Dynamics NAV 4.0 SP3:

    
                    DTexec /FILE "C:\Program Files\Microsoft Dynamics Mobile\Mobile Sales\Server\Microsoft Dynamics NAV 4.0 SP3\Mobile Sales-NAV4-Package.dtsx" /CONNECTION "NAV DB";"Data Source=localhost;Initial Catalog=database name;Provider=SQLNCLI.1;Integrated Security=SSPI;Auto Translate=False;"  /MAXCONCURRENT " -1 " /CHECKPOINTING OFF  /REPORTING EWCDI
    
  6. Save the batch file.

  7. Schedule the batch file to be executed using Windows Scheduled Tasks.

Security

When you set up the SSIS package to run as a scheduled task, you must ensure that the user account under which the task runs has read access to the appropriate databases.

See Also

Community Additions

ADD
Show:
© 2015 Microsoft