Вы находитесь на странице: 1из 41

Database Maintenance

Manual
COMMANDbatch V1.7.3.0 & Later
5/20/14

Command Alkon Inc.


5168 Blazer Parkway
Dublin, Ohio 43017
1.800.624.1872
Fax: 614.793.0608
Part Number: 24981
© 2003-2014 Command Alkon Incorporated. All rights reserved.
Command Alkon Incorporated believes the statements contained herein are accurate as
of the date of publication of this document. HOWEVER, COMMAND ALKON
INCORPORATED HEREBY DISCLAIMS ALL WARRANTIES EITHER EXPRESSED OR IMPLIED,
INCLUDING WITHOUT LIMITATION ANY IMPLIED WARRANT OF MERCHANTABILITY OR
FITNESS FOR A PARTICULAR PURPOSE. In no event will Command Alkon Incorporated be
liable for any damages, including any lost profits, lost savings, or other incidental or
consequential damage arising out of the use of or inability to use any information
provided through this publication, even if Command Alkon Incorporated has been advised
of the possibility of such damages, or for any claim by any other party. Some states do
not allow the limitation or exclusion of liability or consequential damages, so the above
limitation may not apply.
This information is not intended to be an assertion of future action. The contents of this
document are for informational purposes only and are subject to change without notice.
Command Alkon Incorporated expressly reserves the right to change or withdraw current
products that may or may not have the same characteristics listed in this publication.
Should Command Alkon Incorporated modify its products in a way that may affect the
information contained in this publication, Command Alkon Incorporated assumes no
obligation whatever to inform any user of the modification.
This publication may contain technical inaccuracies or typographical errors. Command
Alkon Incorporated assumes no responsibility for any errors that may appear in this
manual. This publication is intended only for the direct benefit of users of Command
Alkon Incorporated products. This manual may not be used for any purposes other than
those for which it is provided. Information disclosed herein was originated by and is the
property of Command Alkon Incorporated, and, except for rights granted by written
consent, such information shall not be disclosed, disseminated, or duplicated in whole or
in part. Command Alkon Incorporated reserves all patent, proprietary, design,
manufacturing, use, and reproduction rights.

www.commandalkon.com

Command Alkon Incorporated


1800 International Park Drive, Suite 400
Birmingham, AL 35243-4232
(205) 879-3282

5168 Blazer Parkway


Dublin, OH 43017-1339
(614) 799-6650
For a list of all Command Alkon locations, go to:
http://www.commandalkon.com/locations.asp
COMMANDseries (and the names of its components, such as COMMANDconcrete and
COMMANDnetwork), Spectrum, Eagle, and COMMANDbatch are registered trademarks of
Command Alkon Incorporated. All rights reserved.
Windows is a registered trademark of Microsoft Corporation in the United States and
other countries.
Hydro-Control is a registered trademark of Hydronix Limited, United Kingdom.
Verifi is a registered trademark of RS Solutions, Cincinnati, Ohio, USA.

2 5/20/14
Contents

Contents ........................................................................................ 3

Introduction .................................................................................. 4
Purpose ................................................................................................ 4
Audience ............................................................................................... 4
Revision Summary ................................................................................. 4

Database Utilities ........................................................................... 6


Opening the DBUtility ............................................................................. 7
Install New Database .............................................................................. 8
Upgrade Database ................................................................................ 10
Restore Databases ............................................................................... 12
Restoring an End of Year Database ......................................................... 14
Apply Database Patches ........................................................................ 15
BackUp Databases ................................................................................ 16
Archive Database ................................................................................. 18
Purge Database ................................................................................... 19
End of Year Maintenance ....................................................................... 20
Repair Users ........................................................................................ 22
Verify Database(s) Integrity ................................................................... 23
Database Maintenance .......................................................................... 24
Reset CPM Sync Values ......................................................................... 25
Precision Water System Maintenance ...................................................... 26
Start or Stop Services ........................................................................... 27
Applying SQL Update Scripts .................................................................. 28
Configuring COMMANDbatch User Login .................................................. 29

Archive Control Form ................................................................... 30


Automatic Database Maintenance Functions ............................................. 31

End-Of Processes ......................................................................... 32


End of Day Process ............................................................................... 32
End of Week Process ............................................................................. 35
End of Month Process ............................................................................ 36
End of Year Process .............................................................................. 36
Database Backup Options ...................................................................... 40

Index ........................................................................................... 41

5/20/14 3
Introduction

Topics in This Section


Purpose
Audience
Revision Summary

Purpose
This document describes how to use the DB Utility to perform database
maintenance functions. It also describes how to run End of Day/Week/Month/
Year processes and configure Auto Archive, Auto Purge, and Auto Backup.

Audience
This guide is intended to be used by Command Alkon installation and service
personnel, as well as plant personnel authorized to install and configure
COMMANDbatch.

Revision Summary

Date Version Revision


Jan. 11, 2005 1.03 Document created.
Feb. 17, 2005 1.03 Revised End of Year section per QA review.
Feb. 18, 2005 1.03 Revised document per QA’s 2nd review.
Oct. 18, 2005 1.04.231 Added section on setting up Archive Control for
End of Day process.
Sep. 29, 2006 1.06 Document completely rewritten to explain all
database maintenance functions in a more
useful format.
Mar. 1, 2007 1.06 • Section on the Archive Control form has
been updated to include information on
Auto Archive and Purge.
• Section on Database Utilities has been
revised to emphasize setup and operation.
Jun. 4, 2008 1.07.01 • Documented new DB Utility actions (Verify
Database Integrity, Start/Stop Services).
• Revised End of Processes section and
included a note about backing up to thumb
drives.
Jul. 31, 2008 1.7.3.0 Revised the Database Backup Options section
to show the -m argument for ebcdburn.exe.

4 5/20/14
Oct. 14, 2008 1.7.3.0 Changed the version number on the title page
to read “V1.7.3.0 & Later”.
Jan. 13, 2009 1.7.5.5 Corrected the End of Year Process section. The
EBATCH_FORMS database is not backed up
and the EBATCH_ARCHIVE database is
renamed EBATCH_YEAR_(current year).
Jun. 23, 2010 1.7.10.1 Added bullet items to the Restore and
Database Maintenance sections about
database integrity checks being run.
Jan. 31, 2011 1.8.1.0 Added sections describing the “Reset CPM
Sync Values” and “Precision Water System
Maintenance” database actions.
Jul. 5, 2011 1.8.1.3 Added sections on restoring EOY databases
and configuring the COMMANDbatch user
login.
Jun. 10, 2013 1.8.5.3 Made it clear that Automatic Functions do not
replace the End of Day process.
May 20, 2014 1.8.9.0 Added a section on applying SQL update
scripts via the DBUtility.

5/20/14 5
Database Utilities

Using the DBUtility, you can manually install, upgrade, back up, restore, and
patch databases. You can also perform other database actions like purging
and archiving databases, repairing users, starting and stopping services, and
applying SQL update scripts to databases.
Regular database maintenance tasks such as archiving, purging, and backups
should be performed each day as part of the End-Of Processes. These
processes can also be set up on the Archive Control Form to run
automatically.

Topics
Opening the DBUtility
Install New Database
Upgrade Database
Restore Databases
Restoring an End of Year Database
Apply Database Patches
BackUp Databases
Archive Database
Purge Database
End of Year Maintenance
Repair Users
Verify Database(s) Integrity
Database Maintenance
Reset CPM Sync Values
Precision Water System Maintenance
Start or Stop Services
Applying SQL Update Scripts
Configuring COMMANDbatch User Login

6 5/20/14
Opening the DBUtility
Note: The DBUtility cannot be accessed unless COMMANDbatch is
installed.

1. Double click the DBUtility icon on the Windows desktop.

The DBUtility Login window appears.


DBUtility Login Window

2. Enter your password and click Login.


The DBUtility opens.

5/20/14 7
Install New Database
This action installs new application, forms, or archive databases (EBATCH,
EBATCH_FORMS, and EBATCH_ARCHIVE) over the existing databases.

Caution!
This action installs blank EBATCH and EBATCH_ARCHIVE
databases. Make sure this is what you want to do!
This action should only be performed by Command Alkon
service personnel to create test databases.
DO NOT use this action to replace or restore a database!
Perform the Restore Databases action instead.

To Install New Databases:


1. Make sure all users are logged out. If they are not, you will
receive a “Users Detected Logged Onto Server” message when
you start the action.
At that point your options are:
— Click Recheck to see if the users have logged out.
— Click Continue to close the users’ connections and continue with the
database action.
— Click Cancel to stop the database action.
2. Open the DBUtility.
3. In the Select Database Action field, select “Install New
Database(s)”.
4. Leave the Run Upgrade Script(s) and Run Patch Script(s) options
checked.
5. Leave the Run Collation Script(s) option checked.
6. The “Include” boxes for the EBATCH, EBATCH_FORMS, and
EBATCH_ARCHIVE databases are checked by default but you can
uncheck the box for any database you don’t want to install.
7. Leave the path in the Database File(s) Path field set to
C:\Program Files\Microsoft SQL Server\MSSQL.1\MSSQL\Data.
8. Click the “Perform Action” button.
A message is displayed for each existing database to let you know that it
is already installed. You can receive up to three messages, one for each
database (EBATCH, EBATCH_FORMS, and EBATCH_ARCHIVE).
9. Click Yes to overwrite the existing database.
The Install New Database(s) action continues:
— The system gets the data file names and paths from SQL, builds the
Data and Log data file paths.

8 5/20/14
— Services (DTNS, ProtocolManager, PrintTicket, etc.) are stopped.
— Blank data is installed in the EBATCH and EBATCH_ARCHIVE
databases from the ebatch_base file.
— The most recent forms data is copied from the ebatchForms file
over the old EBATCH_FORMS database.
— Each database is collated. Normally, collation is only needed when
COMMANDbatch is installed on PCs with different regional settings.
Collation aligns the sort order for the PC, SQL, and COMMANDbatch.
— Upgrade scripts and patches are applied.
— Repair Users is run against the EBATCH database to fix any broken
mappings between SQL logins and SQL database users and to
realign encrypted passwords.
— Services (DTNS, ProtocolManager, PrintTicket, etc.) are restarted.
10. When “Starting services... completed!” is displayed in the Logging
section of the DBUtility window, click Exit to close the DBUtility,
or select another database action.

5/20/14 9
Upgrade Database
This action updates the EBATCH and EBATCH_FORMS databases used by the
server and all client PCs. Normally, these databases are upgraded when a new
version of COMMANDbatch is installed. However, if one or both databases is/
are not available at install time, you can run this action when the database(s)
become(s) available.

Caution!
DO NOT use this action to replace or restore a database!
Perform the Restore Databases action instead.

To Upgrade Databases:
1. Make sure all users are logged out. If they are not, you will
receive a “Users Detected Logged Onto Server” message when
you start the action.
At that point your options are:
— Click Recheck to see if the users have logged out.
— Click Continue to close the users’ connections and continue with the
database action.
— Click Cancel to stop the database action.
2. Open the DBUtility.
3. In the Select Database Action field, select “Upgrade
Database(s)”.
4. Leave the Run Collation Script(s) option checked.
5. If you want to upgrade the End of Year database (last year’s
archive), leave the Detect EOY Database(s) option checked.
6. Leave the Run Patch Script(s) option checked.
7. The “Include” boxes for the EBATCH, EBATCH_FORMS, and
EBATCH_ARCHIVE databases are checked by default but you can
uncheck the box for any database you don’t want to upgrade.
8. By default, databases are backed up to the C:\Program
Files\COMMANDbatch\Custom\DBBackup directory. If you need
to back up to a different location, click the button and browse
for the appropriate folder.
9. Click the “Perform Action” button.
The following happens:
— The system gets the data file names and paths from SQL, builds the
Data and Log data file paths.
— Services (DTNS, ProtocolManager, PrintTicket, etc.) are stopped.

10 5/20/14
— Each database is shrunk, indexes are rebuilt, and the databases are
backed up.
— Each database is collated. Normally, collation is only needed when
COMMANDbatch is installed on PCs with different regional settings.
Collation aligns the sort order for the PC, SQL, and COMMANDbatch.
— Upgrade scripts and patches are applied.
— Repair Users is run against the EBATCH database to fix any broken
mappings between SQL logins and SQL database users and to
realign encrypted passwords.
— MyMenu Maintenance is run to copy the menu bar settings (forms
listed on the left side of the COMMANDbatch screen) from the old
EBATCH_FORMS database to the new one.
— The new EBATCH_FORMS database is installed.
— Services (DTNS, ProtocolManager, PrintTicket, etc.) are restarted.

5/20/14 11
Restore Databases
This action can be used to restore any of the following databases used by the
server and all client PCs: EBATCH, EBATCH_FORMS, EBATCH_ARCHIVE.
Examples of when you might restore a database are:
• to replace a corrupt database
• to roll back to an earlier database version

Caution!
This action should only be performed by Command Alkon
service personnel.

To Restore Databases:
1. Make sure all users are logged out. If they are not, you will
receive a “Users Detected Logged Onto Server” message when
you start the action.
At that point your options are:
— Click Recheck to see if the users have logged out.
— Click Continue to close the users’ connections and continue with the
database action.
— Click Cancel to stop the database action.
2. Open the DBUtility.
3. In the Select Database Action field, select “Restore Database(s)”.
4. Leave the Run Collation Script(s), Run Upgrade Script(s), and Run
Patch Script(s) options checked.
5. In the “Database file to restore” fields, select the backup
database files to be restored over the current databases.

The default path and filenames are:

For the EBATCH database:


C:\Program Files\COMMANDbatch\Custom\DBBackup\EBATCH.BAK

For the EBATCH_FORMS database:


C:\Program Files\COMMANDbatch\Custom\DBBackup\EBATCH_FORMS.BAK

For the EBATCH_ARCHIVE database:


C:\Program Files\COMMANDbatch\Custom\DBBackup\EBATCH_ARCHIVE.BAK
6. Click the “Perform Action” button.
A message is displayed for each existing database to let you know that it
is already installed. You can receive up to three messages, one each for
the EBATCH, EBATCH_FORMS, and EBATCH_ARCHIVE databases.

12 5/20/14
7. Click Yes to overwrite the existing databases.
The Restore Database(s) action continues:
— The system gets the data file names and paths from SQL, builds the
Data and Log data file paths.
— Services (DTNS, ProtocolManager, PrintTicket, etc.) are stopped.
— Each database is restored.
— Database integrity checks are run to verify that the databases are in
working properly.
— Each database is collated. Normally, collation is only needed when
COMMANDbatch is installed on PCs with different regional settings.
Collation aligns the sort order for the PC, SQL, and COMMANDbatch.
— Upgrade scripts and patches are applied.
— Repair Users is run against the EBATCH database to fix any broken
mappings between SQL logins and SQL database users and to
realign encrypted passwords.
— Services (DTNS, ProtocolManager, PrintTicket, etc.) are restarted.
8. When “Starting services... completed!” is displayed in the Logging
section of the DBUtility window, click Exit to close the DBUtility,
or select another database action.

5/20/14 13
Restoring an End of Year Database
1. Make sure all users are logged out. If they are not, you will
receive a “Users Detected Logged Onto Server” message when
you start the action.
At that point your options are:
— Click Recheck to see if the users have logged out.
— Click Continue to close the users’ connections and continue with the
database action.
— Click Cancel to stop the database action.
2. Open the DBUtility.
3. In the Select Database Action field, select “Restore Database(s)”.
4. Leave the Run Collation Script(s), Run Upgrade Script(s), and Run
Patch Script(s) options checked.
5. Type the database name in the “DATA Database to Restore to”
field (i.e. EBATCH_YEAR_2010) and check this field’s Include box.
6. Uncheck the Include boxes for the FORMS and ARCHIVE
databases.

7. Click the “Perform Action” button.


A message is displayed saying the database is already installed.
8. Click Yes to clear the message.
The Restore Database(s) action continues:
9. If COMMANDbatch had to be installed from scratch, create a new
COMMANDbatch Configuration (see Configuring COMMANDbatch
User Login).

14 5/20/14
Apply Database Patches
This action applies the latest patch(es) to the EBATCH and EBATCH_FORMS
databases used by the server and all client PCs. SQL patch files are located
under C:\Program Files\COMMANDbatch\Scripts\.
Normally, patches are applied when a new version of COMMANDbatch is
installed. However, if one or both databases is/are not available at install
time, you can run this action when the database(s) become(s) available.

To Apply Database Patches:


1. Make sure all users are logged out. If they are not, you will
receive a “Users Detected Logged Onto Server” message when
you start the action.
At that point your options are:
— Click Recheck to see if the users have logged out.
— Click Continue to close the users’ connections and continue with the
database action.
— Click Cancel to stop the database action.
2. In the Select Database Action field, select “Apply Database
Patches”.
3. Leave the Backup Database(s) First option checked.
4. The “Include” boxes for the EBATCH, EBATCH_FORMS, and
EBATCH_ARCHIVE databases are checked by default but you can
uncheck the box for any database you don’t want to patch.
5. By default, databases are backed up to the C:\Program
Files\COMMANDbatch\Custom\DBBackup\ directory. If you need
to back up to a different location, click the button beside the
Backup File(s) Path on Server field and browse for the
appropriate folder.
6. Click the “Perform Action” button.
The following happens:
— Services (DTNS, ProtocolManager, PrintTicket, etc.) are stopped.
— Each database is shrunk, indexes are rebuilt, and the databases are
backed up.
— Patches are applied.
— Repair Users is run against the EBATCH database to fix any broken
mappings between SQL logins and SQL database users and to
realign encrypted passwords.
— Services (DTNS, ProtocolManager, PrintTicket, etc.) are restarted.

5/20/14 15
BackUp Databases
This action backs up the EBATCH, EBATCH_FORMS, and EBATCH_ARCHIVE
databases used by the server and all client PCs. Data is backed up to the hard
drive.

Tip!
To back up to a CD, run the “Backup Databases” section of the
End of Day utility on the Reports/Utilities form.

Normally, backups are accomplished during the End of Day process. However,
there may be other times when you want to perform backups. An example
might be when new SQL scripts are being applied--you would want to back up
the databases first.

To Back Up Databases:
1. Make sure all users are logged out. If they are not, you will
receive a “Users Detected Logged Onto Server” message when
you start the action.
At that point your options are:
— Click Recheck to see if the users have logged out.
— Click Continue to close the users’ connections and continue with the
database action.
— Click Cancel to stop the database action.
2. In the Select Database Action field, select “Backup Database(s)”.
3. The “Include” boxes for the EBATCH, EBATCH_FORMS, and
EBATCH_ARCHIVE databases are checked by default but you can
uncheck the box for any database you don’t want to back up.
4. By default, databases are backed up to the C:\Program
Files\COMMANDbatch\Custom\DBBackup\ directory. If you need
to back up to a different location, click the button and browse
for the appropriate folder.
5. Click the “Perform Action” button.
The following happens:
— The system gets the data file names and paths from SQL, builds the
Data and Log data file paths.
— Services (DTNS, ProtocolManager, PrintTicket, etc.) are stopped.
— MyMenu Maintenance is run to copy the menu bar settings (forms
listed on the left side of the COMMANDbatch screen) from the old
EBATCH_FORMS database.
— Each database is shrunk, indexes are rebuilt, and the databases are
backed up.

16 5/20/14
— Services (DTNS, ProtocolManager, PrintTicket, etc.) are restarted.
6. When “...done!” is displayed in the Logging section of the
DBUtility window for each database being backed up, click Exit to
close the DBUtility, or select another database action.

5/20/14 17
Archive Database
This action is used to copy the EBATCH database to the EBATCH_ARCHIVE
database. Although this action is normally performed during the End of Year
process (and can be set to run automatically), there might be other times
when you want to archive data.

To Archive the EBATCH Database:


1. Make sure all users are logged out. If they are not, you will
receive a “Users Detected Logged Onto Server” message when
you start the action.
At that point your options are:
— Click Recheck to see if the users have logged out.
— Click Continue to close the users’ connections and continue with the
database action.
— Click Cancel to stop the database action.
2. In the Select Database Action field, select “Archive Database”.
3. Leave the EBATCH and EBATCH_ARCHIVE databases selected.
4. Click the “Perform Action” button.
The following happens:
— The system gets the data file names and paths from SQL, builds the
Data and Log data file paths.
— Services (DTNS, ProtocolManager, PrintTicket, etc.) are stopped.
— According to settings on the Archive Control form, EBATCH data is
copied to the EBATCH_ARCHIVE database under C:\Program
Files\COMMANDbatch\Custom\DBBackup.
— Services (DTNS, ProtocolManager, PrintTicket, etc.) are restarted.
5. When “with Purge... done!” is displayed in the Logging section of
the DBUtility window, click Exit to close the DBUtility, or select
another database action.

18 5/20/14
Purge Database
This action is used to delete old records from the EBATCH database. Although
this action is normally performed during the End of Day process (or can be set
to run automatically), you can run this action to manually reduce the size of
the database.

To Purge the EBATCH Database:


1. Make sure all users are logged out. If they are not, you will
receive a “Users Detected Logged Onto Server” message when
you start the action.
At that point your options are:
— Click Recheck to see if the users have logged out.
— Click Continue to close the users’ connections and continue with the
database action.
— Click Cancel to stop the database action.
2. In the Select Database Action field, select “Purge Database”.
3. Leave the EBATCH and EBATCH_ARCHIVE databases selected.
4. Click the “Perform Action” button.
The following happens:
— The system gets the data file names and paths from SQL, builds the
Data and Log data file paths.
— Services (DTNS, ProtocolManager, PrintTicket, etc.) are stopped.
— Data older than the number specified in the Days To Keep field of
the Archive Control form is purged from the EBATCH database under
C:\Program Files\COMMANDbatch\Custom\DBBackup.
— Services (DTNS, ProtocolManager, PrintTicket, etc.) are restarted.
5. When “...done!” is displayed in the Logging section of the
DBUtility window, click Exit to close the DBUtility, or select
another database action.

5/20/14 19
End of Year Maintenance
This action:
• Purges the EBATCH database and copies it to the EBATCH_ARCHIVE
database.
• Renames the EBATCH_ARCHIVE database to EBATCH_YEAR_year (where
“year” is the year entered on the End Of Year Database Maintenance
window.
• Copies the EBATCH database to create a new EBATCH_ARCHIVE.
Although this action is normally performed during the End of Year process,
there might be times when you want to branch the EBATCH_ARCHIVE
database without running End of Year reports.

To Perform Database Maintenance:


1. Make sure all users are logged out. If they are not, you will
receive a “Users Detected Logged Onto Server” message when
you start the action.
At that point your options are:
— Click Recheck to see if the users have logged out.
— Click Continue to close the users’ connections and continue with the
database action.
— Click Cancel to stop the database action.
2. In the Select Database Action field, select “EOY Maintenance”.
3. Leave the EBATCH and EBATCH_ARCHIVE databases selected as
the Forms and Archive databases, respectively.
4. Click the “Perform Action” button.
The following happens:
The following window appears with EBATCH_YEAR_(current year)
displayed in the Database Name box.

20 5/20/14
EOY Database Maintenance window

• If you are running the EOY process on or before the end of the year, click
Accept.
• If you are running the EOY process at the beginning of a new year
(example: January 6, 2007), change the year in the Database Name box
to the previous year (example: 2006). Then click Accept.
Once you click Accept, End of Year Maintenance continues and the
following happens:
— Services (DTNS, ProtocolManager, PrintTicket, etc.) are stopped.
— The EBATCH database is archived, shrunk, and rebuilt.
— The EBATCH and EBATCH_ARCHIVE databases are backed up.
— The EBATCH_ARCHIVE database is renamed
EBATCH_ARCHIVE_year (where “year” is the year entered on the
End Of Year Database Maintenance window).
— A new EBATCH_ARCHIVE database is created from the EBATCH
database.
— Services (DTNS, ProtocolManager, PrintTicket, etc.) are restarted.
5. When “...done!” is displayed in the Logging section of the
DBUtility window, click Exit to close the DBUtility, or select
another database action.

5/20/14 21
Repair Users
This action is run against the EBATCH database to fix any broken mappings
between SQL logins and SQL database users and to realign encrypted
passwords. Repair Users can also be run as part of other database utilities
(install new database, upgrade, restore, and backup).

To Repair Users in the EBATCH Database:


1. Open the DBUtility.

2. In the Select Database Action field, select “Repair Users”.


3. Leave EBATCH selected as the database to repair users.
4. Click the “Perform Action” button.
The following happens:
— The system gets the data file names and paths from SQL, builds the
Data and Log data file paths.
— Services (DTNS, ProtocolManager, PrintTicket, etc.) are stopped.
— Repair Users is run against the EBATCH database.
— Services (DTNS, ProtocolManager, PrintTicket, etc.) are restarted.
5. When “...done!” is displayed in the Logging section of the
DBUtility window, click Exit to close the DBUtility, or select
another database action.

22 5/20/14
Verify Database(s) Integrity
This action does the same thing as SQL’s DBCC CHECKTABLE command. It
checks tables and indexed views and verifies that:
• Index and data pages are correctly linked.
• Indexes are in their proper sort order.
• Pointers are consistent.
• The data on each page is reasonable.
• Page offsets are reasonable.

To Verify Database Integrity:


1. Open the DBUtility.

2. In the Select Database Action field, select “Verify Database(s)


Integrity”.
3. The “Include” box for the EBATCH database is checked by default
but you can include the EBATCH_FORMS and/or
EBATCH_ARCHIVE database(s) as well.
4. Click the “Perform Action” button.
The following happens:
— The system gets the data file names and paths from SQL, builds the
Data and Log data file paths.
— Services (DTNS, ProtocolManager, PrintTicket, etc.) are stopped.
— The DBCC CHECKTABLE command is run as described above.
— Services (DTNS, ProtocolManager, PrintTicket, etc.) are restarted.
5. When “...done!” is displayed in the Logging section of the
DBUtility window, click Exit to close the DBUtility, or select
another database action.

5/20/14 23
Database Maintenance
This action is used to shrink and rebuild the databases and rebuild indexes.
Although this action is normally performed during upgrades, restores, and
other database actions, there might be other times when space needs to be
reclaimed or performance needs to be improved.

Caution!
Make sure all users are logged out of the system before
you perform this action. Failure to do so can cause
database corruption!

To Perform Database Maintenance:

1. Open the DBUtility.


2. In the Select Database Action field, select “Database
Maintenance”.
3. The “Include” boxes for the EBATCH, EBATCH_FORMS, and
EBATCH_ARCHIVE databases are checked by default but you can
uncheck the box for any database you don’t want to exclude from
maintenance.
4. Click the “Perform Action” button.
The following happens:
— The system gets the data file names and paths from SQL, builds the
Data and Log data file paths.
— Services (DTNS, ProtocolManager, PrintTicket, etc.) are stopped.
— Database integrity checks are run to verify that the databases are in
working properly.
— Each database is shrunk, indexes are rebuilt, and the databases are
backed up.
— Services (DTNS, ProtocolManager, PrintTicket, etc.) are restarted.
5. When “Starting services... completed!” is displayed in the Logging
section of the DBUtility window, click Exit to close the DBUtility,
or select another database action.

24 5/20/14
Reset CPM Sync Values
This action resets EDXIDs for Drivers, Trucks, Materials and Mixes to null. It
also resets to null the dates these items are synced or updated. By default, it
also backs up the EBATCH database.

Note: EDXIDs are used with the Concrete Production Manager (CPM)
which allows ticket and production data to be shared by Command
Alkon systems such as dispatch and batch control.

To Reset EDXIDs:

1. Open the DBUtility.

2. In the Select Database Action field, select “Reset CPM Sync


Values”.
3. Leave the Backup Database(s) First option checked.
4. Click the “Perform Action” button.
5. When “...done!” is displayed in the Logging section of the
DBUtility window, click Exit to close the DBUtility, or select
another database action.

Tip!
You can also reset EDXIDs during a Restore Database(s) action by
checking the “Reset CPM Sync Values” box that is made visible.

5/20/14 25
Precision Water System Maintenance
This action can only be used if you have purchased the Precision Water
System (PWS) from Command Alkon. This action is used to install, upgrade,
backup or restore the PWS database.

1. Open the DBUtility and select “Precision Water System


Maintenance” in the Select Database Action field.

2. Select the appropriate option (install, upgrade, backup, restore).


3. Click the “Perform Action” button.
4. When “Starting services... completed!” is displayed in the Logging
section of the DBUtility window, the action is complete. Click Exit
to close the DBUtility.

Note: Backups of the PWS database are automatically performed


through the COMMANDbatch End of Day process.

See Also:
Precision Water System (COMMANDbatch) Setup Guide

26 5/20/14
Start or Stop Services
These actions allow you to stop and start services (DTNS, ProtocolManager,
PrintTicket, etc.) without having to navigate to your PC’s Services folder.

To Start or Stop Services:

1. Open the DBUtility.

2. In the Select Database Action field, select the action you want to
perform “Start Services” or “Stop Services”.
3. Click the “Perform Action” button.
Services (DTNS, ProtocolManager, CBManager, PrintTicket, etc.) are
started or stopped, depending on the action you selected in step 2.
“Stopping services... completed!” or “Starting services... completed!” is
displayed in the Logging section of the DBUtility window.
4. Click Exit to close the DBUtility, or select another database action.

5/20/14 27
Applying SQL Update Scripts
The DBUtility provides a simpler method of applying database update scripts
than having to open a session of SQL and run the script against each
database.

To apply SQL update scripts using the DBUtility:

1. Open the DBUtility and select “Select SQL Update Script…” as the
database action.

2. In the Windows file open dialog, select the appropriate SQL file
and click “Open”.
3. Select the database(s) to be updated.
4. Click the “Perform Action” button.
The following happens:
— The SQL update script is run against the selected database(s).
— Results of the update are displayed in the DBUtility's Logging
window and saved to the DBUitlity.log.

28 5/20/14
Configuring COMMANDbatch User Login
1. Select Start > Programs > COMMANDbatch > COMMANDbatch
Configuration.

The COMMANDbatch Configuration window appears.

2. In the Configurations list at the left, select or create a


configuration (example: EBATCH).
3. On the right side of the window, make sure the Host PC name is
entered for the Application SQL Server and the Forms SQL Server.
4. In the Application Database field, select the appropriate database
(example: EBATCH).
5. In the Forms Database field, enter EBATCH_FORMS.
6. Make sure sa is entered in both the Security User ID and Forms
User ID fields. It should already be there by default.
7. Enter the sa password in both the Security User Password and
Forms Password fields.
8. Click Save then close the COMMANDbatch Configuration form.

5/20/14 29
Archive Control Form

The Archive Control form allows COMMANDbatch data from the EBATCH
database to be archived into the EBATCH_ARCHIVE database each time the
Archive process runs as part of the End of Day process.
The Auto Archive, Auto Purge, and Auto Backup features are designed to allow
a plant to run continously without having to do database maintenance as part
of an End of Day procedure. If enabled, the Auto Archive, Auto Purge, or Auto
Backup processes are performed throughout the day at a time when
COMMANDbatch is considered idle (see Automatic Database Maintenance
Functions).

Recommended Settings for Archive Control

Top Part of Form


Settings in this section enable/disable archive control and determine whether
drop history, inventory transactions, and ticket data will be archived. Other
settings control how many days worth of data to keep and purge, and when
the “maintenance required” warning message appears.

30 5/20/14
Auto Archive Purge Section
Settings in this section of the Archive Control form determine how and when
the Auto Archive and Auto Purge functions run.

Auto Backup Section


Settings in this section of the Archive Control form determine how and when
the Auto Backup function is run.

See Also:
Online help for descriptions of fields on this form

Automatic Database Maintenance Functions


Automatic database maintenance functions are only performed when all of the
following conditions are true:
• One or more of the following auto flags is enabled (Auto Archive, Auto
Purge, or Auto Backup).
• No batches are currently running.
• CPU load on the system is below the Min CPU Load value.
As soon as one of the above conditions becomes false, the automatic function
becomes disabled and waits until the next idle time to continue. For example,
when Auto Archive is running and a user starts a load, Auto Archive becomes
temporarily disabled. Once the batch is complete and the CPU load is below
the Min CPU Load value, Auto Archive continues.

Notes: • The Auto Archive, Auto Purge, and Auto Backup do not replace
the End of Day process; however, they will shorten the time spent
on archiving and purging when the End of Day process is run.
• If both Auto Archive and Auto Backup are enabled, the
EBATCH_ARCHIVE database will be backed up whenever DTNS
starts up and every 24 hours afterwards.

5/20/14 31
End-Of Processes

“End-Of” processes allow you to run daily, weekly, monthly, and yearly
reports then archive, purge, and back up the databases. These processes help
ensure that the database does not get too large, that regular backups are
performed, and that you have regular inventory and mix production reports.

Tip!
Settings on the Archive Control form control how Archive and
Purge and other End of Day functions operate.

Topics
End of Day Process
End of Week Process
End of Month Process
End of Year Process
Database Backup Options

End of Day Process


COMMANDbatch is shipped with an End of Day process already set up. It
includes the Material Inventory report, the Mix Production report, and backup
routines for the COMMANDbatch databases. Authorized users can modify the
End of Day process so that it includes other reports or utilities.
Note: In a dual-plant environment, the End of Day process needs to
be executed from the Host PC.

The End of Day process:


• Runs daily material inventory and mix production reports.
• Archives and purges the EBATCH database then backs up all databases.
• Writes the backed up databases to CD-ROM. You can also back up to
other media such as a thumb drive or a local or network location. To do
this, edit the “Write Backups to CD” process step under Reports/Utilities
as explained in Database Backup Options.

32 5/20/14
(Dual Plants Only):
To cause the End of Day process to reboot both plants’ RTCs:
• On the Reports/Utilities form, select the End of Day process.
• At the bottom of Reports/Utilities, click “Modify Process Steps”.
• Select the Re-boot RTC process on the Process Steps form.
• Select the LookUp sequence and delete the text under the
Default column as shown in the following screen example.

• Save your changes and close the Process Steps form.


The second field of the Re-boot RTC section of the End of Day
process will now be blank. Previously, it contained “Sys1”, meaning
only the RTC for Sys1 would be rebooted. Now all RTCs will reboot.

5/20/14 33
To Run the End of Day Process

1. Insert a writable CD-ROM into the CD-RW drive. If a CD Writer


action box appears, click Cancel.

2. Open the Reports/Utilities form.


3. In the “Select Report/Process Group” section, select End of Day.
Processes for running the Material Inventory and Mix Production reports
and the database backup routines appear.
The default date range for reports is: (today’s date) to (today’s date).
4. In Printer field midway down the left side of the form, make sure
the report printer is selected. (Your system’s default printer is
selected by default.)
5. Click the “Run Group” button at the bottom of the form. (You
might need to scroll down to see this button.)

REPORTS
• If records are found for a report, the report is printed.
• If no records are found for a report, the following message appears.

DATABASE BACKUP
• The DBUtility window appears and the backup routine starts.
• The Forms, Application, and Archive databases are backed up to:
C:\Program Files\COMMANDbatch\Custom\DBBackup\
Examples of filenames for the backed up databases:
EBATCH_200802100927.bak
EBATCH_FORMS_200802100927.bak
EBATCH_ARCHIVE_200802100927.bak
where:
— EBATCH, EBATCH_FORMS, and EBATCH_ARCHIVE are the database
names
— 2008 is the Year
— 02 is the Month
— 10 is the Day

34 5/20/14
— 0927 is the Time

CD WRITING WIZARD
When the CD Writing Wizard window appears:
6. Enter a name for the CD (example: Jun03_2008) and click Next.
• The EBATCH, EBATCH_FORMS, and EBATCH_ARCHIVE backup files are
zipped up into a CBBackup.zip file (along with the contents of the
Custom folder except for Custom\DbBackup) and copied to the CD.
• A progress bar indicates how many minutes/seconds are left to complete
writing to CD.
• When writing to CD is complete, the CD-RW tray ejects, and a CD Writing
Wizard completion window appears.
7. Reclose the CD-RW tray and click Finish on the CD Writing Wizard.

Note: If you don’t close the CD-RW tray, the following message
prompts you to close it and click Retry - to verify the contents of
the CD.

8. Remove the CD and close the CD-RW tray.

RTC REBOOT
• A DOS window opens and the RTC is rebooted.
• When the reboot is finished, the End of Day process is completed and the
Description section at the top of the Reports/Utilities form displays:
Running...
Completed!

Tip!
Store the CD in a safe place and DO NOT use it for writing backups
again.

End of Week Process


The End of Week process is the same as the End of Day Process except:
• You select End of Week in the “Select Report/Process Group”.
• Reports are generated for the week.

5/20/14 35
• The RTC is NOT rebooted.
You can modify the End of Week process to include other reports or to back up
to other media such as a thumb drive or a local or network location.

End of Month Process


The End of Month process is the same as the End of Day Process except:
• You select End of Month in the “Select Report/Process Group”.
• Reports are generated for the month.
You can modify the End of Month process to include other reports or to back
up to other media such as a thumb drive or a local or network location.
• The RTC is NOT rebooted.

End of Year Process


Note: The standard End of Year process is described below. If you
need to modify this process, contact the Command Alkon
Service Department.

The End of Year process:


• Runs yearly material inventory and mix production reports.
• Archives and purges the EBATCH database.
• Backs up the EBATCH and EBATCH_ARCHIVE databases.
• Renames the backed up EBATCH_ARCHIVE database to
EBATCH_YEAR_(current year).
• Copies the EBATCH database to create a new EBATCH_ARCHIVE.
• Reruns Archive/Purge.
• The RTC is NOT rebooted.
• Allows you to write all backed up databases to CD-ROM.

Note: You can also back up to other media such as a thumb drive or a
local or network location. To do this, edit the “Write Backups to
CD” process step under Reports/Utilities as explained in
Database Backup Options.

COMMANDbatch is shipped with an EOY process already set up. It includes the
Material Inventory report, the Mix Production report, and a database backup
and EOY Maintenance routine. Authorized users can modify the End of Year
process so that it includes other reports.

36 5/20/14
To Run the End of Year Process

1. Insert a writable CD-ROM into the CD-RW drive. A CD Writer


action box appears. Click Cancel.

Caution!
DO NOT insert the CD containing the previous year’s
backups! If you do, that year’s data will be overwritten.

2. Open the Reports/Utilities form.


3. In the “Select Report/Process Group” section, select End of Year.
Processes for running reports, backing up the databases, and running the
EOY Maintenance routine appear on the right side of the form.
The date range for reports defaults to the first and last day of current
year. If you are running the EOY process at the beginning of a new year,
change these dates to the first and last day of the previous year.
4. In the Printer field midway down the left side of the form, make
sure the report printer is selected. (Your system’s default printer
is selected by default.)
5. Click the “Run Group” button at the bottom of the form.

END OF YEAR ROUTINE


The following window appears with EBATCH_YEAR_(current year) shown
as the Database Name.
EOY Maintenance window

6. As instructed, please read the information in the End of Year


Maintenance window.
7. If you are running the EOY process on or before the end of the
year you want to archive, click Accept.

5/20/14 37
If you are running the EOY process at the beginning of a new year
(example: January 6, 2009), you will need to change the year in the
Database Name box to the previous year (example: 2008). Then click
Accept.
The DbUtility (now active):
• Archives and purges databases.
• Backs up Application and Archive databases to:
C:\Program Files\COMMANDbatch\Custom\DBBackup\
• Renames EBATCH_ARCHIVE database to EBATCH_YEAR_(current year)
Backup database files are now:
EBATCH.bak
EBATCH_YEAR_(current year).bak

REPORTS
• If records are found for a report, the report is printed.
• If no records are found for a report, the following message appears.

CD WRITING WIZARD
When the CD Writing Wizard window appears:
8. Enter a name for the CD (example: EOY_BACKUP_2008) and click
Next.
• The EBATCH and EBATCH_YEAR_(current year) backup files are zipped
up into a CBBackup.zip file and copied to the CD.
• A progress bar indicates how many minutes/seconds are left to complete
writing to CD.
• When writing to CD is complete, the CD-RW tray ejects, and a CD Writing
Wizard completion window appears.

38 5/20/14
9. Reclose the CD-RW tray and click Finish on the CD Writing Wizard.

Note: If you don’t close the CD-RW tray, the following message
prompts you to close it and click Retry - to verify the contents of
the CD.

10. Remove the CD and close the CD-RW tray.


The End of Year process is now complete and the Description section at
the top of the Reports/Utilities form displays:
Running...
Completed!

Tip!
Store the CD in a safe place and DO NOT use it for writing backups
again.

5/20/14 39
Database Backup Options
Additional Backup Options can be used with the “Write Backups to CD”
process step of the End of Day/Week/Month/Year processes. For example, the
-u argument can be used to back up to a local or network drive.

By default, databases are backed up to CD using the following command:


ebcdburn.exe -x -c -sEBATCH EBATCH_FORMS EBATCH_ARCHIVE

The following example shows the command modified to back up to a D: drive:


ebcdburn.exe -x -c -sEBATCH EBATCH_FORMS EBATCH_ARCHIVE -q -m -u"D:\"

To edit the “Write Backups to CD” process step:

1. Select the End of Day group on Reports/Utilities.


2. Click the “Modify Process Steps” button at the bottom left of the
form to pull up the Process Steps form.
3. Scroll over to the Command column and click on ebcdburn.exe.
4. Press <Alt + E> to pull up the Expanded Text for Command
window.
5. Modify the text as needed then click OK.
6. Save your changes to the Process Steps form and close it.
Backup Options

40 5/20/14
Index

A
Archive Control 30
D
Database Utilities
Apply Database Patches 15
Applying SQL Update Scripts 28
Archive Database 18
BackUp Databases 16
Configuring COMMANDbatch User Login 29
Database Maintenance 24
End of Year Maintenance 20
Install New Database 8
Precision Water System Maintenance 26
Purge Database 19
Repair Users 22
Reset CPM Sync Values 25
Restore Databases 12
Restoring End of Year Database 14
Start or Stop Services 27
Starting the DB Utility 7
Upgrade Database 10
Verify Database Integrity 23
E
End of Processes
Backup Options 40
End of Day 32
End of Month 36
End of Week 35
End of Year 36
I
Introduction
Audience 4
Purpose 4
Revision Summary 4

5/20/14 41

Вам также может понравиться