Command Line

BI xPress ›› Features ›› Best Practices ››
Parent Previous Next

Command Line


The BI xPress Best Practices Analyzer command line tool allows users to analyze an SSIS Package against either the personal rule sets for the currently executing user or the shared rule set specified within the BI xPress Database. The BI xPress Best Practice Analyzer command line tool utilizes the PWBestPractices.exe located within the Pragmatic Workbench directory. By default, this is can be found in the following location, though this may change depending on the installation location set during install time:


C:\Program Files (x86)\Pragmatic Works\Pragmatic Workbench\PWBestPractices.exe


Any framework (such as Scheduled Tasks, TFS Build Server, Microsoft Systems Center) that is capable of starting an application and passing parameters using command line arguments will be capable of utilizing the the Best Practice Analyzer command line tool to analyze either personal or shared rule sets against SSIS Package(s).



PWBestPractices.exe {<Help> | <Items>} [<Rule Set Type>] [<Connection Information>] [<Options>]



Switch Arguments

To introduce a parameter argument to the PWBestPractices.exe, use either a -- followed immediately by the parameter switch or - followed by the short form version of the parameter switch. If the switch requires a value, an = (equal) will be used to separate the parameter argument with the parameter value and must be surrounded by " (double-quotes) if the value contains a space or special character(s).


Below is a list of all Parameter Arguments grouped by their specific purpose:


Help

Switch

Short Form

Description

--HELP

-H or -?


Shows the help message that provides users with further clarification on using the Best Practice Analyzer's Command Line tool



Items

Switch

Short Form

Description

"values" [...n]

"values" [...n]


The fully qualified location(s) of the package(s). This must include the full package name including the file extension.


If specifying multiple targets, all items must be separated using spaces in between values, as the following example shows:


PWBestPractices.exe "C:\SSIS\MasterPackage.dtsx" "C:\SSIS\ChildPackages\ETLPackage.dtsx"


--VERSION="value"

-N="value"


Specifies the SSIS Version of all packages the user is attempting to analyze. Users can specify the following values:

  2005

  2008

  2012

  2014



Rule Set Type

Switch

Short Form

Description

--SHARED

-S


Specifies that the user wishes to use the shared rule set when analyzing targeted SSIS Package. If using the Shared rule set switch, the connection information switches will be required


--PERSONAL

-P


Specifies that the executing user wishes to use their personal rule set stored on the file system. If using the Personal rule set, the Shared rule set option cannot be specified.



Connection Information

Switch

Short Form

Description

--CONNECTIONSTRING="value"

-C="value"


Used along side the Shared rule set option to specify a valid SQL Server connection string that connects to the BI xPress database containing the shared rule set and optionally the analysis results.


--DBOUTPUT

-D


Used along side the Shared rule set option to specify that the user wishes to output the results to the BI xPress database specified within the Connection String option. Either the XMLOutput or DBOutput option must be specified. If using the DBOutput option, the XMLOutput option cannot be specified and the Connection String option is required.



Options

Switch

Short Form

Description

--PASSWORD="value"

-W="value"

The package password to apply to all SSIS packages specified.

--VERBOSE

-V

The Verbose switch provides users with additional information within the specified output option.

--XMLOUTPUT="value"

-X="value"

Species the file path location the Best Practices Command Line tool will output the results. Either the XMLOutput or DBOutput option must be specified. If using the XMLOutput option, the DBOutput option cannot be specified


Examples

The following example analyzes the MasterPackage.dtsx file against the Shared rules set within the BI xPress database located on the localhost and outputs the results to the same database.



PWBestPractices.exe "C:\SSIS\MasterPackage.dtsx" --VERSION="2012" --SHARED --CONNECTIONSTRING="Data Source=LOCALHOST;Initial Catalog=BIxPress;Integrated Security=True;" --DBOUTPUT



The following example analyzes the MasterPackage.dtsx file against the executing user's personal rule set and outputs the results to the MasterPackageResults.xml file with verbose output.



PWBestPractices.exe "C:\SSIS\MasterPackage.dtsx" --VERSION="2005" -PERSONAL -XMLOUTPUT="C:\SSIS\Analysis\MasterPackageResults.xml" --VERBOSE



The following example applies the password "PackagePassword" to both the MasterPackage.dtsx and ETLPackage.dts and then analyzes them against the executing user's personal rule set and outputs the results to the ETLResults.xml file with verbose output.



PWBestPractices.exe "C:\SSIS\MasterPackage.dtsx" "C:\SSIS\Child\ETLPackage.dtsx" -N="2014" -P -W="PackagePassword" -N="2012" -X="C:\SSIS\Analysis\ETLResults.xml"