|
Configuring Pervasive.SQL WorkGroup
to Run as Service
Last Updated: 02/25/2004
The Pervasive.SQL 2000i and Pervasive.SQL V8 Workgroup Engines
(WGE) offer performance and features similar to a Client/Server
Engine (CSE), but at a price that can't be beat. We strongly
recommend the use of Pervasive.SQL V8 WGE for all smaller
environments looking to upgrade from Btrieve 6.15 Workstation
Engines.
One problem with the WGE, however, is that if you install
it to the database server to get the best performance, it
also requires that a user be logged into the database server.
This causes some headaches for sites that do NOT stay logged
into the server all of the time, especially if you shut down
the server at night and simply restart it in the morning.
This paper describes how to get the Workgroup engine running
as a service, such that the requirement of logging into the
server is no longer required. Please note that some of the
information presented herein may be technical in nature and
includes editing the computer's registry, which can leave
the computer in an unusable state if done incorrectly -- if
you are not sure how to proceed, please see your technical
advisor for help.
Table of Contents:
Why do I need to set up the WGE as a service?
How do I set up the WGE as a service on Windows 95/98/ME?
How do I set up the WGE as a service on Windows NT/2000/XP
Is there any way to automate this process?
Why do I need to
set up the WGE as a service?
The Pervasive.SQL Workgroup Engine (WGE) does not load until
a user logs into the computer. As such, any computer on which
the WGE is installed, but not logged in, will not be able
to run the database software. For most environments, this
is not a problem, as applications do not run without users
there anyway. However, in the special case of a database server
at which no users typically reside, this means that the database
engine will not be running when required.
The Client/Server Engine (CSE) does not require any special
configuration changes, since it automatically configures services
set to auto-start when the computer is restarted.
How do I set up
the WGE as a service on Windows 95/98/ME?
The following steps can be used to enable the WGE to load
automatically and to be available regardless of whether or
not a user is logged in to the workstation/server. This procedure
applies only to Pervasive.SQL 2000i SP4 or later. There are
minor differences between Pervasive.SQL V8 and Pervasive.SQL
2000i, but most of these are easily determined. If you're squeamish with the command line, you'd be best served by downloading the Pervasive Support Tool to handle this for you.
1. Remove the Workgroup (or Workstation) Engine from the
Startup menu.
Right-click on the Task Bar to display the Task Bar Properties
menu. Click the Start Menu Programs tab, then click Advanced.
Expand the Programs tree and click on StartUp. In the right
column, click on "Pervasive.SQL Workgroup Engine"
or "Pervasive.SQL Workstation Engine." Click File
> Delete.
2. Add an entry to RunServices in the Registry.
Click Start > Run. Type in Regedit and click OK. Expand
the Registry tree to the following key:
HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\CurrentVersion\RunServices
To the key, add the following String Value and Value Data:
String Value: Pervasive.SQL Workgroup
Value Data: C:\Pvsw\Bin\W3dbsmgr.exe -SRDE -SERVICE
(Click Edit > New > String Value to add the string.
Double-click the string to add the data.)
NOTE: The String Value can be any name you choose provided
the name does not contain any reserved characters like "\".
Value Data contains the path to w3dbsmgr.exe. By default,
this file is installed to c:\pvsw\bin, but if you installed
to a different drive letter, make the necessary changes..
3. Restart your computer after you exit the Registry Editor.
The Workgroup/Workstation Engine loads as a service when the
computer restarts.
How do I set up
the WGE as a service on Windows NT/2000/XP?
The following steps can be used to enable the WGE to load
automatically and to be available regardless of whether or
not a user is logged in to the workstation/server. This procedure
applies only to Pervasive.SQL 2000i SP4 or later. There are
minor differences between Pervasive.SQL V8 and Pervasive.SQL
2000i, but most of these are easily determined.
1. Remove the Workgroup/Workstation Engine from the Startup
menu.
Click Start > Programs > Startup. Right-click on "Pervasive.SQL
Workgroup Engine" or "Pervasive.SQL Workstation
Engine" then click Delete.
2. Copy SRVANY.EXE and SRVINSTW.EXE to the subject computer's
windows system directory.
For example, to "C:\WINNT\System32." These programs
may already be on your computer, and we urge you to search
the entire system drive first to be sure. If not, then they
are included on the Windows NT 4.0 Resource Kit CD. They may
also be downloadable from Microsoft. The links below provide
the software as installed on a Windows 2000 Professional computer,
and may not work on other operating systems. Install the service
following either option for step 3.
3. (OPTION ONE) Install SRVANY.EXE
as a service using the Service Creation Wizard.
a. Click Start -> Run.
b. Type "SRVINSTW.EXE" (without the quotes) in the
Open box and click OK.
c. Select "Install a service" and click Next.
d. Select "Local Machine" and click Next.
e. Type in Pervasive.SQL Workgroup as the Service name
and click Next.
f. Enter the complete path to the SrvAny tool's executable,
for example, C:\WINNT\System32\srvany.exe and click Next.
g. Select "Service is its own process" and click
Next.
h. Select "System Account".
i. Check "Allow Service to Interact with Desktop".
If you prefer not to have the icon appear, leave this box
unchecked. Click Next.
j. Select "Automatic" and click Next.
k. Click Finish. The wizard should indicate that the service
was successfully installed. Click OK to clear the dialog.
3. (OPTION TWO) Install SRVANY.EXE
as a service using INSTSRV.EXE.
Type the following at a command prompt:
instsrv "Pervasive.SQL Workgroup" c:\winnt\system32\srvany.exe
The completion message is "The service was successfully
added!"
4. Add the Pervasive WGE as a Service
Open the Services dialog. (For example, on Window NT click
Start > Settings > Control Panel, then double-click
Services.)
a. Click on the service you added in Step 3 (Pervasive.SQL
Workgroup, for example).
b. Click Startup.
c. Click (enable) the option Allow Service to Interact with
Desktop. This option applies to Log On As System Account.
d. Click OK.
e. Click Close.
5. Configure SvrAny to execute the Workgroup/Workstation
Engine by adding a new key and values for that key.
a. Start RegEdit and select the following registry key:
HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\Pervasive.SQL
Workgroup
NOTE: This example assumes that you named the service "Pervasive.SQL
Workgroup." If you chose a different name in Step 3 or
4, then the registry key will have that name instead of "Pervasive.SQL
Workgroup."
b. Add a new key named "Parameters".
c. Select the Parameters key just created.
d. Add a new REG_SZ value named "Application."
e. In the Data field for "Applications," type in
the complete path to the Engine's executable (W3DBSMGR.EXE).
If you performed a default installation of the Pervasive.SQL
Workgroup Engine, type in c:\pvsw\bin\w3dbsmgr.exe
f. Select the Parameters key created in Step 6b.
g. Add another new REG_SZ value named "AppParameters."
h. In the Data field for "AppParameters" type in
-SRDE -SERVICE
Is there any way to
automate this process?
Pervasive Software has created a special tool which can help
with this process. Currently, there are two versions, one
for Pervasive.SQL V8 and one for Pervasive.SQL 2000i. You
can download this tool from here, then run it on your computer.
You will need to select Tools / WGE As Service, and then click
on the button to enable the service. This tool is also capable
of removing the service later, if you move up to the client/server
engine.
Download the Support Tool now.
This tools, while provided by Pervasive Software, is not
part of the product and may not be supported.
If you still can't get it to work, contact
Goldstar Software and let us work with you to help! Please
note that this may be a billable support call if you have
already used up your free support time.
|