Download as pdf or txt
Download as pdf or txt
You are on page 1of 16

USING MICROSOFT® SQL SERVER

with HP Web Jetadmin

CONTENTS
Overview..............................................................................................................................2
Introduction ...........................................................................................................................2
Migrating an existing HP Web Jetadmin database......................................................................2
Using local SQL Server database .............................................................................................3
Installing SQL Server ...........................................................................................................3
Creating a named instance ..................................................................................................4
Configuring HP Web Jetadmin to use the new database...........................................................5
Using remote SQL Server database...........................................................................................6
Named or default instance ...................................................................................................6
Configuring HP Web Jetadmin to use the new database...........................................................7
Migrating the HP Web Jetadmin database.................................................................................9
Preferred method ................................................................................................................9
Alternate method ................................................................................................................9
Troubleshooting ...................................................................................................................11
Database failover—SQL mirroring ..........................................................................................12
Performance settings.............................................................................................................13
Backup of HP Web Jetadmin configured for a remote database..................................................13
Summary ............................................................................................................................14
Appendix A—Installing the database connectivity module license ...............................................15
License process.................................................................................................................15
OVERVIEW
HP Web Jetadmin 10.x installs and uses by default a
database running under Microsoft SQL Express.
However, it may be more convenient for HP Web
Jetadmin to use SQL Server 2005/2008 for
performance benefits, and to avoid the SQL Express 4
GB database limitation. Fortunately, an existing
installation of Web Jetadmin 10.1 or greater can be
configured to use SQL Server instead of SQL Express as
long as SQL Server resides on the same machine. With
the addition of an optional database connectivity
module license, HP Web Jetadmin 10.2 SR1 or greater
can be configured to use an instance of SQL Server that
resides on a remote machine. This document will
describe how to create a named instance on an
installation of SQL Server, how to configure HP Web
Jetadmin to use that instance, and how to migrate an
HP Web Jetadmin database from SQL Express to SQL
Server if required.

Figure 1—Assign Network Service rights


INTRODUCTION
Whether installing a local or remote SQL Server, the steps to configure an HP Web Jetadmin
installation to use SQL Server are essentially the same:
1. Create a named instance
2. Create a new database
3. Modify HP Web Jetadmin to point to the new instance and database
Each HP Web Jetadmin installation must point to its own unique database. All downloads of HP Web
Jetadmin 10.1 and beyond will allow for connection to SQL Server on the same machine as HP Web
Jetadmin, but only HP Web Jetadmin 10.2 SR1 or greater with an optional license installed supports
a remote SQL Server instance.
NOTE Only SQL Server authentication is supported for remote SQL Server databases at this time.
Microsoft Windows® authentication is supported only for SQL Server on the same machine
as HP Web Jetadmin.
Please visit www.hp.com/go/webjetadmin for more information on obtaining a database connectivity
module license, and see “Appendix A” for instructions on how to install the license.

MIGRATING AN EXISTING HP WEB JETADMIN DATABASE


Before starting the task of pointing HP Web Jetadmin to use SQL Server instead of SQL Express, it
should be considered whether the existing HP Web Jetadmin data stored in the SQL Express database
needs to be migrated to what will now be a blank database when the conversion is complete. The
most common technique for migrating the database involves merely copying and pasting the
database files from one location to another. Another option is to run the backup.bat script that
HP Web Jetadmin provides. This script will back up the important Settings directory of HP Web
Jetadmin and will run a SQL script to backup the database. It is important to remember that the
Settings directory and database files should always match. If the goal is to use a remote SQL
database and migrate the database from a remote HP Web Jetadmin server, the Settings directory
from the remote HP Web Jetadmin installation must also be migrated. The backup.bat script should be

2
run on the remote HP Web Jetadmin installation to ensure the settings directory and database are
properly backed up.
HP Web Jetadmin offers a backup.bat script that backs up the database as well as the Settings
directory files in the file structure. It resides under the following directory:
DRIVE:\Program Files\Hewlett-Packard\Web Jetadmin 10\bin\WJABackupRestore\backup.bat
It may be necessary to assign Network Service write permissions in the directory where the database
is being saved. Using Windows Explorer, right-click the directory where the database will be saved,
and ensure the Network Service account has write permissions (see Figure 1).
Microsoft Windows Vista® requires that scripts requiring administrative access and run from the
Command Prompt must be executed using Run as administrator. Since a backup and restore script
starts and stops the HP Web Jetadmin service, administrative access is required. Click Start,
Programs, Accessories, Command Prompt, and choose Run as administrator. When Command
Prompt launches, run the backup script.
The backup script saves the HP Web Jetadmin database in the same directory as the backup script.

USING LOCAL SQL SERVER DATABASE


The following section will describe the steps required to instruct HP Web Jetadmin to use a full SQL
Server database that resides on the same machine as the HP Web Jetadmin installation.

Installing SQL Server


The order in which HP Web Jetadmin and SQL Server are installed on the same machine can
determine whether HP Web Jetadmin will successfully use a SQL Server database. A higher degree of
success occurs when HP Web Jetadmin is installed before SQL Server. While it is possible to install
HP Web Jetadmin on a machine where SQL Server already resides, there are certain configurations
of SQL Server that have been reported to cause the HP Web Jetadmin installer to fail before
completion. During installation, HP Web Jetadmin attempts to create a new instance called HPWJA
and a new database called HPWJA by calling a SQL Server Express installer. If SQL Server already
exists on the same machine, the commands to create a new instance or database may fail for
permissions reasons or otherwise. If this occurs, the HP Web Jetadmin installer will abort and may
claim the following types of errors:
• Error in task "InstallDataBasePlugin.InstallDatabaseTask"
• Exception of type "InstallDataBasePlugin.InstallDatabaseException" was thrown
During installation, HP Web Jetadmin launches a SQL Express installer executable and runs
commands to create a new instance called HPWJA. If that instance doesn’t exist, SQL simply creates
it. If the instance already exists, it needs to be in a serviceable state, or SQL will post an error.
The SQL Express installer command being run includes:
sqlexpr.exe -q /norebootchk /qb REBOOT=ReallySuppress ADDLOCAL=ALL
INSTANCENAME=HPWJA SCCCHECKLEVEL=IncompatibleComponents:1;MDAC25Version:0
INSTALLSQLDIR="DRIVE:\Program Files\Microsoft SQL Server"
INSTALLSQLDATADIR="DRIVE:\Program Files\Microsoft SQL Server"
INSTALLSQLSHAREDDIR="DRIVE:\Program Files\Microsoft SQL Server"

3
If the SQL Express installer returns an error,
HP Web Jetadmin posts an error. For example, if
the HPWJA instance is disabled or cannot be
started, an error occurs.
NOTE Do not disable the old SQL Express
instance under Services or remove it
under Add/Remove Programs. The
HP Web Jetadmin installer expects the
old SQL Express instance to be present
when performing an upgrade and fails if
it cannot find the instance.
Once HP Web Jetadmin and SQL Server are
successfully installed on the same machine,
perform the following steps to instruct HP Web
Jetadmin to use SQL Server instead of SQL Figure 2—Create named instance
Express.

Creating a named instance


The HP Web Jetadmin installer creates a SQL
Express instance named HPWJA and a database
named HPWJA to store its information. In order to
instruct HP Web Jetadmin to use SQL Server
instead, a named instance and new database
must be created. The default SQL Server instance
is not supported when attempting to use a SQL
Server database on the same machine as
HP Web Jetadmin.
While creating a named instance can be
accomplished in several ways, this document will
discuss running the SQL installer to create the
instance. Figure 3—Run under Network Service

Run the SQL Server installer on the machine


where HP Web Jetadmin is running. The installer
will ask to create a default instance or a named
instance (see Figure 2). Use a named instance
(such as HPWJA_FULL). The SQL service can run
under either a built-in system account such as
Network Service (since HP Web Jetadmin runs
under Network Service) or a domain user account
(see Figure 3).
The SQL installer will ask if either Windows
Authentication Mode or SQL Server
Authentication Mode is to be used (see Figure 4).
Select Windows Authentication Mode. Only
Windows Authentication Mode is supported when
instructing HP Web Jetadmin to use a SQL Server
Figure 4—Authentication Mode for same server SQL
database that resides on the same machine as
HP Web Jetadmin.

4
Once the installer has completed and a named instance has been created, it is time to create a new
database for HP Web Jetadmin to use. To create a new database, launch the SQL Server
Management Studio and open the named instance (HPWJA_FULL) that was just created. Right-click the
Databases folder, select New Database, and enter the database name to be “HPWJA” (see Figure 5).
For SQL Server on the same machine as HP Web Jetadmin, the database MUST be named “HPWJA”.
Make sure the database is allowed to grow to at least 4 GB.
The administrator who installed SQL Server automatically has database owner (dbo) rights on the
database. Those same administrator credentials are used by HP Web Jetadmin to access the
database. Now SQL Server is prepared for HP Web Jetadmin’s use. The next step involves instructing
HP Web Jetadmin to use this new database.

Configuring HP Web Jetadmin to use the new database


To configure HP Web Jetadmin to use a new SQL
Server database, edit the following file:
DRIVE:\Documents and
Settings\NetworkService\Local
Settings\Application Data\Hewlett-
Packard\HPWebJetadmin\WjaService\
config\DatabaseSettings.config.xml
On Windows Vista/2008/Windows 7 systems
this file is located at:
DRIVE:\Windows\ServiceProfiles\
NetworkService\AppData\Local\Hewlett-
Figure 5—Create new database
Packard\HPWebJetadmin\WjaService\
config\DatabaseSettings.config.xml
Care must be exercised when editing these XML files as extraneous carriage returns can create
problems. Be careful to ensure carriage returns reside as indicated in the examples below.
Typical symptoms that the file has not been edited correctly include the inability to connect to the
HP Web Jetadmin server after restarting the service (since the server cannot connect to the
database).
NOTE It is imperative to open the existing file and copy/paste the contents as they are displayed
here to maintain the user rights. The file must have read/write rights for Network Service in
order for HP Web Jetadmin to be able to use it. If a new file is created instead of opening the
existing file, the new file assumes the user’s rights. If this happens, HP Web Jetadmin does
not attempt to use the new database and defaults to the old one. Ensure that Network Service
has read/write rights. In a brand new install of HP Web Jetadmin 10.2 SR5, the
DatabaseSettings.config.xml file is not created by default and must be created by the user.
Just ensure the rights are assigned as mentioned above when creating the new file.
For SQL Server running on the same machine as HP Web Jetadmin, since Windows Authentication
Mode had to be chosen during the SQL installer, and “HPWJA” had to be set as the database name,
the only necessary item in this configuration file is the name of the named instance.
<ipmc:configuration xmlns:ipmc="www.hp.com/schemas/imaging/ipmc/config/2004/02/24">
<property name="DatabaseConnectionFactory.CommandTimeoutInSeconds">
<type>HP.Imaging.Wjp.Sdk.Core.Framework.ConfigurationItemString</type>
<value>120</value>
</property>
<property name="DatabaseConnectionFactory.InstanceName">
<type>HP.Imaging.Wjp.Sdk.Core.Framework.ConfigurationItemString</type>
<value>HPWJA_FULL</value>
</property>
</ipmc:configuration>
5
Figure 6—Configuration file for local SQL Server (same machine as HP Web Jetadmin)
Cut and paste the contents of the example shown above into the configuration file, replacing
“HPWJA_FULL” with the name of the named instance.
Stop and restart the HP Web Jetadmin Service (HPWJA Service) under Administrative Tools, Services.
Launch HP Web Jetadmin to validate that the new blank database is now in use (All Devices should
display zero devices).

USING REMOTE SQL SERVER DATABASE


The following section will describe the steps required to instruct HP Web Jetadmin to use a SQL Server
database that resides on a different machine than the HP Web Jetadmin installation. Remember that
an optional license must be installed in HP Web Jetadmin before allowing the usage of a SQL Server
database on a separate server. See “Appendix A” for instructions on installing the optional license.
HP Web Jetadmin 10.2 SR1 and beyond is also required in order for the license installation to
succeed.

Named or default instance


Both a named and default instance are supported
when instructing HP Web Jetadmin to use a
remote SQL Server database. Therefore,
remember which was chosen, as HP Web
Jetadmin will need to be instructed later whether
to use a named or default instance. The SQL
service can run under either a built-in system
account such as Network Service (since HP Web
Jetadmin runs under Network Service) or a
domain user account (see Figure 3).
For SQL Server running on a remote machine,
SQL Server Authentication must be used.
Therefore, configure the instance to use Mixed
Mode (see Figure 7). Windows Authentication
mode is NOT supported when using a remote
Figure 7—Authentication Mode for external SQL
SQL Server database. The account that is used to
access the database must have database owner
(dbo) rights to the database.
Once the instance is configured, it is time to
create a new database for HP Web Jetadmin to
use. To create a new database, launch the SQL
Server Management Studio, and open the
instance (default or named) that was just
configured for HP Web Jetadmin use. Right-click
the Databases folder, select New Database, and
enter a database name. When using a remote
SQL Server, the database can be named freely.
However, it is quite common to use the name
“HPWJA” for a database (see Figure 8). Make
sure the database is allowed to grow to at least Figure 8—Create new database

4 GB minimum.
Assign rights to the database appropriately so
that the account that HP Web Jetadmin uses to
access the database has database owner (dbo)

6
rights.
Now SQL Server is prepared for HP Web Jetadmin to begin using it. The next step involves instructing
HP Web Jetadmin to use this new database.

Configuring HP Web Jetadmin to use the new database


The final step in configuring HP Web Jetadmin to use a new SQL Server database is to edit the
following file:
DRIVE:\Documents and Settings\NetworkService\Local Settings\Application Data\Hewlett-
Packard\HPWebJetadmin\WjaService\config\DatabaseSettings.config.xml
On Windows Vista systems this file is located under:
DRIVE:\Windows\ServiceProfiles\NetworkService\AppData\Local\Hewlett-
Packard\HPWebJetadmin\WjaService\config.xml
Care must be exercised when editing these XML files as extraneous carriage returns can create
problems. Be careful to ensure carriage returns reside as indicated in the examples on the next page.
Typical symptoms that the file has not been edited correctly include the inability to connect to the
HP Web Jetadmin server after restarting the service (since the server cannot connect to the database).
NOTE It is imperative to open the existing file and copy/paste the contents as they are displayed
here to maintain the user rights. The file must have read/write rights for Network Service in
order for HP Web Jetadmin to be able to use it. If a new file is created instead of opening the
existing file, the new file assumes the user’s rights. If this happens, HP Web Jetadmin does
not attempt to use the new database and defaults to the old one. Ensure that Network Service
has read/write rights.
For a remote instance of SQL Server, since SQL Server Authentication Mode had to be chosen during
the SQL installer, and the database name was chosen freely, there are several necessary items that
need to be defined in the configuration file—such as remote machine name, SQL account credentials,
database name, and named instance.
Cut and paste the contents of the following example into the configuration file if using a named
instance instead of a default instance, replacing the instance name, database and account credentials
with the proper ones. Note that the plain text password is encrypted in this file once the HP Web
Jetadmin service is restarted so there is no compromise of security:

7
<ipmc:configuration xmlns:ipmc="www.hp.com/schemas/imaging/ipmc/config/2004/02/24">
<property name="DatabaseConnectionFactory.CommandTimeoutInSeconds">
<type>HP.Imaging.Wjp.Sdk.Core.Framework.ConfigurationItemString</type>
<value>120</value>
</property>
<property name="DatabaseConnectionFactory.MachineName">
<type>HP.Imaging.Wjp.Sdk.Core.Framework.ConfigurationItemString</type>
<value>insert machine name here</value>
</property>
<property name="DatabaseConnectionFactory.UserName">
<type>HP.Imaging.Wjp.Sdk.Core.Framework.ConfigurationItemString</type>
<value>insert username here</value>
</property>
<property name="DatabaseConnectionFactory.PlainTextPassword">
<type>HP.Imaging.Wjp.Sdk.Core.Framework.ConfigurationItemString</type>
<value>insert plain text password here</value>
</property>
<property name="DatabaseConnectionFactory.InstanceName">
<type>HP.Imaging.Wjp.Sdk.Core.Framework.ConfigurationItemString</type>
<value>insert named instance here</value>
</property>
<property name="DatabaseConnectionFactory.CatalogName">
<type>HP.Imaging.Wjp.Sdk.Core.Framework.ConfigurationItemString</type>
<value>insert database name here</value>
</property>
</ipmc:configuration>
Figure 9—Configuration file for remote SQL Server using named instance

Cut and paste the contents of the following example into the configuration file if using a default
instance, replacing the database and account credentials with the proper ones.

<ipmc:configuration xmlns:ipmc="www.hp.com/schemas/imaging/ipmc/config/2004/02/24">
<property name="DatabaseConnectionFactory.CommandTimeoutInSeconds">
<type>HP.Imaging.Wjp.Sdk.Core.Framework.ConfigurationItemString</type>
<value>120</value>
</property>
<property name="DatabaseConnectionFactory.MachineName">
<type>HP.Imaging.Wjp.Sdk.Core.Framework.ConfigurationItemString</type>
<value>insert machine name here</value>
</property>
<property name="DatabaseConnectionFactory.UserName">
<type>HP.Imaging.Wjp.Sdk.Core.Framework.ConfigurationItemString</type>
<value>insert username here</value>
</property>
<property name="DatabaseConnectionFactory.PlainTextPassword">
<type>HP.Imaging.Wjp.Sdk.Core.Framework.ConfigurationItemString</type>
<value>insert plain text password here</value>
</property>
<property name="DatabaseConnectionFactory.DefaultInstance">
<type>HP.Imaging.Wjp.Sdk.Core.Framework.ConfigurationItemString</type>
<value></value>
</property>
<property name="DatabaseConnectionFactory.CatalogName">
<type>HP.Imaging.Wjp.Sdk.Core.Framework.ConfigurationItemString</type>
<value>insert database name here</value>
</property>
</ipmc:configuration>
Figure 10—Configuration file for remote SQL Server using default instance

8
Stop and restart the HP Web Jetadmin Service (HPWJA Service) under Administrative Tools, Services.
Launch HP Web Jetadmin to validate that the new blank database is now in use (All Devices should
display zero devices).
NOTE Once the HP Web Jetadmin service is restarted, the plain text password in the configuration
file is hashed (grayed), and the heading of the password section is changed from
“PlainTextPassword” to “Password”. If it is required to edit the password in the file, remember
to change the heading back to “PlainTextPassword” for that section. Otherwise, the service
will have difficulty connecting to the database. The password is also hashed when passed
over the network to login to the remote SQL database. However, certificates are not used to
provide the strongest level of security. Future versions of HP Web Jetadmin may eventually
use certificates to provide the strongest level of security possible.

MIGRATING THE HP WEB JETADMIN DATABASE


Once HP Web Jetadmin is launched after a successful connection to the remote database, no devices
display in the device list. Some users may choose to migrate the devices from the previous local
database to the new remote database.

Preferred method
The easiest and most common technique to migrate the existing HP Web Jetadmin database from the
old instance to the new one involves manually copying the database files from the old location to the
new location. Database files are located under the following directory:
DRIVE:\Program Files\Microsoft SQL Server\MSSQL.x\data (where x=1,2,3, and so on)
Directories are named MSSQL.1, MSSQL.2, and so on, depending upon how many instances are
installed under SQL Server. Locate the one that contains the database files for HP Web Jetadmin
named HPJWJA.mdf and HPJWJA_log.ldf. These files need to be copied to the same location under
the MSSQL.1, MSSQL.2, and other directories for the new instance.
Stop the HP Web Jetadmin service before copying the files. Backup the current blank database files
as a precaution. It is very likely that the previous database files have to be detached from the old
instance before copying to the new instance. Stopping the SQL Server service should allow the files to
be copied.
Once the files have been copied, start the HP Web Jetadmin service and use a client to verify success.
Verify that All Devices contains the number of devices HP Web Jetadmin contained before the
migration.
Remember, if the goal is to migrate the HP Web Jetadmin settings and database from a remote HP
Web Jetadmin installation, the Settings directory must be migrated in addition to the database to
provide a matching set. Performing the alternate method below on the remote HP Web Jetadmin
installation ensures both the Settings directory and database are properly migrated.

Alternate method
If the HP Web Jetadmin database has been backed up using the backup.bat script prior to pointing to
the new instance and database, it may be preferable to run a SQL script to restore it rather than
copying the database files as described above. However, simply running the HP Web Jetadmin
restore.bat script also restores the settings directory containing many HP Web Jetadmin files,
including the old DatabaseSettings.config.xml file before the changes were made to point to a new
instance. Therefore, this document will discuss using SQL Server Management Studio Express to
restore the database from the HPWJA_DB_BACKUP.dat file that was created using the HP Web
Jetadmin backup.bat script.

9
To restore the database using this method, stop the HP Web Jetadmin service under Administrative
Tools, Services. Start SQL Server Management Studio Express and connect to the new HPWJA_FULL
SQL instance (or whatever name was chosen for the new instance). Locate the database catalogue
named HPWJA listed in the navigation tree under Databases. Using the right-click menu, run Tasks,
Restore, Database. This launches a dialogue for selecting From Device as the source of restore data.
Use the dialogue launched through the … button to navigate to the file HPWJA_DB_BACKUP.dat that
was created by the backup.bat script. After the file is selected in the Restore Database dialogue,
select the Restore box in the listing of “…backup sets to restore”. At this point there is a backup.dat
file identified that will be used to restore data from the original database instance to the new one.
The file HPWJA_DB_BACKUP.dat also contains the paths to key database files on the old SQL
database instance. These file paths need to be changed. In the case of the initial HP Web Jetadmin
SQL database instance, the path could be “…\MSSQL.1\Data\...” In the case of the newer SQL
database created in this procedure, the path could be “…\MSSQL.2\Data\...” The path should be
set to the latter in the SQL Restore Database dialogue. To perform this operation, change the settings
page from General to Options, check the box labeled Overwrite the existing database and set the
paths listed under “Restore the database file as…” Remember, these should be changed from the old
SQL instance file paths to the new ones. In this example the following new paths are used:
DRIVE:\Program Files\Microsoft SQL Server\MSSQL.2\MSSQL\Data\HPWJA.mdf
DRIVE:\Program Files\Microsoft SQL Server\MSSQL.2\MSSQL\Data\HPWJA_log.ldf
Click OK within the Restore
dialogue and watch the
results. The restore runs for
some time depending on the
amount of data within the
backup file but should
complete with a 100%
indication. When the restore
is complete, start the
HP Web Jetadmin service
and then use a client to verify
success. Verify that All Figure 11—Overwriting the database
Devices contains the number
of devices HP Web Jetadmin
contained when it was
originally backed up.
NOTE IMPORTANT! The SQL Server Express
database instance that was originally created
by HP Web Jetadmin should be left in place.
At this time, HP Web Jetadmin installation and
upgrade facilities require that the initial,
default instance of the HP Web Jetadmin SQL
database be left in place. Errors will occur if
the instance is removed or if the Windows
service for this SQL instance has been
stopped. If the catalogue is consuming large
amounts of disk space on the system hosting
this instance, it can be removed and recreated
using the SQL Server Management Studio
features.
Figure 12—Setting the backup source

10
TROUBLESHOOTING
Use the following troubleshooting steps if HP Web Jetadmin is unable to start up after attempting to
connect to a new database or the original database continues to appear upon startup.
1. For remote SQL Server databases, a license must be installed in HP Web Jetadmin (see
“Appendix A”). Even though the license may have been installed previously, it may need to be re-
installed after an HP Web Jetadmin upgrade to a new version. It is also possible that while
License Manager displays the license as being installed, it is not being recognized in HP Web
Jetadmin. A more reliable method for ensuring the license is installed is to check under Help,
About, Details in HP Web Jetadmin.
2. A trace log file may exist to provide some helpful details as to why the HP Web Jetadmin service
cannot connect to the database. A series of log files exist under:
DRIVE:\Documents and Settings\NetworkService\Local Settings\Application Data\Hewlett-
Packard\HPWebJetadmin\WjaService\tracing
The files named HPWJAService-xxx.itl (where xxx represents a series of numbers) may contain
helpful troubleshooting information.
3. Double-check the contents of the configuration file that was edited. Ensure it does not contain
extraneous carriage returns in the middle of tags and extra spaces or typos in the configuration
parameters.
4. Fully qualify the server name in the configuration file if name resolution issues are present or use
the IP address instead of the hostname.
5. If the user password was edited in the configuration because it had changed, remember to
change the heading back to “PlainTextPassword” for that section.
6. Verify that the HP Web Jetadmin service was restarted after making edits to the configuration file.
7. It is imperative to open the existing DatabaseSettings.config.xml file and copy/paste the new
contents as they are displayed in this paper to maintain the user rights. The file must have
read/write rights for Network Service in order for HP Web Jetadmin to be able to use it. If a new
file is created instead of opening the existing file, the new file assumes the user’s rights. If this
happens, HP Web Jetadmin does not attempt to use the new database and defaults to the old
one. Ensure that Network Service has read/write rights.
8. For remote SQL Server databases, the instance must be configured for Mixed Mode so a user
name and password can be used for SQL Authentication.
9. Confirm that the user HP Web Jetadmin is using to connect to the database has database owner
(dbo) rights on the database. Executing the following SQL Server script in SQL Management
Studio is one way to determine the login name of the dbo:
USE master;

SELECT SUSER_SNAME(sid)
FROM master..sysdatabases
WHERE name = 'Web Jetadmin database name'
GO
/* Result

sa
*/

11
DATABASE FAILOVER—SQL MIRRORING
HP Web Jetadmin supports a mirrored configuration for SQL Server 2005/2008 by allowing
parameters to be added to the DatabaseSettings.config.xml file. However, a clustered configuration
for SQL is not supported at this time. The mirrored configuration is only supported if the remote
database option has been licensed.
The following parameters can be added to the DatabaseSettings.config.xml file to support failover for
mirrored SQL configurations:
• DatabaseConnectionFactory.FailoverPartner.MachineName—the mirror partner for the database
• DatabaseConnectionFactory.FailoverPartner.InstanceName—the instance name of the mirror
partner database
• DatabaseConnectionFactory.FailoverPartner.DefaultInstance—forces the default instance of the
mirror partner database to be used

<ipmc:configuration xmlns:ipmc="www.hp.com/schemas/imaging/ipmc/config/2004/02/24">
<property name="DatabaseConnectionFactory.FailoverPartner.MachineName">
<type>HP.Imaging.Wjp.Sdk.Core.Framework.ConfigurationItemString</type>
<value>db2.SomeDomain.com</value>
</property>
<property name="DatabaseConnectionFactory.FailoverPartner.InstanceName">
<type>HP.Imaging.Wjp.Sdk.Core.Framework.ConfigurationItemString</type>
<value>HPWJA_MY_INSTANCE</value>
</property>
<property name="DatabaseConnectionFactory.CatalogName">
<type>HP.Imaging.Wjp.Sdk.Core.Framework.ConfigurationItemString</type>
<value>HPWJA</value>
</property>
<property name="DatabaseConnectionFactory.InstanceName">
<type>HP.Imaging.Wjp.Sdk.Core.Framework.ConfigurationItemString</type>
<value>HPWJA_MY_INSTANCE</value>
</property>
<property name="DatabaseConnectionFactory.MachineName">
<type>HP.Imaging.Wjp.Sdk.Core.Framework.ConfigurationItemString</type>
<value>db1.SomeDomain.com</value>
</property>
<property name="DatabaseConnectionFactory.PlainTextPassword">
<type>HP.Imaging.Wjp.Sdk.Core.Framework.ConfigurationItemString</type>
<value>MyPassword</value>
</property>
<property name="DatabaseConnectionFactory.UserName">
<type>HP.Imaging.Wjp.Sdk.Core.Framework.ConfigurationItemString</type>
<value>MyDBUser</value>
</property>
<property name="DatabaseConnectionFactory.CommandTimeoutInSeconds">
<type>HP.Imaging.Wjp.Sdk.Core.Framework.ConfigurationItemString</type>
<value>120</value>
</property>
</ipmc:configuration>
Figure 13—Example DatabaseSettings.config.xml file for using a mirrored database

12
While HP Web Jetadmin supports database mirroring, the behavior of the HP Web Jetadmin service
and connected clients may vary when a failover occurs on the database. The HP Web Jetadmin
service may sometimes stop as Microsoft fails over to the alternate database. When a failure occurs
with the database connection, Microsoft switches the HP Web Jetadmin database connection to the
alternate database and reports the failed database transaction to HP Web Jetadmin with an
exception. Depending upon where HP Web Jetadmin accesses the database, the exception may
cause the HP Web Jetadmin service and attached clients to fail.
It is recommended to configure the HP Web Jetadmin service to automatically restart after an
abnormal termination (such as a failover) so that there is no manual intervention required to get the
service back up and running again on the new primary database. The service and clients still fail, but
only temporarily as the service should be up and running again on its own, and the clients can be
restarted.
When a failover happens, further connection attempts go to the failover partner. If those are
successful the service continues to run. If they are not successful the service shuts down. On restart, the
service should function normally if the failover partner node is available. Otherwise it waits for a
database connection to succeed before the service comes up all the way.

PERFORMANCE SETTINGS
Other properties that can be set in the DatabaseSettings.config.xml file include:
• DatabaseConnectionFactory.MinimumPoolSize—Sets the minimum number of connections to keep
open to the database. Default is 0.
• DatabaseConnectionFactory.MaximumPoolSize—Sets the maximum number of connections to
allow to be opened to the database. Default is 100.
• DatabaseConnectionFactory.CommandTimeoutInSeconds—How long to wait for results to start
being returned in a query. Default is 120.
These settings can be used to improve performance when reading from and writing to the database.

BACKUP OF HP WEB JETADMIN CONFIGURED FOR A


REMOTE DATABASE
Administrators may want to run scheduled backups of the HP Web Jetadmin installation that points to
a remote SQL database. HP Web Jetadmin provides scripts to back up the default SQL Server Express
database instance that is installed with the base product. It also backs up the HP Web Jetadmin
configuration settings. If the backup and restore scripts from the HP Web Jetadmin install directory
(WJABackupRestore directory) have been used previously to backup the local HP Web Jetadmin
installation, the following options may need to be considered to ensure backing up the remote
database:
• Option 1: Backup and restore of the remote database is not done by HP Web Jetadmin. There
may already be other processes in place for backing up the remote SQL database and the
HP Web Jetadmin settings directory so the HP Web Jetadmin script is not required.
• Option 2: Continue to use the HP Web Jetadmin backup script, but remove or comment out the
lines in the script that back up the database. This allows the script to continue backing up the
HP Web Jetadmin settings directory. There may already be other processes in place for backing
up the remote SQL database so backup of the remote database is not performed by HP Web
Jetadmin.
• Option 3: Modify the HP Web Jetadmin script to backup the remote database as well as the
HP Web Jetadmin settings directory. The lines in the scripts that back up the default SQL Server
Express database instance can be replaced with custom commands that will back up the remote

13
database. For example, the HP Web Jetadmin backup.bat file runs a SQL script on the same
machine to backup the database as such:
%OSQL% -S localhost\HPWJA -E -i osql_backup.sql > osql_backup.log
This line could easily be changed to run the script on the remote SQL server:
%OSQL% -H wksta_server -S SQL_server\Instance -U user -P password -i osql_backup.sql >
osql_backup.log
The SQL script backs up a database named HPWJA to DRIVE:\
BACKUP DATABASE HPWJA TO DISK =
'DRIVE:\HPWJA_DB_BACKUP\HPWJA_DB_BACKUP.dat'
This script could be changed to backup any database name to a shared UNC path:
BACKUP DATABASE database_name TO DISK = '\\WJA
_server\shared_directory\HPWJA_DB_BACKUP\HPWJA_DB_BACKUP.dat'
The backup.bat file creates a temporary directory to write the .dat file then removes it once the .dat
file is copied to the Program Files location. Since the backup.bat file looks for the .dat file under this
temporary directory, and it is impossible to share out this temporary directory since it doesn’t always
exist, an additional permanent directory could be created and shared. The SQL script could be
modified by adding an additional line to the backup.bat file to copy the .dat file from this shared
directory to the HP Web Jetadmin temporary directory. Now, the backup.bat script is never disrupted
and can continue from that point.

SUMMARY
An existing installation of Web Jetadmin can be configured to use SQL Server instead of SQL Express
for its database. For example, it may be more convenient for HP Web Jetadmin to use SQL Server
since it may already be installed, or to avoid the SQL Express 4 GB database limitation.

14
APPENDIX A—INSTALLING THE DATABASE CONNECTIVITY
MODULE LICENSE
A database connectivity module license must be installed in HP Web Jetadmin to unlock the ability to
attach to a remote SQL Server database. The licenses are node-locked to an IP address, requiring a
separate license for each HP Web Jetadmin server. An order number should have been supplied
when requesting a license from HP. This order number is used to generate the actual licenses by
following the licensing process below. License versions must match the appropriate HP Web Jetadmin
server version:
IMPORTANT! HP Web Jetadmin version 10.2 SR1 (10.2.62227) or above is required in order for the
license to install successfully.

License process
1. Browse to the Webware URL (www.webware.hp.com) and click
Generate New Licenses.
2. If you have a user ID (your registered email address) already for the
Webware site, enter the email address and password. Otherwise,
create a new account and proceed.
3. Type the order number provided to you for the database connectivity
module under Order Number and click Next. Figure 14

Figure 15—Entering the order number


4. Select the database connectivity module product for the license and click Next.
5. Enter the IP address of the machine running HP Web Jetadmin. Click Next.
6. Accept the terms and conditions by clicking Accept.
7. Complete the License Registration page and click Next.
8. A license number is returned. Copy that license number using CTRL-C. It is also sent to you via e-
mail. When copying, do not include the <end> portion.
9. Under the Windows Start Menu, select Programs, access the HP Web Jetadmin program group
and select HP Web Jetadmin License Manager.
10. Click Add. The Enter License page is displayed.
11. Paste the license number into the License Key box and click Apply. The license is installed and
displayed in the License Manager main dialog box.

Figure 16—License key box

15
12. Restart the HP Web Jetadmin service (HPWJA Service).

Figure 17—Restarting HPWJA Service

The features of the database connectivity module are now activated.

© 2011 Hewlett-Packard Development Company, L.P. The information contained herein is subject to change without
notice. The only warranties for HP products and services are set forth in the express warranty statements accompanying
such products and services. Nothing herein should be construed as constituting an additional warranty. HP shall not be
liable for technical or editorial errors or omissions contained herein.
Microsoft, Windows, and Windows Vista are registered trademarks of Microsoft Corporation in the United States
and/or other countries.
c01763040ENW, Rev.2, April 2011

You might also like