Академический Документы
Профессиональный Документы
Культура Документы
Manual
COMMANDbatch V1.7.3.0 & Later
5/20/14
www.commandalkon.com
2 5/20/14
Contents
Contents ........................................................................................ 3
Introduction .................................................................................. 4
Purpose ................................................................................................ 4
Audience ............................................................................................... 4
Revision Summary ................................................................................. 4
Index ........................................................................................... 41
5/20/14 3
Introduction
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
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.
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.
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.
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.
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.
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.
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.
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.
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).
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.
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!
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:
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.
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.
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.
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.
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).
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.
See Also:
Online help for descriptions of fields on this form
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
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.
5/20/14 33
To Run the End of Day Process
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.
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.
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.
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
Caution!
DO NOT insert the CD containing the previous year’s
backups! If you do, that year’s data will be overwritten.
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.
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.
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