StarQuest Technical Documents

SQDR Plus: DB2 Activate Scripts

Last Update: 18 July 2017
Product: SQDR Plus
Version: 4.50 and later
Article ID: SQV00PL034


SQDR and SQDR Plus use local DB2 LUW databases for control and staging purposes.

Performance can often be improved by activating these databases when DB2 is started. The enclosed scripts use the Windows Task Scheduler to automatically activate all local DB2 databases at DB2 startup, including SQDRC (control database used by SQDR) and SQDRPn (per agent staging databases).

These scripts assume that they are located in the directory C:\ProgramData\StarQuest\SQDR\Tools\. Note that the directory C:\ProgramData may be hidden on Windows; use Tools (or Organize)/Folder Options/View/Hidden files and select Folders/Show hidden files and folders to view these folders in Explorer.


  • Download
  • Extract the contents of the zip file into a folder called C:\ProgramData\StarQuest\SQDR\Tools.
  • Start the Windows Task Scheduler from Administrative Tools
  • Select Import Task... from the Action menu and browse to ActivateDB2Databases.xml
  • On the General panel, select Change User or Group... and enter the name of a userID with sufficient authority to run the scripts; we recommend using the local db2admin user.
  • Make sure that the radio button Run whether the user is logged on or not is selected, that the checkbox Do not store password is unchecked, and the checkbox Run with highest privileges is checked (these are all default settings).
  • When you hit OK, you will be prompted for the password of the user that you entered.

This will create a scheduled task to activate the local DB2 databases when DB2 is started. Results are written to a log file in C:\ProgramData\StarQuest\SQDR\Tools.

You may need to manually deactivate the databases for some operations such as running offline backups or deleting a database that is no longer needed.



The information in technical documents comes without any warranty or applicability for a specific purpose. The author(s) or distributor(s) will not accept responsibility for any damage incurred directly or indirectly through use of the information contained in these documents. The instructions may need to be modified to be appropriate for the hardware and software that has been installed and configured within a particular organization.  The information in technical documents should be considered only as an example and may include information from various sources, including IBM, Microsoft, and other organizations.