Import / Export Troubleshooting
All import and export procedures in Perfion are complex and process a lot of data. This may lead to certain situations when data is not handled as expected or when data processing takes too much time.
In order to speed-up the import/export troubleshooting procedure it is important to submit to Perfion support as much data about any issues related to import/export as possible. Typical data which Perfion support expects when handling import/export support cases:
Import/export log file preferably obtained in test log mode. The log file will contain:
A lot of information about circumstances when, where and how the import or export have been executed including:
Perfion version
Import/export type
Import/export parameters
Import/export execution context
Information about import data source
Information about export data target
Etc.
The information about the execution progress including all warnings and errors.
Import/export performance information. Note: only if test log mode is enabled while running the import/export.
Import data file or exported data file.
Many failed imports happen because of incorrectly specified import data.
The import data is also necessary when testing import using a copy of Perfion database in order to replicate the issue.
A copy of database.
In advanced cases when the import/export issue cannot be determined in any other way, Perfion support will need a copy of your Perfion database in order to be able to determine what causes the issue.
On this page it is shown how to save the log file and how to enable the test log data to make the troubleshooting process easier and quicker.
Import and Export Log Data
All imports and exports in Perfion log data to Perfion database regardless where from the import/export was executed.
One can save the import/export log either directly from GUI importer/exporter or by using the import/export log viewers. The import/export log data will always be available for review by using Perfion import/export log viewers so even after closing GUI importer/exporter the log data will not disappear and will be available for later review.
Saving Log File Using Log Viewer
Import/export log viewers can be opened from Perfion application’s top menu Import/Export -> Import Logs and Import/Export -> Export Logs. Both log viewers have almost the same functionality, so here it will be shown how to review and save the selected import log, but the procedure will be practically the same also for the export log data.
Example of Import Log Viewer is shown in Figure 1.
Find the import in the Import Log Viewer which should be reviewed/saved and press the button with a magnifier glass icon in the Content column to open detail view. Example of the import log detail view is shown in the Figure 2.
From this window one can press the Save button to save the log for this chosen import.
Another way to save the chosen import log (or even multiple log files at the same time) is from Import Log Viewer by checking checkboxes in Save column for all imports which have to be saved. Then press the Save Selected button.
The log file is saved as a single XML file and can contain logs for multiple imports.
NOTE: Import/export log data can be saved at any time even if the import/export have not completed yet.
Saving Log File Using GUI Importer/Exporter
Import/export logs can be saved directly from the GUI importer or exporter while the import/export is running or have been completed.
The process for saving log file is the same for import and export, so here it will be shown how to do this for import and for export the process will be practically the same.
The example of GUI importer is shown in Figure 3.
Saving of the import log becomes available only after starting the import procedure. Once the import is started, the GUI importer will automatically switch to the Log tab to show the log and the Save Log button will become active. To save the log press the Save Log button at any time.
Note that the saved log may slightly differ from the log data shown on the screen. The GUI importer’s log window renders log data slightly differently than it is saved in the database and saving of the log procedure requests the actual log data from Perfion database rather than using the data shown in the log window. Since it can take some time to process the log data, there can come some new log messages into saved log file than there were available at the time the Save Log button was pressed.
Test Log Mode
The import/export test log mode is a special mode one can enable when running import/export in order to log more information than usual. This extra data saved during import/export is very important when trying to troubleshoot various import/export issues, especially those related to slow performance.
Test log mode is not enabled by default, because it cost more resources to run. The import/export with test log will run slightly slower and will collect a significant amount of extra data which is not needed if import/export runs correctly. Therefore, in case there is some issue with import/export, then this mode has to be enabled manually.
Data Saved in Test Log Mode
The extra data saved in test log mode and advantages it can provide:
Much more detailed lowest level sub-routine execution logging. The normal logging shown to users is based on operational sub-routines while the test log mode enables going to the lowest sub-routine level which is more granular, because each operational sub-routine may have several low level sub-routines.
This data allows measuring performance for most of the lowest level sub-routines.
Some imports/exports may stop responding in case of some error and in such case it may be terminated without any usable error information. By using more granular sub-routine tracking it is possible for Perfion support to determine more accurately which routine have failed.
Information about data manipulations related to Perfion database for CRUD operations.
Whenever import/export must handle data with Perfion database all requests are handled by SQL Server which has a lot of influence how the data will be processed. The way SQL Server handles these requests depends on how the server is set up, its hardware, available resources, load, etc. These conditions cannot be easily replicated by Perfion support even if the actual database copy is available for investigation. Therefore, in test log mode, some metadata will be collected which then can be compared to similar metadata when the same sub-routines are run in different environments in order to determine if the issues are code based or server based.
In test log mode Perfion will collect actual query execution plans of various important lowest level sub-routines which allows very detailed analysis of how these procedures performed. The SQL Server uses a cost based algorithms which determines the best query execution plans based on different criteria and server related variables. In some cases the query execution plans can be preselected incorrectly which may lead to slow performance. The data collected in test log mode enables to detect such cases.
NOTE: Data saved in test log mode is not shown in import/export logs in Perfion, but this data is included when saving log files and it is accessible to Perfion support.
To check if the test log mode was enabled one can look at the import/export log. Each importer/exporter logs import/export related parameters and one of parameters (ImportParameter_EnableTestLogMode) shows if the test log is enabled as shown in the Figure 4.
Enabling Test Log Mode
Enabling of test log mode differs for different type of importers/exporters based on the interface they run from (e.g. API, GUI, Actions, etc.), but it will be the same for importers/exporters based on which data they handle (e.g. feature definitions, actions, etc.).
Importer/Exporter - GUI
To enable test log for GUI importer/exporter one has to use the keyboard shortcut Ctrl+Shift+L. The keyboard shortcut starts the import/export in the same way as the Start Import / Start Export buttons do, but in addition the test log mode will be enabled.
Note that the keyboard shortcut works only when the import/export start button is active, e.g. only when all mandatory import/export parameters are set and the import/export is not running already.
Importer - Actions
To enable test log mode for importer used in Actions one has to add an additional IMPORT command parameter ‘@EnableTestLogMode’ and set its value to ‘true’.
The Figure 5 shows an example how the test mode is enabled for IMPORT command.
Importer/Exporter - API
To enable test log for importer/exporter which is using Perfion API interface one has to add an additional parameter ‘EnableTestLogMode’ and set its value to ‘true’.
The Figure 6 shows an example how the test mode is enabled for API importer. The test log mode for API exporter is enabled in the same way as for the API importer.
Importer – Remotes (Sync Job)
To enable test log for importer which is executed as a Sync Job by using Sync type Remote one has to add an additional parameter ‘EnableTestLogMode’ in remote setup XML and set its value to ‘true’.
The Figure 7 shows an example how the test mode is enabled for Sync type Remote.
Â
Â