Check Deprecated DLL Usage
This BPA test checks for the use of deprecated or outdated DLLs in QActions and automation scripts. You can run it in System Center (on the Agents > BPA tab).
It is available from DataMiner 10.4.6/10.5.0 onwards, but prior to DataMiner 10.5.5/10.6.0 it is known as Check Deprecated MySQL DLL instead.
Depending on the DataMiner version, it checks for the following DLLs, in the specified folders:
| Deprecated DLL | Deprecated since DataMiner version | Minimum non-outdated version | Minimum non-deprecated version | Folder |
|---|---|---|---|---|
| MySql.Data.dll | 10.4.6/10.5.0 | 8.0.0.0 | N/A (8.0.0.0 and later are deprecated but not outdated) | C:\Skyline DataMiner\ProtocolScripts |
| SLDatabase.dll | 10.5.5/10.6.0 | N/A | N/A (always deprecated) | C:\Skyline DataMiner\ProtocolScripts or C:\Skyline DataMiner\Files |
| DataMinerMessageBroker.API.dll | 10.5.12/10.6.0 | 3.0.0 | 3.0.0 (3.0.0 and later are allowed) | C:\Skyline DataMiner\ProtocolScripts |
Any version lower than the specified minimum non-outdated version will be considered outdated, as older versions are known to pose security risks.
Any version higher than or equal to the minimum non-outdated version, but lower than the minimum non-deprecated version is considered deprecated.
If an outdated DLL file is detected on your DMA, this indicates the use of an old file version, which may pose a potential security risk. In this event, you should always remove the DLL file.
If a deprecated DLL file is detected on your DMA, the file version does not pose a security risk. However, we recommend removing the DLL file regardless to avoid potential future problems.
Metadata
- Name: Check Deprecated DLL Usage
- Description: Checks if any protocols and automation scripts use deprecated DLLs (MySql.Data.dll or SLDatabase.dll)
- Author: Skyline Communications
- Default schedule: Every 7 days
Results
Success
Result message: No issues detected.
Error
An outdated DLL file was detected.
Result message:
Outdated X.dll (version x.x.x.x) at Y detected.Impact: The outdated X.dll file could pose a security risk, potentially exposing vulnerabilities in the system. It could also lead to problems in future DataMiner versions, as an upgrade may remove the DLL file.
Corrective action:
Stop the DataMiner Agent.
Remove the X.dll file from the Y folder.
Important
- The DLL file must be removed from every Agent in the cluster. Otherwise, synchronization between DataMiner Agents may restore the file.
- When you remove the mentioned DLL file, we strongly recommend keeping a temporary copy and checking the DataMiner log files Errors and Errors in Protocol for lines mentioning missing references to the file when a QAction or an automation script is executed.
Start the DataMiner Agent.
One or multiple protocols and/or automation scripts still use an outdated DLL file.
Result message:
Outdated Q.dll (version x.x.x.x) detected, along with the use of R.dllorOutdated Q.dll (version x.x.x.x) detected. Deprecated S.dll at T along with the use of R.dllImpact: The outdated Q.dll file could pose a security risk, potentially exposing vulnerabilities in the system. It may also cause future DataMiner upgrades to fail when the BPA test detects that the DLL file is still in use.
Corrective action:
Click the ellipsis button ("...") next to the error message to access an overview of all protocols and automation scripts that still use the outdated/deprecated DLL file.
This overview contains the names and versions of the protocols that use the file, including the IDs and QActions in which this file is referenced, as well as the names of the automation scripts that use the file.
Example:
{ "Protocols": [ { "Protocol": "Generic Network Services Monitor/1.0.0.11", "QActions": [ { "Id": "3", "Deprecated DLLs": [ "MySql.Data.dll" ] } ] }, { "Protocol": "iDirect Platform/10.0.1.60", "QActions": [ { "Id": "1", "Deprecated DLLs": [ "SLDatabase.dll", "MySql.Data.dll" ] }, { "Id": "2", "Deprecated DLLs": [ "SLDatabase.dll" ] } ] } ], "AutomationScripts": [ { "Name": "DeprecatedDllScript", "Deprecated DLLs": [ "SLDatabase.dll", "MySql.Data.dll" ] }, { "Name": "CheckDatabaseConfiguration", "Deprecated DLLs": [ "MySql.Data.dll" ] } ] }Replace every reference to an outdated/deprecated DLL with a NuGet. See Replacing Deprecated DLLs with NuGet Packages.
Stop the DataMiner Agent.
Remove the outdated/deprecated DLL file(s) from their folder(s) (mentioned in the result message).
Important
- Only remove the DLL files mentioned on the locations of Q.dll and/or S.dll in the placeholder message. DLLs only mentioned in the message at the placeholder R.dll should no longer be used but are definitely not safe to delete.
- The DLL file must be removed from every Agent in the cluster. Otherwise, synchronization between DataMiner Agents may restore the file.
- When you remove a DLL file, we strongly recommend keeping a temporary copy and checking the DataMiner log files Errors and Errors in Protocol for lines mentioning missing references to the file when a QAction or an automation script is executed.
Start the DataMiner Agent.
Warning
A deprecated DLL file was detected in the ProtocolScripts folder.
Result message:
Deprecated X.dll at Y detected.Impact: The deprecated X.dll file could lead to problems in future DataMiner versions, as an upgrade may remove the DLL file.
Corrective action:
Stop the DataMiner Agent.
Remove the X.dll file from the
C:\Skyline DataMiner\ProtocolScriptsfolder.Important
- The DLL file must be removed from every Agent in the cluster. Otherwise, synchronization between DataMiner Agents may restore the file.
- When you remove the DLL file, we strongly recommend keeping a temporary copy and checking the DataMiner log files Errors and Errors in Protocol for lines mentioning missing references to the file when a QAction or an automation script is executed.
Start the DataMiner Agent.
One or multiple protocols and/or automation scripts still use a deprecated DLL file.
Result message:
Detected the usage of deprecated X.dll.orDeprecated Y.dll detected along with the usage of X.dllImpact: The deprecated X.dll file could lead to problems in future DataMiner versions, as DataMiner upgrades may fail when the BPA test detects that the DLL file is still in use.
Corrective action:
Click the ellipsis button ("...") next to the error message to access an overview of all protocols and automation scripts that still use the deprecated DLL file.
This overview contains the names and versions of the protocols that use the file, including the IDs and QActions in which this file is referenced, as well as the names of the automation scripts that use the file.
Example:
{ "Protocols": [ { "Protocol": "Generic Network Services Monitor/1.0.0.11", "QActions": [ { "Id": "3", "Deprecated DLLs": [ "MySql.Data.dll" ] } ] }, { "Protocol": "iDirect Platform/10.0.1.60", "QActions": [ { "Id": "1", "Deprecated DLLs": [ "SLDatabase.dll", "MySql.Data.dll" ] }, { "Id": "2", "Deprecated DLLs": [ "SLDatabase.dll" ] } ] } ], "AutomationScripts": [ { "Name": "DeprecatedDllScript", "Deprecated DLLs": [ "SLDatabase.dll", "MySql.Data.dll" ] }, { "Name": "CheckDatabaseConfiguration", "Deprecated DLLs": [ "MySql.Data.dll" ] } ] }Replace every reference to a deprecated DLL with a NuGet. See Replacing Deprecated DLLs with NuGet Packages.
Stop the DataMiner Agent.
Remove the Y.dll file from the
C:\Skyline DataMiner\ProtocolScriptsfolder.Important
- Only delete the DLLs located at the location of placeholder Y.dll. The DLLs only mentioned at the placeholder X.dll are definitely not safe for deletion.
- The DLL file must be removed from every Agent in the cluster. Otherwise, synchronization between DataMiner Agents may restore the file.
- When you remove the DLL file, we strongly recommend keeping a temporary copy and checking the DataMiner log files Errors and Errors in Protocol for lines mentioning missing references to the file when a QAction or an automation script is executed.
Start the DataMiner Agent.
Not Executed
Could not execute test due to {ExceptionMessage}
Click the ellipsis ("...") next to the result message to access more information about the exception.
Limitations
The BPA test can only detect whether the DLL file is referenced directly. For example, if a QAction contains a reference to a particular DLL that references the deprecated or outdated DLL file, the BPA cannot detect this.
Replacing deprecated DLLs with NuGet packages
MySql.Data.dll
You can replace MySql.Data.dll with the MySql.Data Nuget. This NuGet should be a drop-in replacement as it exposes the same namespace and functions.
SLDatabase.dll
Depending on the database that SLDatabase was used to communicate with, a different NuGet package is necessary.
The QAction or automation script will need to be adapted, as each NuGet exposes different functions and ways to interact with a database.
The following list of NuGet packages can be a good start for replacing the SLDatabase.dll:
DataMinerMessageBroker.API.dll
Update the DataMinerMessageBroker NuGet reference in your connector or automation script to at least the minimum non-deprecated version, and verify that all functionality continues to work.
If any functionality is affected by changes in the NuGet package, update your code accordingly.