Is it possible to schedule CodeXpert, so that it runs automatically at night?
You can run CodeXpert from the command line and create a CodeXpert report that you can access from any location, with or without Toad.
To run CodeXpert from the command line, you must first set up a parameter file. Then you can run CodeXpert. After completion, an html, an xml, and a bin subfolder are placed in the output directory you specify in the parameter file.
To run CodeXpert from the command line:
1) Set up your parameter file as described in CodeXpert Parameter File.
2) Run CodeXpert from the command line using the following syntax:
Toad.exe CX=C:\CMDLineCodeXpertINIFile.ini
3) View the html file located in the OUTPUT DIRECTORY you specified.
Note: The web page created (html file) is best viewed in MS Internet Explorer.
Scheduling CodeXpert
When you have created a CodeXpert ini file, you can create a small program to then schedule the scan. Your application should do the following:
1) Dynamically create the Command Line CodeXpert INI file.
2) Right-click in the CodeXpert window and select Add to Task Scheduler
3) Enter the INI file name in the Command Line Parameter box.
4) Select or enter an output directory in the Output Directory box.
5) Select one or more output type: HTML, XML, or DB Inserts.
6) Click OK.
You can create the parameter file by hand, or you can generate it from within Toad.
Generating a Parameter file
If you generate it from within Toad, all passwords will be encrypted and the file will be more secure than creating it by hand. It is recommended that you have Toad generate parameter files for you.
Note: If you are planning to schedule Toad to run CodeXpert, you must create the parameter file manually.
To generate a parameter file:
1) Open the CodeXpert window:
a) From the Database menu, select Diagnose|CodeXpert.
b) From the Schema Browser, right-click on an appropriate object and select Send to CodeXpert.
2) In the grid, select the objects or files you want to run from the command line.
3) Right-click and select Create Command Line Parameter File.
4) Choose a directory in which to save the parameter file.
5) Click OK.
Creating a parameter file manually:
If you create your own parameter file, it should follow the following format:
NOTE: If you create your own file, the PASSWORDS_ENCRYPTED option should be set to "0" so you can enter passwords. This is not secure.
[OPTIONS]
RULESET_FILENAME=C:\Work\Toad\RuleSets\All2.rst
OUTPUTDIR=C:\CodeXpertResults
CODEXPERT_SCAN=1
SQL_SCAN=1
All this information and more can be found in Toad's help files by going to Help|Content and searching for CodeXpert.
© ALL RIGHTS RESERVED. Feedback Terms of Use Privacy Cookie Preference Center