Usr Guide
Usr Guide
SQL 2000i
trademarks Btrieve, Tango, Client/Server in a Box, and the Pervasive Software logo are registered
trademarks of Pervasive Software Inc.
Built on Pervasive, Built on Pervasive Software, Extranet in a Box, Pervasive.SQL, Jtrieve, Plug n’ Play
Databases, SmartScout, Solution Network, Ultra-light Z-DBA, Z-DBA, ZDBA, UltraLight,
MicroKernel Database Engine, and MicroKernel Database Architecture are trademarks of Pervasive
Software Inc.
Microsoft, MS-DOS, Windows, Windows NT, Win32, Win32s, and Visual Basic are registered
trademarks of Microsoft Corporation.
Windows 95 is a trademark of Microsoft Corporation.
NetWare and Novell are registered trademarks of Novell, Inc.
NetWare Loadable Module, NLM, Novell DOS, Transaction Tracking System, and TTS are
trademarks of Novell, Inc.
All other company and product names are the trademarks or registered trademarks of their
respective companies.
Contents
About This Manual . . . . . . . . . . . . . . . . . . . . . . . . . . . ix
Who Should Read This Manual . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . x
Manual Organization . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . xi
Conventions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . xii
iii
Contents
iv
Contents
v
Figures
vi
Figures
vii
Tables
viii
About This Manual
ix
About This Manual
x
Manual Organization
Manual Organization
This manual is divided into five chapters:
! Chapter 1—“Introducing Pervasive.SQL”
This chapter provides an introduction to Pervasive.SQL, and an
overview of utilities and Pervasive.SQL documentation.
! Chapter 2—“Using Pervasive.SQL”
This chapter covers the basic tasks you need to do to work with
Pervasive.SQL.
! Chapter 3—“Using the Pervasive Control Center”
This chapter explains how to get your work done using Pervasive
Control Center.
! Chapter 4—“Unix Supplementary Documentation”
This chapter explains how to get things done on Unix server
platforms.
! Chapter 5—“Basic Troubleshooting”
This chapter provides information for troubleshooting and
resolving problems.
! Chapter 6—“Pervasive.SQL Resources and Contacts”
This chapter explains the resources and information at your
disposal as a valued customer of Pervasive Software.
The manual also includes an index.
xi
About This Manual
Conventions
Unless otherwise noted, command syntax, code, and examples use
the following conventions:
< > Angle brackets enclose multiple choices for a required item, as
in /D=<5|6|7>.
variable Words appearing in italics are variables that you must replace
with appropriate values, as in file name.
::= The symbol ::= means one item is defined in terms of another.
For example, a::=b means the item a is defined in terms of b.
xii
chapter
Introducing Pervasive.SQL
1
Understanding Pervasive.SQL and its Capabilities
1-1
Introducing Pervasive.SQL
Understanding Pervasive.SQL
Pervasive.SQL is a comprehensive database management system
built around Pervasive Software’s MicroKernel Database Engine.
Pervasive.SQL offers easy installation, uncomplicated maintenance,
and high levels of performance and reliability.
This section explains the product and the components that make it
up.
1-2
Understanding Pervasive.SQL
1-3
Introducing Pervasive.SQL
new data, deletes unnecessary data, and ensures the safety and
integrity of the data files at all times, even when people and
applications are working with the data.
Client or Requester
In client/server systems, the client resides on the computer
workstation. It interacts with the client application and across the
network with both the MKDE and the SRDE on the server.
Utilities
A variety of graphical and command-line tools provide support for
testing, configuring, and manipulating the many features and
options provided by Pervasive.SQL. These tools are covered in-depth
in Advanced Operations Guide, but a brief introduction to them is
provided in “Helpful Utilities” on page 1-16.
Documentation
Pervasive.SQL comes with a printed copy of Getting Started with
Pervasive.SQL, and with a complete set of online documentation. For
more information about the documentation, see “Using
Pervasive.SQL Documentation” on page 1-18.
1-4
Key Concepts
Key Concepts
This section explains some basic concepts of databases in general and
some of the key concepts that distinguish Pervasive.SQL from other
database products.
Basic Database Most database management systems in use today share a common
Structures and set of basic structures. This section briefly explains those structures.
Terms The descriptions that follow refer to the diagram below:
Value
The most basic element of a database is a value. A value is one piece
of data, one characteristic, for a specific entity. For example, in the
diagram, the name “John Doe” or the phone number “555-1212” is
a value.
Column or Field
The next element is called a column, or a field. A column represents
a characteristic with no specific value. Columns generally have
names that describe the given characteristic. For example, in the
telephone book, Name and Phone are columns. They do not have
specific values unless you look up a particular person. Field is
sometimes used to refer to the generic characteristic of a specific row,
same as cell below. For example, someone might point at a specific
box in the table above and ask, “What is the value of that field?”
Row or Record
The next element is called a row, or a record. A row is a collection of
all the values for one particular instance. For example, one entry in
1-5
Introducing Pervasive.SQL
the phone book, complete with name, address, and phone number,
is one record or row.
Cell
A cell is a column within a specific record. You can think of it as the
intersection of a row and a column. Each cell has a specific value. For
example, you might tell a co-worker, “The value of the cell located at
row 2, column 3 is ‘12345’.”
Table
A collection of rows and columns makes up a table. A table is a set of
data that shares exactly the same structure. Tables generally have
names that describe the contents of the table. For example, the table
above is called “Phone Book.” With Pervasive.SQL, each table is
stored as a separate data file on the hard disk.
Index
An index is an ordered list of all the values in a particular column. A
table can have zero or more indexes on it. The database engine uses
indexes to find specific records in the database without having to step
through every record one at a time. Creating indexes on columns
which will frequently be used in database searches is likely to
improve the performance of your database.
Database
A database is a collection of one or more tables. The data in the tables
do not need to be related among the various tables, but usually there
are many relations. For example, a database might consist of the
“Food Preferences” table below, and the “Phone Book” table above.
With Pervasive.SQL, a database consists of one or more data files and
Data Dictionary Files (or DDFs) on your hard disk. The Data
Dictionary Files are special data files that contain all the definitions
for tables, columns, and other attributes that define the structure of
your database.
Schema
The term schema refers to the complete set of definitions that
describe the entire structure of a database. A typical schema includes
1-6
Key Concepts
Remote
The term remote refers to an object, such as a file server or a database,
that is not located in the computer you are using now. When you
connect to a database over the network, you are connecting to a
remote database. Remote is the opposite of local. Remote can refer to
either the client or the server, depending on whether you are
currently seated at the server computer or a client computer. Remote
always refers to an object that is not located on the system you are
using.
Local
The term local refers to the computer you are using right now, or
something stored on this computer. A local database is a database in
which the data files are stored on the hard disk of the computer you
are currently using. Local is the opposite of remote. Local can refer to
either the client or the server, depending on whether you are
currently seated at the server computer or a client computer.
Relational
The term relational refers to a method of organizing data that relies
on having a certain amount of duplicate data in different sub-sets of
data, so that relationships between the sub-sets can be established
and analyzed. Most DBMSs in use today are relational systems.
1-7
Introducing Pervasive.SQL
Join
A join refers to a relation between two tables. Joins are the true
beauty behind the relational DBMS. For example, you can see that
both our example tables contain the Name column, and some of the
names are the same. Because we can cross-reference the names in the
Phone table with the names in the Food table, we have the power to
ask and answer such questions as, “What is the phone number of
someone who likes steak?”
In the real world, we have the power to answer such questions as,
“Which consumer profile purchased the most product B after buying
product A?” You can probably see now how powerful relational data
access can be.
The SRDE component of Pervasive.SQL provides full relational
access to your data.
Transactional Interface
The transactional interface is a high-performance, low-overhead
access method, capable of handling updates, inserts, and deletes
much faster than other database products.
Applications that use the transactional interface bypass the relational
interface and communicate directly with the MKDE to maximize
performance.
In the interest of performance, the transactional interface offers only
basic security, including file passwords and encryption. It does not
allow SRDE data access to bypass transactional security.
Relational Interface
The relational interface uses industry-standard ODBC to provide a
rich environment for data definition, security, reporting, stored
procedures, and universal application access without requiring any
1-8
Key Concepts
Terminology Revisited
When using the Btrieve interface, the terms table and database are
generally not used, and data files are referred to directly as such. In
addition, Btrieve users normally use the terms records and fields
rather than rows and columns.
1-9
Introducing Pervasive.SQL
Why Pervasive.SQL?
You or your application vendor have chosen wisely in selecting
Pervasive.SQL as the database of choice. Within the realm of small-
to mid-sized enterprises, Pervasive.SQL provides the lowest-
maintenance, highest-performance, best overall DBMS value on the
market today.
Pervasive.SQL provides a number of advantages over other products.
Here are just a few:
! Lowest total cost of ownership. An independent study conducted
by Aberdeen Group concluded that no major database product
can match Pervasive.SQL’s low total cost of ownership.
! No Database Administrator (DBA) required. You can look in the
newspaper any day of the week and see classified ads for Oracle,
Sybase, or SQL Server database administrators, with sky-high
salaries. Pervasive.SQL offers the unique Zero Database
Administrator, or Z-DBA™, architecture. Its easy-to-use tools,
bulletproof installation, and set-it-and-forget-it simplicity make
it the perfect workhorse for desktop, workgroup, and
departmental applications.
! Scalable from the desktop to the Web. Pervasive.SQL is available in
three editions: the Ultra-light™ Workstation database engine
supports applications running locally on the same computer as
the engine; the Workgroup engine comes with a three-user
license and scales up to about ten users; and the Server engine
comes with a 10-user license and scales to thousands of
concurrent users, including intranet and extranet applications.
Upgrading to another configuration requires no changes to the
supported application, just plug-and-play with the new database
engine.
! Cross-platform support. Unlike some other products,
Pervasive.SQL does not lock you in to a single platform.
Pervasive.SQL databases are binary-compatible and supported
across Microsoft Windows, Novell NetWare, Sun Solaris, and
several varieties of Linux. No matter where your data is or where
it is going to be, Pervasive.SQL is there for you.
1-10
Why Pervasive.SQL?
1-11
Introducing Pervasive.SQL
1-12
Understanding the Product Family
1-13
Introducing Pervasive.SQL
1-14
Understanding the Product Family
Crystal Reports Another optional product, Crystal Reports provides rich capabilities
for for creating and formatting reports based on Pervasive.SQL
Pervasive.SQL databases. Reports can be customized in thousands of ways and
published as HTML, Microsoft Word document, Microsoft Excel
document, or other formats.
For more information about Crystal Reports, contact your sales
representative or visit the Pervasive web site at:
http://www.pervasive.com.
1-15
Introducing Pervasive.SQL
Helpful Utilities
Pervasive.SQL comes with a variety of utilities designed to help you
control and manage your databases. Most of the utilities run only on
32-bit Windows and allow remote function to NetWare or Unix
database server engines.
Table 1-2 Summary of Pervasive.SQL Utilities
1-16
Helpful Utilities
1-17
Introducing Pervasive.SQL
Getting Started Getting Started with Pervasive.SQL 2000i (Server Edition) and Getting
Guides Started with Pervasive.SQL 2000i (Workstation/Workgroup Edition)
help you get Pervasive.SQL running with installation, setup, and
troubleshooting information. Both Getting Started editions cover the
following topics:
! Preparing to install Pervasive.SQL 2000i
! Installing Pervasive.SQL 2000i
! Upgrading from previous versions of Pervasive.SQL
! Configuring Pervasive.SQL 2000i
! Troubleshooting your Pervasive.SQL 2000i installation
! Where to go for Pervasive.SQL product information and
technical support
1-18
Using Pervasive.SQL Documentation
Status Codes Status Codes and Messages documents all possible status codes and
and Messages numbered messages that can be received when using Pervasive
software.
The Status Codes and Messages Quick Reference card is also included
with your complete documentation set.
1-19
Introducing Pervasive.SQL
1-20
File System Security
1-21
Introducing Pervasive.SQL
1-22
chapter
Using Pervasive.SQL
2
A Walk-through of Basic User Tasks
2-1
Using Pervasive.SQL
Note Btrieve v6.15 Users: If you have any log (.LOG) files you want to
roll forward, you must do so before you load the Pervasive.SQL 2000i
MicroKernel, which uses a different logging scheme. You must use both
the v6.15 or earlier engine and its accompanying Roll Forward Utility.
Refer to your Btrieve v6.15 or earlier documentation for information
about logging and instructions about how to roll files forward.
2-2
Starting and Stopping the Database Engine
2-3
Using Pervasive.SQL
Also, please note that database updates performed against data files
on NSS volumes may run more slowly than with earlier versions of
NetWare. As noted in Novell TID 2952147 (http://www.novell.com),
“NSS is optimized for reading files.” Updates “will almost always
perform a little faster on the legacy file system.”
Based on this information, you may wish to store frequently-
updated data files on regular NetWare volumes rather than NSS
volumes.
2-4
Starting and Stopping the Database Engine
MGRSTOP
BSTOP
Tip If NetWare does not allow you to stop the engines with these
commands due to dependencies on other modules, first enter the
command BTRV UNLINK, then perform the commands noted above.
Starting and In Unix, the MicroKernel runs as a daemon. The daemon is loaded
Stopping as part of the installation process and is set to be always available if
Services on you followed the Typical installation.
Unix You must be logged in as the root user to start and stop the
Pervasive.SQL 2000i daemon process. While we strongly
recommend you use the supplied shell script psql, you may start and
stop individual services by using the mkded and sqlmgr utilities.
2-5
Using Pervasive.SQL
2-6
Granting Administrative Rights for the Database Engine
2-7
Using Pervasive.SQL
2-8
Granting Administrative Rights for the Database Engine
Note You must be logged onto the Windows server as a user with
administrative rights.
2 From the User menu, select New Local Group. A dialog box
appears.
3 Type in Pervasive_Admin as the group name. You may now add
users to this list by clicking Add and selecting them. When
finished, click OK.
2-9
Using Pervasive.SQL
Note You must be logged onto the Windows server as a user with
administrative rights.
1 From the Start menu, select Settings | Control Panel | Users and
Passwords.
2 Select Advanced tab, then select Advanced User Management.
3 Select Groups folder. From the menu, choose Action | New
Group.
4 Type in Pervasive_Admin as the group name. Click on Add... to
add users to this group. When you are finished, click Create.
2-10
Granting Administrative Rights for the Database Engine
2-11
Using Pervasive.SQL
Note Users created with btadmin are not related to Unix system users.
These users are known only to the database engine.
2-12
Granting Administrative Rights for the Database Engine
A dialog box like this appears: Enter your operating system user
name and password, and click OK.
2-13
Using Pervasive.SQL
Figures 2-4 and 2-5 show the DSNs that are needed for each
configuration. Workstation and Workgroup engines use only an
Engine DSN on the local computer where the database engine is
installed. You cannot use Client DSNs with Workstation or
Workgroup engines.
2-14
Setting Up ODBC Database Access
Database Database
Client DSN Engine DSN Server
Client
Engine
Data
Files
Database
Engine Engine DSN
Data
Files
Desktop Computer
Database
Engine DSN <No server engine
Engine
or server engine
Data
not running>
Files
2-15
Using Pervasive.SQL
Note For NetWare systems, use the following path UNC structure:
\\server\vol1:\path
For Unix systems (when Samba is not used), use the following UNC
path structure:
\\server\$PVSW$\[path on Unix from root ‘\’ dir]
2-16
Setting Up ODBC Database Access
Pervasive.SQL v7 users
You must recreate all DSNs created with Pervasive.SQL 7 to access
them in Pervasive.SQL 2000i. However, you do not need to rename
existing Named Databases. To re-create DSNs, follow the
instructions provides in “Deleting DSNs” on page 2-53.
2-17
Using Pervasive.SQL
The sections that follow allow you to set up database access as long
as the conditions above are met. The following topics are provided:
! “Setting Up Database Access on a Windows Server or
Workgroup/Workstation” on page 2-19
! “Setting Up Database Access on a NetWare Server” on page 2-28
! “Setting Up Database Access on Unix” on page 2-36
! “Setting Up Client Access” on page 2-39
2-18
Setting Up Database Access on a Windows Server or Workgroup/Workstation
2-19
Using Pervasive.SQL
3 If you are unsure of the server name, click the button located to
the right of the name field and browse from the Network list that
appears, as shown below.
2-20
Setting Up Database Access on a Windows Server or Workgroup/Workstation
2-21
Using Pervasive.SQL
8 The Server: field should indicate the server that you are currently
working with. Choose Engine for the Interface type, and enter
your operating system user name and password for that server,
in the User name and Password boxes.
Remember that you must have administrator-level rights on the
server operating system to be able to complete this task.
Click Next to move to the next screen, shown below.
2-22
Setting Up Database Access on a Windows Server or Workgroup/Workstation
9 In the Name field, specify an Engine DSN name for the database.
This name will appear in the database listing in PCC after you
complete this task.
In the Directory field, specify the location of the data files.
Note If you are working with a Server engine, you must specify a full
path (not a mapped drive) that makes sense on the server. The server
engine cannot interpret mapped drive paths. For example, if you have
a mapped drive S:\data1\datafiles on your client, referring to the folder
C:\servers\data1\datafiles on the server, you must enter the server-
based directory, C:\servers\data1\datafiles.
2-23
Using Pervasive.SQL
2-24
Setting Up Database Access on a Windows Server or Workgroup/Workstation
2-25
Using Pervasive.SQL
2-26
Setting Up Database Access on a Windows Server or Workgroup/Workstation
In the Data file location box, you must accept the default or
browse to the location of the data files. This location can be the
location of existing data files if you are setting up an existing
database for use with ODBC, or it can be an empty directory if
you are creating a new database.
" For Server databases, this must be a full path name on the
server—do not enter or browse a mapped drive path.
Browsing for the location only works if you are seated at the
server or you are browsing a local directory tree that is
identical to the directory tree on the server.
" Workstation users must enter a full path name on a local
hard drive.
" Workgroup users may enter a mapped drive or UNC name.
Click OK to close the Create Database Name window. Back in
the Create Database Wizard, click Next and go to step 10.
2-27
Using Pervasive.SQL
Note This scenario is the only option for NetWare. You must create
both the Client and the Engine DSNs from the client workstation using
PCC or ODBC Administrator.
2-28
Setting Up Database Access on a NetWare Server
3 If you are unsure of the server name, click the button located to
the right of the name field and browse from the Network list that
appears, as shown below.
2-29
Using Pervasive.SQL
7 The Server name should indicate the server that you are
currently working with. Choose Engine for the DSN type, and
enter your operating system User Name and Password for that
server. Remember that you must have administrator-level rights
on the server operating system to be able to complete this task.
Click Next to move to the next screen, shown below.
2-30
Setting Up Database Access on a NetWare Server
8 In the Name field, specify an Engine DSN name for the database.
This name will appear in the database listing in PCC after you
complete this task.
In the Directory field, specify the location of the data files.
Note The server engine cannot interpret mapped drive paths. You
must specify a full path (not a mapped drive) that makes sense on the
server. For example, if you have a mapped drive S:\data1\datafiles on
your client, referring to the folder SYS:\servers\data1\datafiles on the
server, you must enter the server-based directory,
\\servname\SYS:\servers\data1\datafiles.
2-31
Using Pervasive.SQL
2-32
Setting Up Database Access on a NetWare Server
2-33
Using Pervasive.SQL
Caution Browsing for the location only works if you are seated at the
server or you are browsing a local directory tree that is identical to the
directory tree on the server. Ensure that you enter a full path name.
2-34
Setting Up Database Access on a NetWare Server
In the Data file location box, you must accept the default or
browse to the location of the data files. As noted previously,
browsing for the location only works if you are seated at the
server or you are browsing a local directory tree that is identical
to the directory tree on the server.
Click OK to close the Create Database Name window. Back in
the Create Database Wizard, click Next and go to step 10.
2-35
Using Pervasive.SQL
Options include:
-b – create Bound database
-i – create database with Relational Integrity enforced
-e – do not create dictionary files for database
-nDBName – specify database name
-lDictpath – specify dictionary path
-dDatapath – specify data path
-a – show full data in the DBNames list
2-36
Setting Up Database Access on Unix
Note Because Unix is case sensitive, the [DSN name] must be input
exactly as listed under [ODBC Data Sources].
" The engine can also be created using the dsnadd utility by
typing the following at the command line:
2-37
Using Pervasive.SQL
2-38
Setting Up Client Access
2-39
Using Pervasive.SQL
3 If you are unsure of the server name, click the button located to
the right of the name field and browse from the Network list that
appears, as shown below.
2-40
Setting Up Client Access
6 In the Name field, enter a descriptive name for the DSN. This
name will be displayed in the ODBC Administrator and to users
attempting to connect to ODBC data sources. The maximum
length is 32 characters.
In the Server DSN field, select the Engine DSN on the server that
you want to associate with the Client DSN you are creating.
Click Use advanced settings only if you have read about this
option in Advanced Operations Guide.
Click Next to display the final confirmation screen.
2-41
Using Pervasive.SQL
Note The Client DSN you have just created does not appear in PCC. It
appears only in the ODBC Administrator as a System DSN. It also
appears in the DSN list presented when local applications attempt to
connect to ODBC data sources. Once you have created a Client DSN,
you can remove or rename it from the ODBC Administrator, using the
Remove or Configure buttons.
Tip You can set the option to have Client DSNs appear in PCC by
right-clicking on the database engine is the list and selecting View |
Show Client Databases. Once you have set this option, you can remove
or configure it using PCC.
2-42
Setting Up Client Access
2-43
Using Pervasive.SQL
8 In the Server area, type in the host name of the computer where
the data source resides. You can enter a machine name, TCP/IP
address, or an IPX/SPX MAC address.
9 To use an existing database on the server, click the Get DSN List
button and select the desired DSN from the drop-down list. In
the Server area, Data Source Name refers to an Engine DSN on
the server computer.
If no databases appear in the drop-down list, either you selected
the wrong server, or you need to have your system administrator
name the server databases and create Engine DSNs for each of
them before you can access them.
10 Click OK.
11 You can now set up another Client DSN or click OK to exit the
ODBC Administrator.
2-44
Setting Up Client Access
For more information about the dsnadd utility, please see Getting
Started with Pervasive.SQL (Server edition).
2-45
Using Pervasive.SQL
2-46
Accessing Data via ODBC From Other Applications
4 The Choose Data Source box lists the defined data sources for
any ODBC drivers that are installed on your computer. From
this list, click on the Client or Server DSN for the Pervasive
database you wish to access, as shown in the example below.
If the database you want does not appear in the ODBC Source
list, see“Before You Begin” on page 2-46.
2-47
Using Pervasive.SQL
2-48
Accessing Data via ODBC From Other Applications
3 Next, the File New Database dialog box opens and asks you to
name the new database. Name the database and click Create.
4 From the Access menu, choose:
File | Get External Data | Link Tables.
Note You have the option to Import data or Link Tables to the new
database. When you choose Import, you break the link to the ODBC
data source immediately following the import procedure. Essentially,
Import creates a static copy of the data. When you choose Link Tables,
Microsoft Access keeps the connection open and remains dependent
upon the ODBC data source each time the data is accessed. This way,
the data you see reflects any changes to the data at its source.
Note If you wish to link to a file on a local area network, make sure to
use a universal naming convention (UNC) path, instead of relying on
the drive letter of a mapped network drive in Windows Explorer. A
drive letter can vary on a computer or may not always be defined,
whereas a UNC path is a reliable and consistent way for Microsoft
Access to locate the data source that contains the linked table.
2-49
Using Pervasive.SQL
5 In the Link dialog box, in the Files Of Type box, select ODBC
Databases.
6 The Select Data Source box lists the defined data sources for any
ODBC drivers that are installed on your computer. Click on the
Machine Data Source tab as shown in the figure below.
2-50
Accessing Data via ODBC From Other Applications
7 Select the ODBC data source that you want to link. If the ODBC
data source that you selected requires you to log on, enter your
user name and password (additional information might also be
required), and then click OK.
Note To define a new data source for any installed ODBC driver, click
New, and then follow the instructions in the Create New Data Source
dialog box and the dialog boxes that follow it before proceeding.
Tip If you are linking a table, select the Save The Login ID And
Password check box to store the information for the table in the
current database, so that users will not have to enter it each time.
If you leave the check box cleared, all users must enter the logon
ID and password every time they open the table with Microsoft
Access in each new session. Your network administrator can also
choose to disable this check box, requiring all users to enter a
user name and password each time they connect to the database.
If the database you want does not appear in the ODBC Source
list, see“Before You Begin” on page 2-46.
8 The Access Link Tables dialog box opens. Click each table that
you want to import or link, and then click OK.
2-51
Using Pervasive.SQL
Note If you are linking a table and it does not have an index that
uniquely identifies each record, then Microsoft Access displays a list of
the fields in the linked table. Click a field or a combination of fields that
will uniquely identify each record, and then click OK.
2-52
Deleting DSNs
Deleting DSNs
This section describes how to delete a DSN. One reason you may
have to perform this task is if you are upgrading from Pervasive.SQL
7. If this is the case, you must delete your existing DSNs and re-create
them using Pervasive.SQL 2000i.
This procedure does not delete Data Dictionary Files (DDFs) or data
files.
2-53
Using Pervasive.SQL
Also, if you want to save the system files and DDFs, make sure the
Delete database name is not checked. One reason that you may need to
preserve these files is because a Btrieve application is accessing them.
2-54
Deleting DSNs
2-55
Using Pervasive.SQL
Note If you choose to secure a Bound database, you will not be allowed
to access the data through the Btrieve API.
2-56
chapter
3-1
Using the Pervasive Control Center
Namespace
Each object in the tree, when selected, has its own set of functions
and its own set of tools to enable these functions. For example, if one
of the Databases located under a Pervasive.SQL engine is selected, a
different set of tools appears in the toolbar than if Configuration is
selected. The Configuration tools function separately from the
Pervasive.SQL engine tools.
Much of the functionality of PCC is implemented as wizards that act
upon objects in the namespace. To perform a function on a given
object, right-click on the object and choose from the list of actions in
the Tasks menu.
3-2
An Overview of Pervasive Control Center
Some utilities have not yet been tightly integrated within the PCC
framework. However, they may still be started from within PCC by
selecting them through the Tools menu, which is available when
anything but the Control Center Root is selected. The non-
integrated tools that may be selected this way include:
! Function Executor
! Pervasive System Analyzer
! Gateway Locator (Workstation and Workgroup only)
! Maintenance
! Monitor
! Rebuild
! User Count Administrator
! Custom (third-party) tools
3-3
Using the Pervasive Control Center
3-4
Registering or Removing a Server
4 If you are unsure of the server name, click the button located to
the right of the name field and browse from the Network list that
appears, as shown below.
5 Select the computer name from the list or enter the computer
name in the field and click OK.
The server should now appear in the Namespace window of
PCC.
Note If you have engines registered that are not running, you may
encounter delays in Configuration as PCC periodically attempts to
contact these engines. To eliminate the delay, unregister the “dead”
engines. You can minimize the delay by performing the following
procedure:
3-5
Using the Pervasive Control Center
3-6
Viewing Database Engines
Note If you have engines registered that are not running, you may
encounter delays in PCC as it periodically attempts to contact these
engines. To eliminate the delay, unregister the “dead” engines. You can
minimize the delay by performing the following procedure:
Interpreting Computer names are listed in the namespace tree under the
Server Status Pervasive.SQL 2000 Engines node. An icon indicating the state of the
Icons Pervasive.SQL engine on that computer accompanies each engine
3-7
Using the Pervasive Control Center
name. The possible states of the database engine are outlined in the
following table.
Table 3-1 Pervasive.SQL Machine States
Engine stopped
No Service Found
3-8
Pervasive Control Center Wizards
The following table provides the file names of the wizards if you wish
to start them from the command line:
Table 3-2 File Names of Wizards
File Name Wizard
3-9
Using the Pervasive Control Center
3-10
Adding or Creating a Database
Note If you wish to add a database to a Server engine, you must have
administrative rights on the server operating system. If you do not have
administrative rights, you will not be permitted to add the database.
3-11
Using the Pervasive Control Center
Enter the name of the new database and the location where its
files will reside.
For Unix systems (when Samba is not used), use the following path:
\\server\$PVSW$\[path on Unix from root ‘\’ dir]
For Windows (or Unix systems with Samba), use the following path:
\\server\sharename\path
3-12
Adding or Creating a Database
3-13
Using the Pervasive Control Center
Note If you have created a brand new database, where no DDFs or data
files existed previously, your new database is empty. No tables or
columns have been created. You can use the Create Table Wizard,
described in “Adding a Table” on page 3-18, to define tables and
columns.
3-14
Deleting a Database
Deleting a Database
PCC includes a Delete Database Wizard. You can use the wizard to
delete a DSN, a Database Name, or an entire database.
To delete an Engine DSN, a Database Name, or a complete database
from a server, you must have administrative rights on the server.
Caution Do not use the Delete Database Wizard (or the PCC Delete
command) to delete replication-enabled databases or replication
templates. Use the Deactivation Wizard to remove replication-enabled
databases and the Template Remover Wizard to remove templates. The
Deactivation Wizard and the Template Remover Wizard can be
accessed from the PCC after the Pervasive.SQL Replication product is
installed.
3-15
Using the Pervasive Control Center
3-16
Deleting a Database
4 After you click Finish, the wizard displays a final dialog box (not
shown) that indicates success. Click Close. At this point the
database should disappear from the PCC Namespace. You may
need to refresh the screen in the PCC to view this change. To do
this, go to the toolbar, click Action, then Refresh.
3-17
Using the Pervasive Control Center
Adding a Table
Tables are the objects in which databases store data. PCC’s Create
Table Wizard enables you to easily add and remove tables from any
existing database.
Caution It is highly recommended that you backup all your DDFs and
data files before you perform functions through Table Designer such as
create table, alter table, convert nulls, or import of an external file. This
powerful tool is designed to give you the ability to modify your
database schema and data. If you inadvertently set the options
incorrectly or enter incorrect data, you could change your files in an
irreversible manner. Full recovery will be possible if you have
performed a backup.
3-18
Adding a Table
Enter the name of the new table. Click Next when done.
For advanced users only: you may select the Use advanced
settings box in order to create a table definition for an existing
Btrieve file. The steps to use this advanced option are described
in Advanced Operations Guide, Chapter 12, “Adding Relational
Access to Btrieve Files.”
4 The columns that are to appear in the new table must now be
defined. The following dialog box presents a grid display in
which columns may be defined:
3-19
Using the Pervasive Control Center
Function Icon
Remove Column -
Highlight the column
to be removed and
click this button.
3-20
Adding a Table
Function Icon
Index Window -
Click this button for a
dialog box in which
you can specify
properties of the
index.
Add Index
Remove Index
Add Segment
Remove Segment
3-21
Using the Pervasive Control Center
Precision
For floating point values, specify the number of significant digits.
Scale
For floating point values, specify the number of significant digits that
are to the right of the decimal point.
Case
For character data types, checking the Case attribute forces the
database engine to use case-insensitive comparisons when searching
for values in the database.
Null
For data types that allow NULL values (IDENTITY and BIT data
types cannot be null), checking the Null attribute permits NULL
values in the column.
ACS
If you wish to use an alternate collating sequence (ACS) for this
column, specify the path name to the ACS here.
Default
If you wish to specify a default value for this column, enter the value
here. The default value is used if a row is inserted and no value is
provided for this column.
5 The next dialog box (Figure 3-12) displays the SQL statement
that could be used to recreate this table at a later date. This
statement can prove useful in replicating a database structure at
another location, or as a safety measure in case the table must be
re-created.
3-22
Adding a Table
Figure 3-12 Create Table Wizard - Generate SQL Script Dialog Box
6 You can click the Save button to save the script so that it can be
run in the Pervasive.SQL data manager at any time. Click Next.
7 By clicking Finish in the dialog box below (Figure 3-13), the
changes that have been entered thus far will be committed to the
database.
3-23
Using the Pervasive Control Center
3-24
Modifying a Table Definition
Caution It is highly recommended that you backup all your DDFs and
data files before you perform functions through Table Designer such as
create table, alter table, convert nulls, or import of an external file. This
powerful tool is designed to give you the ability to modify your
database schema and data. If you inadvertently set the options
incorrectly or enter incorrect data you could change your files in an
irreversible manner. Full recovery will be possible if you have
performed a backup.
3-25
Using the Pervasive Control Center
Add index ✔ ✔
3-26
Modifying a Table Definition
Caution Do not use Unlinked mode unless you are an advanced user.
By making changes to your table definition that are not reflected in
your data file, you may make it impossible to access the data file.
3-27
Using the Pervasive Control Center
3 Make changes to the table definition as you see fit. When you are
finished, choose File | Save to save your changes. Choose File |
Reset to erase your changes and revert to the last saved version of
the table definition.
Restrictions
The ability to modify the Null attribute or data type of a column is
subject to the following restrictions:
! The target column cannot have a PRIMARY/FOREIGN KEY
constraint defined on it.
! If converting the old type to the new type causes an overflow
(arithmetic or size), the ALTER TABLE operation is aborted.
! If a nullable column contains NULL values, the column cannot
be changed to a non-nullable column.
If you must change the data type of a key column, you can do so by
dropping the key, changing the data type, and re-adding the key.
Keep in mind that you must ensure that all associated key columns
in the database remain synchronized.
For example, if you have a primary key in table T1 that is referenced
by foreign keys in tables T2 and T3, you must first drop the foreign
keys. Then you can drop the primary key. Then you need to change
all three columns to the same data type. Finally, you must re-add the
primary key and then the foreign keys.
For additional information, refer to ALTER TABLE in SQL Engine
Reference.
3-28
Dropping a Table
Dropping a Table
Dropping a table using the PCC’s Drop Table Wizard is very similar
to dropping a database.
Caution This procedure may permanently delete data files and DDFs.
3-29
Using the Pervasive Control Center
The option Delete Data file not only removes the table from the
database but also removes the actual data file itself from the
machine’s hard drive. Click Finish.
5 The final Drop Table Wizard dialog box (not shown) indicates
to you that the table was successfully dropped. Click Close.
3-30
Setting Database Security
3-31
Using the Pervasive Control Center
Caution Turning off database security deletes all users, groups, and
permissions. If you turn security back on, you must re-create all users
and groups.
Working with For any data files in your database with Btrieve owner names set, you
Groups and cannot use PCC to grant access to these files. You must use the
Users GRANT statement with the appropriate owner name.
3-32
Setting Database Security
3-33
Using the Pervasive Control Center
Note If you wish to use groups, you must set up the groups before
creating users. You cannot add a user to a group after you have already
created the user.
3-34
Setting Database Security
Enter the new user information in the name and password fields
and select the group, if any, to which the new user belongs.
3-35
Using the Pervasive Control Center
Note To delete a group, you must first delete all users in the group. You
cannot delete a group that contains users.
3-36
Setting Database Security
3-37
Using the Pervasive Control Center
Figure 3-21 Stopping and Restarting Services in the Pervasive Control Center
3-38
Viewing and Modifying Table Properties
3-39
Using the Pervasive Control Center
File Version Shows the earliest Btrieve engine version that can
read the file format.
Page Size Shows the page size (in bytes) of the data file. The
page size determines the maximum number of
index segments that can be defined in a table.
Number of Indexes Shows the number of indexes defined for the table.
3-40
Viewing and Modifying Table Properties
Free Space Threshold Shows a percentage (5%, 10%, 20% or 30%) if the
data file has a free space threshold. The
MicroKernel stores the variable-length portions of
records on their own pages (called variable pages),
separate from the fixed-length portions (which are
stored on data pages).
System Data Key Shows whether the data file has system data keys
enabled.
3-41
Using the Pervasive Control Center
Viewing Data To view all the data in a table, simply double-click on the table icon
in PCC. When SQL DM comes up, its default behavior is to display
a grid containing all records in the selected table.
The window bar at the top of the window shows the machine name
where the database is located, and the name of the database
containing the current table.
If you want to see a limited set of rows or a sub-set of the columns in
the table, see the next section on writing SQL statements.
Writing and By default, SQL DM appears with the query pane immediately
Executing SQL beneath the toolbar, and the results grid at the bottom, as shown in
Statements Figure 3-23.
3-42
Viewing and Modifying Data
You can type SQL statements directly in the query pane. If you wish
to enter more than one SQL statement, separate each statement
using the pound sign (#) as shown above. You can change this
delimiter character to a semi-colon by selecting Tools | Properties
from the menu.
By default, SQL DM runs only the current statement. The yellow
arrow in the left-hand margin points to the current statement. You
can select the current statement by placing the cursor in the
statement you wish to select, or by using the blue arrow buttons to
move forward and back through the statements.
You can run all the SQL statements by clicking on the Tools menu
and selecting Query | Run All SQL Statements. The table below
shows the toolbar buttons and the functions they perform:
Table 3-6 SQL Data Manager Buttons
Buttons Functions
3-43
Using the Pervasive Control Center
Add Table: The third button allows you to add a table to the
query.
The grid caches results locally and only displays the current
40 records. Statements that generate a large amount of
output continue to run in the background as you scroll
through the early results.
3-44
Viewing and Modifying Data
Using the SQL The graphical Query Builder allows you to create database queries
Statement without typing out SQL statements.
Builder
Note These procedures assume that you already have PCC open, and
you have started SQL DM by double-clicking on a table icon in PCC.
3-45
Using the Pervasive Control Center
Exporting/Importing Data
Pervasive.SQL provides an ODBC interface, which makes it easy to
access your data from a large number of third-party programs.
Sometimes data must be made available in other ways or in specific
formats. To ease the migration of data to and from Pervasive.SQL
databases, Pervasive Control Center (PCC) includes import and
export wizards.
The Import/Export wizards in PCC support two different data
formats, which can be read and written. The formats are shown in
Table 3-7.
Table 3-7 Import/Export Wizards Data Formats
Unformatted MicroKernel The wizard does not convert the data to ASCII.
Binary columns remain in binary format. Each
record is preceded by its length in bytes and is
followed by a comma delimiter. A carriage return/
line feed terminates each record.
3-46
Exporting/Importing Data
Select the box marked Write column names at first row if you
would like the Export Wizard to create a header row at the
beginning of the file that includes the name of each column from
the DDF. This would be particularly useful if you are exporting
to another application, such as Excel, so that the contents will be
identified.
5 Click Next. The Export Wizard now displays a dialog box that
allows records to be filtered or processed using SQL. The option
chosen here is to output the table records unmodified.
3-47
Using the Pervasive Control Center
Figure 3-25 Export Wizard - Specify Table Copy or Query Dialog Box
6 Click Use SQL statement for export if you would like to filter the
output records using SQL (Figure 3-26).
Click the Export from table if you want to export the entire table
without any specifying any filters.
Figure 3-26 Export Wizard - Use SQL Statement for Export Dialog Box
3-48
Exporting/Importing Data
7 Click Next. Now that all of the information has been entered, the
Export Wizard displays a dialog box listing the actions to be
taken.
Figure 3-27 Export Wizard - Completing the Export to the File Wizard Dialog
Box
3-49
Using the Pervasive Control Center
Select the box marked Column names at first row if you selected
the option Write column names at first row when exported the
file (Figure 3-24).
Click Next when done.
5 Indicate what should be done to the data as it is imported. The
options are to import all of the data and insert it into the table or
to specify an SQL statement, which gives you control over how
the import data fields correspond to the columns in the table.
3-50
Exporting/Importing Data
6 Alternatively, you can click Use SQL statement for import if you
would like to use a SQL statement to control how the import file
columns correspond to the table columns. In the example shown
in Figure 3-31, the question marks (?, ?, ?, ?) represent the fields
from the source file.
Select Import into table if you selected the option Export from
table (Figure 3-25) to import the entire table without filters.
3-51
Using the Pervasive Control Center
Figure 3-31 Import Wizard - Use SQL Statement for Import Dialog Box
You cannot import fewer fields than exist in the table or in the
import file. Both the import file and the table must have the
same number of columns. The only factor you can control with
the INSERT statement is how the import file columns
correspond to the table columns.
The first named column receives the data from the first column
in the import file, the second named column receives the data
from the second column in the import file, and so on.
For example, if you want the data in the first column of the
import file to go into the third column of your table, you must
put the name of the third column first in the column list.
7 Now that all of the information has been entered, click Next. The
Import Wizard displays a dialog box listing the actions to be
taken.
3-52
Exporting/Importing Data
Figure 3-32 Import Wizard - Completing the Import from File Wizard Dialog
Box
3-53
Using the Pervasive Control Center
3-54
Checking Consistency and Referential Integrity
3-55
Using the Pervasive Control Center
3 Click Consistency test, then click Next. The select table dialog
box allows you to specify which tables of the database are to be
checked:
Figure 3-36 Select Tables for the Referential Integrity Test Dialog Box
Select the files you want to check, click Next, and follow the
remaining prompts.
3-56
Checking Consistency and Referential Integrity
3-57
Using the Pervasive Control Center
5 The select table dialog box allows you to specify which tables of
the database are to be checked:
Figure 3-39 Select Tables for the Referential Integrity Test Dialog Box
3-58
Checking Consistency and Referential Integrity
When the wizard has finished checking all tables, click Next.
7 The Check Database Wizard’s result dialog box shows a complete
list of foreign keys and the results of each test. You can save the
test results to disk or print them out at this time:
3-59
Using the Pervasive Control Center
Exception Tables
By default, SQL Data Manager checks for orphan rows but does not
write them to an exception table or delete them.
You can change the relevant settings as follows:
Orphan Rows If you do not want SQL Data Manager to check for
orphan rows, deselect this option button.
If the referential integrity test was run with the option to save orphan
rows to an exception table, then the exception table becomes a part
of the database with the same location and file name as the original
file, but with an .EXC extension. For example, if SQL Data Manager
generated an exception table on table2, the exception table would be
named EXC_table2 and would be stored in the data file named
TABLE2.EXC.
The first field in the exception table is an index and contains the
parent table name. The remainder of each row contains the same
field values as the original orphan row and can contain up to 4,090
bytes. SQL Data Manager truncates rows larger than 4,090 bytes. You
can use SQL Data Manager to review the exception table by issuing
SQL statements, just as you would with any other table.
3-60
Checking Consistency and Referential Integrity
For example, you may create an inconsistency if you move a data file
from one database to another, because the old data source name
stored in the data file does not match the new data source name
stored in the data dictionary. The Check Database wizard checks for
the following inconsistencies:
Data Source Names Checks the data source name stored in the data file against
the data source name stored in the data dictionary.
Primary Key Checks the number of referencing foreign keys stored in the
data file against the referential constraints stored in the data
dictionary.
Foreign Keys Checks the number of foreign keys defined in the data file
against the referential constraints stored in the data
dictionary.
3-61
Using the Pervasive Control Center
3-62
chapter
Unix Supplementary
Documentation 4
Additional Information on Unix Utilities
4-1
Unix Supplementary Documentation
Utilities All Win32 utilities must be run from a Windows client. If a utility
must be run at the server, then its Unix equivalent will be found in
this manual.
Changes and The following sections of the Advanced Operations Guide do not
Exclusions work in the same manner for Unix. Any necessary explanations are
given below.
! The sections, “Understanding the Pervasive Component
Architecture” of the Advanced Operations Guide regarding
“Overview of Smart Components”, “Component Identification”,
or “Unique Component Naming” do not apply to Pervasive.SQL
2000i.
! The section, “Understanding the Pervasive Component
Architecture” of the Advanced Operations Guide regarding
“Pervasive.SQL Event Logging” is different for Pervasive.SQL
2000i on Unix.
Pervasive.SQL 2000i uses the standard Unix logging system.
Depending on the configuration of /etc/syslog.conf,
messages are sent to the syslogd daemon, which does one of the
following:
" logs it in an appropriate system log
" writes it to the system console
" forwards it to a list of users
" forwards it to syslogd on another host over the network
More information can be found in the man pages for syslogd
and syslog.conf.
4-2
User Manual Exclusions for Unix
4-3
Unix Supplementary Documentation
Man Pages
The following man pages are available for the Pervasive.SQL 2000i
for Unix product:
btadmin
butil
dbmaint
dsnadd
mkded
sqlmgr
ucutil
4-4
Available Utilities
Available Utilities
The following are utilities available in Pervasive.SQL 2000i. These are
specific to the Unix product and are not found in the Advanced
Operations Guide.
btadmin
Description
The btadmin utility is used to create and update the flat file
btpasswd, which stores user names and passwords for
authentication of Pervasive.SQL users. Users given administrator
rights can monitor engine status and configure the engine remotely.
Synopsis
btadmin [ -p password] [a+] [a-] [-r] username
Availability
! Sun Solaris 2.6, Solaris 7 (SPARC only)
! Red Hat Linux 5.2, 6.0
! Caldera OpenLinux 2.2
! S.u.S.E. Linux 6.1
Options
-p Specify the password. If this option is not specified, you will be prompted to
enter the password.
username
Creates or updates the username in the btpasswd file. If username does
not exist in this file, an entry is added. If it does exist, the password
is changed.
4-5
Unix Supplementary Documentation
See Also
mkded(1), butil(1)
Notes
To administer the engine from a remote workstation, you must
supply a user name and password. Upon initial installation of
Pervasive.SQL 2000i, the supplied default is admin with an empty
password.
Use btadmin to add more administrators:
% btadmin [-p password] [a+] username
4-6
Available Utilities
butil
Description
The Pervasive.SQL Maintenance Utility, or butil, is a command line
utility that performs command file and data manipulations on a
MKDE.
The maintenance utility performs the following file and data
manipulations:
! Starts and stops continuous operations for use in performing
server backups.
! Recovers changes made to a file between the time of the last
backup and a system failure.
! Imports and exports ASCII, unformatted, and SDF sequential
data.
! Copies data between data files.
! Returns MKDE version information.
Continuous operation is an MKDE feature that enables you to back
up files while they are in use by Pervasive.SQL-based applications.
Two Maintenance Utility commands, startbu and endbu, begin and
end continuous operation on a file or set of files.
Synopsis
butil
-clone outputFile sourceFile [/Oowner]
-clrowner sourceFile [/Oowner]
@commandFile [commandOutputFile]
-copy sourceFile outputFile [/Oowner1] [/Oowner2]
-create sourceFile descriptionFile [Y | N]
-drop sourceFile <keyNumber | SYSKEY> [/Oowner]
-endbu </A | sourceFile | @listFile>
-index sourceFile indexFile descriptionFile [/Oowner]
-load unformattedFile outputFile [/Oowner]
-recover sourceFile unformattedFile [/Oowner]
-rollfwd sourceFile unformattedFile [/Oowner]
-save sourceFile unformattedFile
[Y indexFile | N <keyNumber | -1>][/Oowner]
4-7
Unix Supplementary Documentation
Availability
! Sun Solaris 2.6, Solaris 7 (SPARC only)
! Red Hat Linux 5.2, 6.0
! Caldera OpenLinux 2.2
! S.u.S.E. Linux 6.1
Options
Commands
-clone outputFile sourceFile [/Oowner]
4-8
Available Utilities
4-9
Unix Supplementary Documentation
4-10
Available Utilities
" The first field must be a left-adjusted integer (in ASCII) that
provides the length of the record. This field does not include
the end-of-line markers. For files with fixed length records,
the length you specify should equal the record length of the
data file. For files with variable length records, the length
you specify must be at least as long as the minimum fixed
length of the data file.
" A separator (either a comma or a blank) must follow the
length field.
" The record data follows the separator. The length of the data
must be the exact number of bytes specified by the length
field.
" An end-of-line marker must terminate each line. The end-
of-line marker is not included in the length value at the
beginning of the line. Note that the Solaris version of butil
will accept both PC style end of line marker (e.g., carriage
return and new line) and Unix style end of line marker (e.g.,
new line).
The Solaris version of butil accepts both DOS and Unix styles
with respect to end-of-file markers. DOS files use CTRL+Z, and
Unix does not have an end-of-file marker.
-recover sourceFile unformattedFile [/Oowner]
4-11
Unix Supplementary Documentation
4-12
Available Utilities
Variables
descriptionFile
is the path name of a description file containing the description of
the index you wish to use. Is an ASCII text file containing
information the Maintenance Utility needs to perform create and
index operations. Description files are made up of one or more
elements, where each element consists of a keyword followed by an
equal sign (=) and a value (with no space separator). Please refer to
the Advanced Operations Guide for details of description files.
indexFile
is the path_name of the index file in which the MKDE stores the
external index.
keyNumber
is the key number (other than 0) of the index specified.
level
is the type of access restriction for the data file. The possible values
for this parameter are as follows:
4-13
Unix Supplementary Documentation
4-14
Available Utilities
The description file shown below defines a new key with one
segment. The key begins at byte 30 of the record and is 10 bytes long.
It enables duplicates, is modifiable, is a string type, and uses no
alternate collating sequences.
position=30 length=10 duplicates=y modifiable=y
type=string alternate=n segment=n
The following two examples illustrate how to use the save command
to retrieve records from a data file.
! The first example uses the newpats.idx external index file to
retrieve records from the patients.btr data file and store them
in an unformatted text file called patients.sav.
% butil -save patients.btr patients/.sav Y
newpats.idx
! The next example retrieves records from the patients.btr file
using key number 3 and stores them in an unformatted text file
called patients.sav.
% butil -save patients.btr patients/.sav N 3
4-15
Unix Supplementary Documentation
See Also
butil(1), syslogd(1)
4-16
Available Utilities
dbmaint
Description
The dbmaint utility manages named databases.
Synopsis
dbmaint a | d | l [-nDbname] [-a] [-b] [-i] [-e]
[-ldictpath] [-ddatapath]
Availability
! Sun Solaris 2.6, 7 (SPARC only)
! Red Hat Linux 5.2, 6.0
! Caldera OpenLinux 2.2
! S.u.S.E. Linux 6.1
Options
Commands
Options
4-17
Unix Supplementary Documentation
Examples
To create DBName TEST with relational integrity type:
% dbmaint a -i -nTEST
See Also
butil(1), btadmin(1), syslogd(1), smb.conf(5)
4-18
Available Utilities
dsnadd
Description
dsnadd simplifies the setup of a new ODBC data source that uses the
Pervasive ODBC Client Interface driver. It modifies the odbc.ini file
by adding appropriate information about the new data source. For
the latest information on dsnadd, see the man page.
Synopsis
To add a data source, execute the following command:
dsnadd -dsn=server_DSN -db=DB_name
[-ini=inifile] [-desc=DSN_description]
[-drv-desc=driver_description]
or
dsnadd -dsn=myDSN -desc=datasource
-db db_name -host=psqlhost -sdsn=svDSN
myDSN
is a name you want to assign to the new data source.
datasource
is any string to describe the data source.
psqlhost
is the name of the network host where your Pervasive.SQL is
installed.
svDSN
is the name of the data source on the Pervasive.SQL host.
Availability
! Sun Solaris 2.6, 7 (SPARC only)
! RedHat Linux 5.2, 6.0
! Caldera OpenLinux 2.2
! S.u.S.E. Linux 6.1
4-19
Unix Supplementary Documentation
Options
Examples
To add a Client DSN named localDSN that references an Engine
DSN named remoteDSN on a machine named server12, enter the
following command:
dsnadd -dsn=localDSN -desc=any_text -host=server12
-svr-dsn=remoteDSN
See Also
btadmin(1)
4-20
Available Utilities
mkded
Description
mkded is the command used to start and stop the Pervasive.SQL
database server, including the underlying MKDE, as either a daemon
process or in console mode.
In daemon mode, Pervasive.SQL runs as a background daemon
process. As a daemon, mkded relinquishes the control terminal and
becomes the owner of the process group. Informational, warning,
and error messages produced by the MKDE are printed to the
console window (/dev/console), or to the system log (see syslogd(1))
if the MKDE cannot write to /dev/console.
When Pervasive.SQL is started in console mode, a >> prompt will be
displayed allowing you to enter interactive commands. Console
mode is functionally equivalent to daemon mode, except that MKDE
messages are printed to standard out instead of /dev/console (or the
system log).
While the Pervasive.SQL database server is running, the butil
Maintenance Utility can be executed to perform a variety of
common file and data manipulation operations. For example, run
butil -ver to print information on the Pervasive.SQL version that
is currently running.
Synopsis
mkded [ -start | -stop | -console | -help ]
Availability
! Sun Solaris 2.6, Solaris 7 (SPARC only)
! RedHat Linux 5.2, 6.0
! Caldera OpenLinux 2.2
! S.u.S.E. Linux 6.1
4-21
Unix Supplementary Documentation
Options
The options described below are supported by mkded. These options
are case-insensitive.
Configuration
Pervasive.SQL for Unix uses a bti.ini file to obtain MKDE
configuration parameters. On startup, the MKDE determines the
location of this file as follows:
1 If the BTIINI environment variable is defined, then look for
bti.ini in the directory specified by this environment variable.
2 If (1) does not apply, then look for bti.ini in the current working
directory.
3 If (1) and (2) do not apply, then look for bti.ini in the directory
where the Pervasive.SQL database engine executable (mkded)
resides.
4 If (1), (2), and (3) do not apply, then look for bti.ini in all
directories contained in the $PATH environment variable.
5 If (1), (2), (3), and (4) do not apply, then create a default bti.ini
in the current working directory. When the MKDE creates a
default bti.ini file, an informational message is printed by the
MKDE.
The configuration parameters that can be specified in bti.ini are
described below. A sample configuration file can be found in
4-22
Available Utilities
See Also
butil(1), btadmin(1), syslogd(1), smb.conf(5)
Notes
Daemon Mode
To start up the Pervasive.SQL database server as a daemon process
(assuming $PVSW_ROOT/bin is in your path) run
% mkded -start
4-23
Unix Supplementary Documentation
Console Mode
To start up the Pervasive.SQL database server in console mode
(assuming $PVSW_ROOT/bin is in your path) run
% mkded -console
4-24
Available Utilities
sqlmgr
Description
sqlmgr serves remote requests from clients and returns them to the
Pervasive.SQL database engine. To start sqlmgr, bti.ini should be
placed into directory /usr/local/psql/etc for Linux and opt/
PVSWpsql for Solaris. This file contains ODBC settings and
description of ODBC DSNs for the server.
Port and network protocol in bti.ini should be specified as below:
[SQLManager]
MgrPort=1583
MgrUseTransport=TCP
Synopsis
sqlmgr [ -start | -stop | -console ]
Availability
! Sun Solaris 2.6, Solaris 7 (SPARC only)
! RedHat Linux 5.2, 6.0
! Caldera OpenLinux 2.2
! S.u.S.E. Linux 6.1
Options
4-25
Unix Supplementary Documentation
Examples
1 SQLMGR required settings:
; configure sqlmgr port
[SQLManager]
MgrUseTransport=TCP
MgrPort=1583
2 Server data source – the one to which remote calls are redirected:
; Test
[dsn.srv]
[Driver=/usr/local/psql/lib/libsrde.so |
Driver=/opt/PVSWpsql/lib/libsrde.so]
Description=Test Pervasive database
; DBName – named database
DBQ=DEMODATA
See Also
butil(1), btadmin(1), syslogd(1), smb.conf(5),
dbmaint(1)
Notes
4-26
Available Utilities
4-27
Unix Supplementary Documentation
ucutil
Description
The Maintenance Names Database Utility manages the User License
count.
Synopsis
ucutil -Dpath | -Gcode | -Kkey | -S | [-Tpath]
Availability
! Sun Solaris 2.6, Solaris 7 (SPARC only)
! Red Hat Linux 5.2, 6.0
! Caldera OpenLinux 2.2
! S.u.S.E. Linux 6.1
Options
-Dpath Specifies the path where the license file is located. For example,
ucutil -D/mnt/fd.
-Gcode Returns the user count for the specified product code. The product
code for Pervasive.SQL 2000i is 11. (To get a list of all products and
codes, specify the -G option with no code.)
-Kkey Specifies a key number with which to increase the user count.
See Also
butil(1), btadmin(1), syslogd(1), smb.conf(5)
4-28
chapter
Basic Troubleshooting
5
How to Identify and Solve Common Problems
5-1
Basic Troubleshooting
General Troubleshooting
This section provides some basic troubleshooting procedures to help
you rule out possible causes for situations you may encounter. This
section covers the following topics:
! I get Error 1114 when trying to access my data on page 5-2
! I get an error saying “‘ServerDSN’ or ‘DBQ’ was not found in the
connection string” on page 5-2
! I get a message saying my Engine components’ version is different
than my client components’ version on page 5-2
! I get Status Code 3111 and 3112 frequently on page 5-3
! I can’t get to my data on the server engine on page 5-3
! Error Messages from PCC on page 5-8
5-2
General Troubleshooting
5-3
Basic Troubleshooting
Note If you are trying to create a new database on the server, to use
Monitor against the remote server engine, or to use Configuration
against the remote server engine, you must have administrative rights
on the server, or be a member of Pervasive_Admin. A simple drive-
mapping or shared-file read will not tell you whether you have
administrative rights. This means you may be able to connect to the file
server, but you still may not be able to connect to the database engine
with Configuration, Monitor, or Create Database Wizard.
5-4
General Troubleshooting
5-5
Basic Troubleshooting
If everything checks out so far, but you still cannot get to the data
you want to access, make sure a server DSN has been set up for
your target data. Using PCC, connect to the server, open the
Databases folder for that server, and inspect the databases that
are present. Make sure one of the databases represents the data
you want to access. If so, then a server DSN has been created for
your data.
If you do not find the data you want to access, but you know it is
on the server, then most likely you need to set up a DSN for the
given data. You must have administrative rights on the server (or
be a member of the Pervasive_Admin group) to do so.
Right-click on the Databases folder for the target server, and
choose New Database. Follow the instructions in “Setting Up
ODBC Database Access” on page 2-14 to set up a DSN for
existing data files.
You can now rule out the server DSN as the source of the
problem.
7 Note: If your application uses pure Btrieve access only, without
ODBC, then skip this step.
If you have performed all the steps above and you still cannot get
to your data, the next possibility is lack of a local client DSN for
the remote data.
PCC can access remote server DSNs using connections without
client DSNs. Many desktop applications, such as Microsoft Excel
and Microsoft Access, cannot do this. You must create a client
DSN on your local computer to provide access to the remote
server DSN. To create a client DSN, follow the instructions in
“Setting Up Client Access” on page 2-39. You must first make
sure that a server DSN exists on the server you want to access.
You can now rule out the client DSN as the source of the
problem.
8 The final task to perform is to ensure that your client and server
are communicating on the appropriate network protocols. By
default, Pervasive.SQL ships with all network protocols enabled,
so connection time may be slow as it tries all protocols, but it
should eventually connect. Some application vendors disable the
protocols that are not typically used by their application(s).
5-6
General Troubleshooting
5-7
Basic Troubleshooting
Can’t retrieve database names. You don’t have access rights for
the operation
This error may occur when you are attempting to create a new
database on the server. The most likely cause is that you are logged in
as an operating system user that has neither administrative rights in
the server operating system, nor membership in the
Pervasive_Admin group on the server. Another likely cause is that
you forgot to enter a user name and password.
Solution: Be sure to enter a user name and password for the remote
operating system. You must have administrative rights on the server
or be a member of the Pervasive_Admin group in order to create a
new database on the server. “Granting Administrative Rights for the
Database Engine” on page 2-6 explains how to set up the
Pervasive_Admin group.
For Windows NT/2000, be sure that you are set up as a local user on
the system, not a network user. Network users have a domain name
and a backslash preceding the user name, such as
BOSTON\GILBERT. Be sure that the user who is a member of the
Administrators group or Pervasive_Admin group is a local user.
If you have checked permissions and your user login does in fact
meet one of the criteria above, then you should also check to make
sure that you are logged into the correct network. For example, if you
generally use the NetWare client to access servers on your network,
but you are attempting to create a database on a Windows NT server,
5-8
Error Messages from PCC
you must make sure that you are logged into the Microsoft network,
not only the Novell network on your LAN. You can verify whether
you are logged into the correct network by attempting to read or
write to a server that you are certain uses the target operating system.
5-9
Basic Troubleshooting
5-10
Error Messages from PCC
5-11
Basic Troubleshooting
Installation
# Will I lose my data files if I uninstall my existing version of the product, or install a
new version? (page 5-15)
# What type of client install should I do—typical, custom, or network? (page 5-15)
# How can I be sure what service pack level of client I am running? (page 5-15)
Security
# Your security model is confusing. When do I login using an operating system user
and password, and when do I login using a database user and password? (page
5-17)
Documentation
# Why does my computer have a different format of online documentation than my
co-worker’s computer? We both installed the same software. (page 5-17)
User Counts
# How do I apply a User Count Upgrade? (page 5-18)
# How does the Workgroup engine keep track of how many people are accessing
the data? If people access the data with two engines at the same time, what
happens? (page 5-18)
# Does the Workgroup engine use concurrent or per-seat licensing? (page 5-19)
# Aside from licensing, is there a limit to how many users can access a Workgroup
engine simultaneously? (page 5-19)
5-12
Frequently Asked Questions
Networking
# How do I know which protocol I am using for communication? I can see other
systems in Network Neighborhood but I can’t get to my data. (page 5-19)
# I have files sitting on the server that are shared and yet Pervasive.SQL cannot
read them. What’s wrong? (page 5-20)
# I am using SQL queries to create a definition for an old table. The resulting record
size is off. Why? (page 5-20)
# I want to convert my data file version from 7 back to file format version 6 or 5. How
do I do this? (page 5-20)
# I have DDFs from Scalable SQL 3.01. Are they compatible with Pervasive.SQL
2000i? (page 5-22)
# What is the best way to ensure that my data dictionaries (DDFs) are safe? (page
5-22)
# Can I mix and match DDFs from different databases? (page 5-23)
# Does Pervasive Control Center have the same functions as DDF Sniffer? Namely,
can PCC read a Btrieve data file without DDFs and analyze the file to help me build
DDFs? (page 5-23)
# I have two similar Btrieve files, and I created a DDF for the first one. Since they are
similar, can I use the same DDF on the second Btrieve file? (page 5-25)
# I have owner names set on my Btrieve files. After I created a DSN, I cannot open
the files using ODBC. What’s wrong? (page 5-25)
# Is there a single database file housing all the data, data definitions, stored
procedures, security, table relationships, and so on as in some other products?
(page 5-27)
5-13
Basic Troubleshooting
# Does the SQL engine (SRDE) have scheduler capabilities to run stored
procedures or other types of scripts designed to access and affect data? (page 5-
27)
# On NetWare, will the 6.15 Btrieve NLM interface with the new MicroKernel engine,
or will the 7.x version of Btrieve NLM have to be loaded to continue accessing the
current Btrieve files? (page 5-27)
# My current files are in a 5.x format. Will they have to be converted to be accessed
by the SQL engine (SRDE)? (page 5-27)
# I have DDF files today that were used by a product called Xtrieve. They are in a
4.x file format. Can they be used by the SQL engine or will they have to be
converted? (page 5-28)
# I expect to continue using my old applications and files and phase in new
applications to access the same files through the SQL engine (SRDE). Is this a
false expectation? (page 5-28)
# When I create a table using an existing Btrieve file, the wizard displays fewer
columns than there are in the Btrieve file. What’s wrong? (page 5-29)
Miscellaneous
# I dumped Btrieve records to a file and now I can’t read the file. What happened?
(page 5-30)
# Does garbage collection occur in the data files and indexes? For example, is
space from deleted records recovered or reused? (page 5-31)
# What is the mechanism that allows the database to be backed up online? What
happens if the server goes down in the middle of a backup with many open
transactions? (page 5-32)
5-14
Frequently Asked Questions
76 SP 1
104 SP 2
112 SP 3
13x SP 4
152 SP 5
146 None
154 SP 1
5-15
Basic Troubleshooting
198 SP 2
230 SP 3
5-16
Frequently Asked Questions
5-17
Basic Troubleshooting
5-18
Frequently Asked Questions
5-19
Basic Troubleshooting
I have files sitting on the server that are shared and yet
Pervasive.SQL cannot read them. What’s wrong?
How are the files shared? Pervasive does not support mapping a drive
letter using the Map Root under Novell, or using Redirected
mapping under Microsoft, or using the hidden Admin share (C$)
under Windows NT/2000.
Make sure that users have appropriate operating system login
credentials to access the file server.
Run Pervasive System Analyzer and choose the Network
Communications Test to be sure that you have proper connectivity.
5-20
Frequently Asked Questions
Compatibility. Click on Create File Version and set the value to the
file version to which you want to convert. From the menu, choose
Edit | Apply. Restart the database engine. These changes result in new
files created to be in the version selected.
From the Start menu, choose Programs | Pervasive | Pervasive.SQL
2000i | Utilities | Maintenance to start Btrieve Maintenance Utility.
Within this program, choose Options | File Information Editor.
Click Load Information and choose the data file that you want to
convert. Click Create and specify the name of the new, empty data
file you want to create with the older version format. Click OK to
create the file. Close the File Information Editor window, but do not
exit Btrieve Maintenance Utility.
From the menu, select Data | Copy. Enter the name of the source data
file and the name of the target data file (your newly created file with
the older version file format). Click Execute to copy the records into
the older version file. After the copying has finished, if you need the
new data file to have the same name as it did previously, save your
original data file with a different name, then save your new file using
the original file name.
ODBC and How can I tell if I am using ODBC to access my data files?
DDFs There are several ways to find out: first, look for .DDF files where the
data files are located. If you see them, then most likely you can access
the database using ODBC. Because it is possible to have DDF files
located in a different directory, you should also use PCC to
determine whether a database has been created for the data files you
want to access. Finally, you can ask your application vendor whether
their application uses ODBC to access the data files.
5-21
Basic Troubleshooting
You can also use the ALTER TABLE USING statement in SQL to
change the data file used by a particular table. Refer to SQL Engine
Reference for further information.
5-22
Frequently Asked Questions
5-23
Basic Troubleshooting
to create and maintain DDFs via the Btrieve API rather than through
the relational engine. The result is that you probably need to know a
bit more about databases and data types than you would with DDF
Sniffer, but you will wind up with fewer problems in the long run.
For more information, see the question and answer immediately
above.
5-24
Frequently Asked Questions
If you want to make existing DDFs and data files available for
remote access, check Use Advanced Settings. If you are creating
a brand new database from scratch, do not check this box.
6 Follow the prompts provided. For detailed procedures and
options, see Chapter 2 of this book and/or see Advanced
Operations Guide.
After you have created the Engine DSN on the server, you can access
the database using PCC. If you want to access the database using
ODBC-based applications, then you need to use ODBC
Administrator to create a local client DSN on your workstation. You
can do so by choosing Start | Programs | Pervasive | Pervasive.SQL
2000i | Utilities | ODBC Administrator. In ODBC Administrator,
click the System tab, then click Add. In the window that appears,
select Pervasive ODBC Client Interface and click Finish. In the
following window, type in a name for the local DSN, and enter the
server name. Click Get DSN List. In the box labeled Data Source
Name, choose the DSN that you created on the NetWare server. Click
OK.
You can now access the database on the NetWare server by
connecting to the local client DSN you just created.
I have two similar Btrieve files, and I created a DDF for the
first one. Since they are similar, can I use the same DDF
on the second Btrieve file?
The answer depends on how similar the files are. If the two files differ
only in the number of records, you can use the same DDF file. If there
are any differences at all in the number, order, names, or types of
fields or indexes, you cannot use the same DDF. In other words, you
can only use the same DDF if the record structure of the two files is
identical.
5-25
Basic Troubleshooting
Security tab. In the screen that appears, enter and confirm the master
user password.
Caution Do not forget the Master user password. You cannot turn off
security or perform administrative tasks within the database without
it. You may want to make a backup copy of your DDFs before turning
security on, in case you forget the password.
Next, you must grant the Master user access to the data files that have
owner names defined. You can grant the access by issuing this SQL
statement for each table that has an owner name:
GRANT ALL ON my_table ‘ownername’ TO Master
When you enter the statement, substitute the actual name of your
table and the appropriate owner name for that table, as indicated
above. Remember that each data file corresponds to an ODBC table.
If you don’t know which table corresponds to which data file, use
PCC to find out: right-click on the table in PCC, and choose Tasks |
Edit Table Design. In the Table Designer, click on the Statistics tab.
The Table Location field shows you the file that is referenced by that
table definition.
If security is important, then you must create users and assign
permissions for all users expected to access the database. You do this
by using CREATE USER, CREATE GROUP, and GRANT statements
in SQL. You can also use the Users and Groups feature of PCC.
If security is not important to you, you can avoid creating many users
and assigning privileges by granting access to PUBLIC, which means
anyone on your network can access the data. You can use this
statement:
GRANT ALL ON my_table ‘ownername’ TO PUBLIC
5-26
Frequently Asked Questions
5-27
Basic Troubleshooting
the SRDE requires DDFs for your data files. If you do not have DDFs,
in some cases you may be required to modify your file indexes before
you can create valid DDFs. The steps required to create DDFs for
Btrieve files are explained in Advanced Operations Guide, Chapter 12.
5-28
Frequently Asked Questions
5-29
Basic Troubleshooting
Server
You must have Pervasive.SQL 2000 SP2 or later installed. You must
have administrator privileges on the machine where the engine is
located that you want to run in debug mode. Using PCC, double-
click Configuration for that engine. Choose Server | Debugging |
Trace Operation and set the value to On. Click Edit | Apply.
You do not need to restart the engine.
Note After tracing operations, you should turn off Trace Operation,
following the same procedure as outlined above, making sure to click
Edit | Apply when finished. You may notice slower performance if you
run Pervasive.SQL in debugging mode.
Win32 Client
Obtain the debug version of the client DLLs from Pervasive. Back up
the original DLLs with the same names so you can restore them later.
Install the debug DLLs on your client system. For example, to debug
5-30
Frequently Asked Questions
Modify the registry entry Trace Level, setting its value to “99”. Enter
your desired trace file name and location, and set the value of
Append File to Yes, if desired.
5-31
Basic Troubleshooting
5-32
chapter
Pervasive.SQL Resources
and Contacts 6
A Guide to Pervasive.SQL Customer Information Resources
6-1
Pervasive.SQL Resources and Contacts
Printed Documentation
Pervasive.SQL 2000i SP3 comes with a printed copy of Getting
Started and Status Codes Quick Reference. A complete suite of online
documentation is installed on Windows when you choose the
Typical installation procedure. It is also available as an option in the
Custom installation procedure. The content is accessible through
the Start menu:
Programs | Pervasive | Pervasive.SQL 2000i | Documentation |
Pervasive.SQL 2000i Documentation.
Printed versions of the following titles are available for purchase:
! Getting Started with Pervasive.SQL (Server or Workstation/
Workgroup edition)
! Pervasive.SQL User’s Guide
! SQL Engine Reference
! Status Codes and Messages
! Pervasive Products and Services
! Advanced Operations Guide
To order manuals, please contact Pervasive Software using one of the
following methods:
Online: http://www.pervasive.com/products/manuals/
E-mail: [email protected]
Phone: +1-800-287-4383
6-2
Developer Zone
Developer Zone
The Pervasive Software Web site is a great source for Pervasive.SQL
information: http://www.pervasive.com. It is your most immediate
source for assistance with the product.
The link shown below is commonly referred to as Developer Center.
It is a great starting point from which to navigate to available
downloads, documentation, product updates, news articles, sample
code and tutorials. Developer Center also provides access to an
expansive technical library and training information.
http://www.pervasive.com/developerzone/
6-3
Pervasive.SQL Resources and Contacts
6-4
FTP Site
FTP Site
Pervasive Software strives to maintain close ties to developers using
Pervasive.SQL for their database applications. On the Pervasive FTP
site, you can find practical resources such as downloadable updates
and patches to our product offerings as well as additional debugging
tools, documentation, third-party tools, and beta releases.
ftp://ftp.pervasive.com/support/
6-5
Pervasive.SQL Resources and Contacts
Online Documentation
The latest versions of Pervasive.SQL product manuals in CHM, HLP
and PDF format are available for download from the Pervasive
Software web site. These titles include:
! Getting Started with Pervasive.SQL (Server or Workstation/
Workgroup edition)
! Pervasive.SQL User’s Guide
! SQL Engine Reference
! Status Codes and Messages
! Pervasive Products and Services
! Advanced Operations Guide
http://www.pervasive.com/support/technical/product/
6-6
DevWire
DevWire
DevWire is a monthly newsletter on all things Pervasive: learn about
Beta cycles and releases, Service Pack releases, current topics, FYIs,
FAQs, Pervasive Software Events in your area, trade shows where you
can find us, and much more!
To subscribe to DevWire, send an e-mail message with “add” as the
subject line to [email protected].
6-7
Pervasive.SQL Resources and Contacts
DevTalk
Pervasive Software’s DevTalk discussion forums are a great way to
share ideas with other customers, get technical questions answered,
and give feedback directly to Pervasive Software. Check out the figure
below to see some of the topics currently being discussed and watch
the web site for new topics as they appear!
http://www.pervasive.com/devtalk/
6-8
Newsgroup
Newsgroup
Many Pervasive.SQL customers enjoy participation in a
newsgroup—a learning environment in which users help users, with
some participation by Pervasive Software. The newsgroup is
managed by the end-user community, posting and answering
questions as they wish.
Pervasive Software is represented in the worldwide network of news
discussion groups at:
news://comp.databases.btrieve.
6-9
Pervasive.SQL Resources and Contacts
E-Mail
Pervasive Software welcomes your comments, suggestions and
requests for assistance via e-mail. Please submit to the following
contacts:
! [email protected]
For comments or concerns regarding the content of
Pervasive.SQL documentation. Requests for manuals should be
directed to your sales rep or “[email protected]”.
! [email protected]
For comments or concerns regarding the Pervasive.SQL utilities,
such as PCC, PSA, installation, and other Pervasive tools.
! [email protected]
For technical support for Pervasive.SQL. For a faster response,
we recommend submitting your request via the e-mail support
form located at:
http://www.pervasive.com/support/Email_Support.taf
! [email protected]
For information about Pervasive.SQL sales matters such as
contacts, pricing, and product specifications. You may also
submit the sales information form located at:
http://www.pervasive.com/contact/email_sales.tml
! [email protected]
For developer relations. A great way for developers to
communicate their ideas about all Pervasive products, interfaces
and programs.
! [email protected]
For questions regarding beta products and general beta
information, including Pervasive’s Beta Program.
! [email protected]
For general information about the company, marketing efforts,
public relations, and other general questions.
! [email protected]
For questions from investors.
6-10
Technical Support
Technical Support
Pervasive Software Technical Support Call Centers
! Support Center (Headquarters-Austin)
Hours: 7 A.M. to 7 P.M. Central Standard Time.
Phone: +1 512 231 6000
Toll Free: +1 800 287 4383
! European Service and Support Center (Belgium)
Hours: 9 A.M. to 6 P.M. Central Europe Time.
Phone: +32 2 710 1660
For detailed contact information for Pervasive Software offices
worldwide, refer to Pervasive Products and Services.
To receive a faster response to your technical support questions, we
recommend using the electronic support method located at:
http://www.pervasive.com/support/Email_Support.taf
6-11
Pervasive.SQL Resources and Contacts
6-12
Index
A BSTART, loading NSS volumes first 2-4
Btadmin utility 4-5
Access conflict 5-18
Bti.ini 2-36, 2-37, 4-25
Access methods 5-27
Btrieve
Access rights
and terminology 1-9
adding a group 3-32
owner names 5-25
adding a user 3-34
version 6.x and Pervasive.SQL 5-16
cannot perform the operation 5-8
Btrieve.nlm
problems due to lack of O/S rights 5-4
mixing versions of NLMs not permitted 5-27
Accessing
nwmkde.nlm and 5-27
remote database 2-42
SQL engine and 5-27
ACS
BTRV UNLINK 2-5
field in Table Designer 3-22
Building
Add column button 3-20
queries graphically 3-45
Add index button 3-21
Butil utility 4-7
Add segment button 3-21
Adding
databases 3-11 C
groups 3-32 Cannot access data after upgrade 5-19
tables 3-18 Case
users 3-34 field in Table Designer 3-22
Admin share not supported 5-20 Cell, defined 1-6
Administrative rights 2-6 Changing
granting 2-6 column attributes
required to create a database 3-11 restrictions 3-28
ADO 1-11 hard coded file path in DDF 5-21
Advanced Operations Guide 1-19 table definition 3-25
Advantages of Pervasive.SQL 1-10 Check Database Wizard
Amend table definition, see Modifying name of .exe 3-9
Attributes Checkdb.exe 3-9
column 3-21 Checking
Autostart databse consistency 3-55
keeping Workgroup engine from autostarting 5- Client
16 definition of 1-4
Available sessions DSN setup 2-42, 2-44
error in PCC if none available 5-9 installation 5-15
setting up database access 2-39
B troubleshooting network protocols 5-6
Client DSN 2-16
Backup
defined 2-14
online 5-32
Clustering 5-16
Benefits of Pervasive.SQL 1-10
CNVDDF utility 5-22
Bound databases 2-56
Index 1
Coexistence with previous versions 5-16 name of .exe 3-9
Column CREATE USER keyword 5-26
attributes 3-21 Createdb.exe 3-9
Column, defined 1-5 Creating
Columns databases 3-11
how to modify attributes 3-25 DDFs for existing data 5-23
Microsoft Access limited to 256 2-52 DDFs for old data, record size is wrong 5-20
too few when creating table for existing data 5-29 DSN on NetWare 5-24
Compatibility table for existing data file, too few columns 5-29
among Server, Workgroup, Workstation 1-12 tables 3-18
between versions users 3-34
where to find information 5-29 Cross-platform support 1-10
Components of Pervasive.SQL 1-3 Crtblwzd.exe 3-9
Concepts Cutting and pasting
basic database structures and terms 1-5 results of SQL statement 3-44
databases 1-2, 1-5
ODBC standard 2-14 D
Configuration Data
bti.ini 2-36, 2-37, 4-25 cannot access, troubleshooting 5-3
delay in, eliminating 3-5, 3-7 exporting 3-46
engine DSN 2-36 importing 3-46
odbc.ini 2-37, 4-26 modifying 3-42
server stored in files 5-27
O/S rights required 5-4 viewing 3-42
Conflict, access 5-18 Data definitions
Connection string stored in files 5-27
’ServerDSN’ or ’DBQ’ not found in 5-2 Data Dictionary Files See DDFs
Consistency checking 3-55 Data Export Wizard
Continuous operations 5-32 name of .exe 3-10
Converting Data files
data files to older file format 5-20 converting to older file format 5-20
v3.01 DDFs to current version 5-22 not affected by install/uninstall 5-15
Cost of ownership, lowest 1-10 re-use of space 5-31
Create Database similar
O/S rights required 5-4 sharing of DDFs 5-25
Create Database Wizard Data Import Wizard
creating a Client DSN 2-39 name of .exe 3-10
creating an Engine DSN on NetWare 2-28 Data replication 5-31
creating an Engine DSN on Windows 2-19 Data Source Names 2-16
name of .exe 3-9 Data type
prerequisites to creating a database 2-17 field in Table Designer 3-21
CREATE GROUP keyword 5-26 Database
CREATE PROCEDURE consistency checking 3-54
error code -4994 5-11 defined 1-2
Create Table Wizard definition of 1-6
column attributes 3-21 engine, definition of 1-3
2 Index
inconsistencies, check database wizard and 3-61 mixing among databases 5-23
mirroring 5-31 must exist for ODBC access 2-17
securing a 3-31 sharing among data files 5-25
security vs OS security 5-17 verifying against data files 3-55
structures 1-5 Debug
Database access how to run in debug mode 5-30
prerequisites 2-17 Default
setting up 2-14 field in Table Designer 3-22
setting up on client 2-39 Definitions
Database administrator, not required 1-10 cell 1-6
Database concepts 1-2 client 1-4
Database engine column 1-5
administrative rights 2-6 database 1-2, 1-6
starting 2-2 database engine 1-3
with PCC 3-38 engine 1-3
stopping 2-2 field 1-5
with PCC 3-38 how to modify column 3-25
Database Management System how to modify table 3-25
defined 1-3 index 1-6
functions of 1-3 join 1-8
Database names local 1-7
cannot retrieve 5-8 Namespace 3-2
Database security record 1-5
logging in as an administrator 2-13 remote 1-7
Databases requester 1-4
adding 3-11 row 1-5
binding 2-56 schema 1-6
creating 3-11 table 1-6
deleting 3-15 value 1-5
named 2-16 Delay
removing 3-15 in Configuration, eliminating 3-5, 3-7
dbmaint 2-36 Delete Database Wizard 3-15
Dbmaint utility 2-36, 4-17 Deleted records, re-use of disk space 5-31
DBMS, see Database Management System Deleting
DBNAMES (Named Databases) 2-16 a table 3-29
DBQ databases 3-15
not found in connection string 5-2 DSN 2-53
DDF Builder 5-23 group 3-36
DDF Ease 5-23 user 3-36
DDF Sniffer 5-23 Delimiter
DDFs 2-56 SQL statement in PCC 3-43
building for existing data 5-23 Detecting
changing hard-coded file path 5-21 non-standard DDFs 5-22
converting from old version 5-22 Determining
detecting non-standard 5-22 if DDFs are non-standard 5-22
how to keep safe 5-22 if ODBC access is used 5-21
Index 3
network protocol in use 5-19 defined 2-14
service pack level 5-15 Engine, defined 1-3
DevTalk, web forum 6-8 Error
DevWire, monthly newsletter 6-7 ’ServerDSN’ or ’DBQ’ not found 5-2
Directory field error 1114 5-2
in Create Database Wizard 2-23 Error code
Disk space -4994 5-11
re-use of 5-31 Error was encountered message
Documentation 1-18 troubleshooting 5-10
Advanced Operations Guide 1-19 Exception tables 3-60
different formats 5-17 Existing data
Getting Started 1-18 creating DDFs 5-23
Online help 1-20 Existing data file
Pervasive Products and Services 1-20 too few columns when creating table for 5-29
SQL Engine Reference 1-19 Export file
Status Codes and Messages 1-19 cannot read file 5-30
User’s Guide 1-19 Export Wizard, see Data Export Wizard
Drop Database Wizard Exporting
name of .exe 3-10 data 3-46
Drop Table Wizard expwizrd.exe 3-10
name of .exe 3-10
Dropdb.exe 3-10 F
Dropping a Table 3-29 Failover 5-16
Droptab.exe 3-10 FAQ, see Frequently asked questions
DSN Features of Pervasive.SQL 1-10
client 2-42 Field, defined 1-5
defined 2-14 Field.ddf 5-22
Unix client 2-44 File format
client DSN needed for many applications 5-6 converting data to older 5-20
concepts 2-14 version upgrade not needed for SQL access 5-27
creating on NetWare 5-24 File path
engine changing hard-coded in DDF 5-21
defined 2-14 File system security 1-21, 2-46
on a Unix server 2-36 File.ddf 5-22
recreating 2-17, 2-53 Files
removing 2-53 explanation of required 5-27
Dsnadd utility 2-44, 4-19 where data and metadata stored 5-27
Dump file Finding
cannot read it 5-30 information on upgrading 5-29
non-standard DDFs 5-22
E service pack level 5-15
Elements of Pervasive.SQL 1-3 Foreign key
Enforcing Referential Integrity 2-56 modifying table definition and 3-28
Engine components Frequently asked questions 5-12
different version than client 5-2
Engine DSN 2-16
4 Index
G index from a table 3-27
to display table properties 3-39
Garbage collection
to export data from an existing table 3-46
on disk 5-31
to find information 1-18
Getting Started guide 1-18
to grant a user administrative rights
GRANT keyword 5-26
on NetWare 3.2 2-11
Granting
on NetWare 4.2 or 5.0 2-11
administrative rights 2-6
on Unix 2-12
on NetWare 3.2 2-11
on Windows 2000 2-10
on NetWare 4.2 or 5.0 2-11
on Windows NT 2-9
on Unix 2-12
to import data into an existing table 3-50
on Windows 2000 2-10
to interpret engine status icons in PCC 3-7
on Windows NT 2-9
to list referential constraints 3-54
Group
to login as administrator 2-13
adding a user to 3-37
to modify data 3-42
adding to database 3-32
to register a remote server in PCC 3-4
deleting 3-36
to remove a remote server from PCC 3-4, 3-6
to set up a client DSN
H on a Unix workstation 2-44
How using ODBC Administrator 2-42
to access data via ODBC from other applications to set up database access
2-46 for a client workstation 2-39
to add on a NetWare server 2-28
column to a table 3-27 on a Unix server 2-36
existing user to a group 3-37 on a Windows server 2-19
index to a table 3-27 on a Workstation or Workgroup engine 2-19
new user to the database 3-34 to start and stop database engine
to apply a user count upgrade 5-18 on NetWare 2-4
to build a query graphically 3-45 on Unix 2-5
to change on Windows server 2-3
attributes of a column definition 3-27 to start and stop Windows services within PCC 3-
table definition without changing the data file 38
3-27 to turn off database security 3-32
to check to turn on database security 3-31
for orphan rows 3-57 to verify database consistency 3-57
referential integrity 3-57 to view data 3-42
whether table definitions match data file to view registered database engines 3-7
structure 3-55 to write and execute SQL statements 3-42
to create
new database 3-11
new table in a database 3-18
I
Icons
table definition for an existing data file 3-24
in PCC, interpreting 3-7
to delete
Identifying
column from a table 3-27
service pack level 5-15
existing database 3-15
Import Wizard, see Data Import Wizard
existing table from a database 3-29
Importing
existing user 3-36
Index 5
data 3-46 Local, defined 1-7
impwizrd.exe 3-10 Login
Inconsistencies, database OS vs DB 5-17
repairing 3-61 Lowest total cost of ownership 1-10
Increasing
user count 5-18 M
Index, defined 1-6 Manual pages 4-4
Index.ddf 5-22 Map Root not supported 5-20
Information Maximum users for workgroup engine 5-19
how to find 1-18 Meaning of "i" 5-29
Installation MGRSTART, loading NSS volumes first 2-4
client FAQ 5-15 MicroKernel Database Engine
Installing defined 1-3
data files not affected 5-15 starting and stopping
reboot NetWare 5.x after 5-16 NetWare 2-4
Integrity enforced 2-56 Unix 2-5
Interfaces Windows NT 2-3
ADO 1-11 Microsoft
ODBC 1-11 Access
OLE-DB 1-11 accessing Pervasive.SQL data using 2-49
supported for programming 5-27 limited to 256 columns 2-52
Excel
J accessing Pervasive.SQL data using 2-46
Join, defined 1-8 Migrating
NetWare to Windows server 5-28
K where to find information 5-29
Keywords Windows server to NetWare 5-28
CREATE GROUP 5-26 Mirroring, database 5-31
CREATE USER 5-26 MKDE, see MicroKernel Database Engine
GRANT 5-26 Mkded utility 4-21
console mode 4-24
daemon mode 4-23
L Modifying
Legacy data column attributes
creating DDFs for 5-20 restrictions 3-28
Legacy file format column definition, how to 3-25
converting data files to 5-20 data 3-42
License count table definition, how to 3-25
increasing 5-18 table properties 3-39
Licensing Monitor
workgroup engine 5-19 O/S rights required 5-4
Linked mode 3-25, 3-27 Multiple processors
Load balancing 5-16 use of 5-30
Loading Multiple queries
database engine 2-2 running 3-43
NSS volumes before BSTART/MGRSTART 2-4
6 Index
N determining if used 5-21
ODBC connections
Name field
Workgroup does not support remote 1-13
in Create Database Wizard 2-23
Odbc.ini 2-37, 4-26
in Table Designer 3-21
OLE-DB 1-11
Named databases 2-16
Online backup 5-32
Namespace
Online documentation
defined 3-2
format varies by computer 5-17
Naming databases
Online help 1-20
dbmaint utility 2-36
Operating system
from a Unix server 2-36
security vs DB security 5-17
NetWare
troubleshooting access rights 5-4
btrieve.nlm and SQL engine 5-27
Orphan rows 3-60
load dependencies 2-5
checking for 3-57, 3-60
MicroKernel Database Engine, starting and
Overview
stopping 2-4
Pervasive Control Center 3-2
migrating to Windows server 5-28
Owner names
nwmkde.nlm and btrieve.nlm required 5-27
and SQL security 5-25
ODBC and 5-24
cannot use PCC to grant permissions for files with
unloading Pervasive.SQL 2-5
owner names 3-32
NetWare 5.x
Ownership, lowest total cost of 1-10
reboot after installing Pervasive.SQL 5-16
NetWare NSS volumes 2-4
slower on updates 2-4 P
Network Password
communications troubleshooting wrong 5-10
verifying 5-19 PCC, See Pervasive Control Center 3-44
protocol Performance
determining 5-19 NSS volumes slower on updates 2-4
Network protocol Permissions
troubleshooting 5-6 adding a group 3-32
Non-standard DDFs adding a user 3-34
detecting 5-22 granting 3-33, 3-35
NSS volume support 2-4 Pervasive Control Center 3-2
Nulcnvwz.exe 3-10 accessing a remote server 3-4
Null adding
field in Table Designer 3-22 databases 3-11
modifying table definition and 3-28 column attributes 3-21
Null Conversion Wizard Create Table Wizard 3-18
name of .exe 3-10 creating
tables 3-18
O cutting and pasting SQL results 3-44
Delete Database Wizard 3-15
ODBC 1-11
deleting
concepts 2-14
databases 3-15
odbc.ini 4-26
eliminating delay in Configuration 3-5
setting up on NetWare 5-24
Export Wizard 3-46
ODBC access
Index 7
Import Wizard 3-46 Q
interpreting engine icons 3-7
Queries
linked mode 3-25
how to build graphically 3-45
overview 3-2
Query Builder 3-45
poll interval 3-5
Query Builder Diagram 3-43
registering a remote server 3-4
Query Builder Grid 3-43
setting database security 3-31
Query Text Pane 3-43
SQL Data Manager 3-42
Questions, frequently asked 5-12
stopping and restarting services 3-38
turning security on/off and 3-31
unlinked mode 3-25
R
viewing and modifying table properties 3-39 Record size
viewing database engines 3-7 wrong when creating DDFs for old data 5-20
wizards available 3-9 Record, defined 1-5
Pervasive Products and Services 1-20 Recreating DSNs 2-17, 2-53
Pervasive System Analyzer Redirected mapping not supported 5-20
name of .exe 3-10 Referential constraints
Pervasive.SQL listing 3-54
advantages 1-10 verifying 3-57
benefits 1-10 Referential integrity 2-56
client, defined 2-15 checking 3-54
components of 1-3 how to check integrity 3-57
explained 1-2 Registering a remote engine in PCC 3-4
features 1-10 Relational access
Server 1-12 setting up on NetWare 5-24
server, defined 2-15 Remote
Workgroup 1-12 database access 2-42
Workstation 1-12 Remote ODBC connections
Pervasive.SQL 2000i 5-29 Workgroup does not support 1-13
Pervasive.SQL utilities. See Utilities. Remote, defined 1-7
Pervasive.SQL v7 Remove column button 3-20
need to recreate DSNs 2-17 Remove index button 3-21
Pervasive_Admin security group 2-6 Remove segment button 3-21
Platform support 1-10 Removing
Precision a remote engine from PCC 3-4
field in Table Designer 3-22 a table 3-29
Preserving DDFs 5-22 databases 3-15
Primary key DSN 2-53
modifying table definition and 3-28 Repairing
Programming interfaces supported 5-27 database inconsistencies 3-61
Protocol Replication 5-31
determining network 5-19 Requester
psawizrd.exe 3-10 definition of 1-4
PVSW.LOG for SQL Relational Database Engine 5-26
client and server compatibility 5-3 troubleshooting client 5-4
Rights
administrative 2-6
8 Index
required to create a database 3-11 setting up 2-14
granting 3-35 database access on client 2-39
granting administrative Shadowing, database 5-31
on NetWare 3.2 2-11 Shared files
on NetWare 4.2 or 5.0 2-11 troubleshooting 5-20
on Unix 2-12 Size
on Windows 2000 2-10 field in Table Designer 3-21
on Windows NT 2-9 Smithware 5-23
Row, defined 1-5 SMP, see Multiple processors
Rows, orphan SQL
checking for 3-57, 3-60 building statements graphically 3-45
Running CREATE GROUP 5-26
in debug mode 5-30 CREATE USER 5-26
multiple queries at once 3-43 cutting and pasting results 3-44
executing statements 3-42
S GRANT 5-26
Scalable 1-10 running multiple statements at once 3-43
Scalable SQL 3.01 statement delimiter
converting DDFs to current version 5-22 changing in PCC 3-43
Scale SQL Data Manager 3-42
field in Table Designer 3-22 SQL Engine Reference 1-19
Scheduling events 5-27 SQL Query Plan Viewer
Schema, defined 1-6 name of .exe 3-10
Security SQL Relational Database Engine
administrative rights 2-6 defined 1-4
database 3-31 early file formats and 5-27
file system 1-21, 2-46 scheduler 5-27
logging in as administrator 2-13 setting up access on NetWare 5-24
OS login vs DB login 5-17 SQL requester 5-26
owner names vs SQL security 5-25 Sqlmgr utility 2-36, 4-25
turning database security off 3-32 bti.ini 2-36, 2-37, 4-25
turning database security on 3-31 console mode 4-27
Server daemon mode 4-26
registering in PCC 3-4 odbc.ini 2-37, 4-26
troubleshooting network protocols 5-6 SRDE, see SQL Relational Database Engine
ServerDSN Start up
not found in connection string 5-2 keeping Workgroup engine from autostarting 5-
Service pack 16
identifying level 5-15 Starting
Services database engine 2-2
starting and stopping with PCC 3-38 services with PCC 3-38
Setting Statement delimiter, changing 3-43
Database Security 3-31 Statements
Setting up how to build graphically 3-45
database access running multiple at once 3-43
Access to database writing and executing SQL 3-42
Index 9
Status Codes and Messages 1-19 remote 1-7
Stopping requester 1-4
database engine 2-2 row 1-5
services with PCC 3-38 schema 1-6
Stored procedures table 1-6
error code -4994 when creating 5-11 value 1-5
Support Troubleshooting
cross-platform 1-10 ruling out possible causes
Symmetric Multiprocessing, see Multiple processors client DSN not available 5-6
disabled client requester 5-4
T network outage 5-4
Table no server (engine) DSN available 5-6
column attributes 3-21 OS permissions problems 5-4
definitions server not accepting requests 5-5
verifying against data file structure 3-55 server not running, not installed 5-4
deleting 3-29 wrong network protocol settings 5-6
dropping
Dropping U
a table 3-29 Ucutil utility 4-28
properties Unable to connect error
modifying 3-39 troubleshooting 5-9
viewing 3-39 Unauthorized access
Table Designer 3-25 to data file with owner name 5-25
linked mode 3-25 Understanding
restrictions 3-28 databases 1-2, 1-5
unlinked mode 3-25 Uninstalling
Table link mode 3-25, 3-27 data files not affected 5-15
Table, defined 1-6 Unix
Tables client DSNs 2-44
adding 3-18 configuration
creating 3-18 bti.ini 2-36, 4-25
how to modify 3-25 engine DSNs 2-36
Terminal server 5-16 manual pages 4-4
Terminology MicroKernel Database Engine, starting and
Btrieve usage 1-9 stopping 2-5
cell 1-6 naming databases 2-36
client 1-4 user manual exclusions 4-2
column 1-5 changes/exclusions 4-2
database 1-6 utilities 4-2
database engine 1-3 utilities 4-5
engine 1-3 btadmin 4-5
field 1-5 butil 4-7
index 1-6 dbmaint 2-36, 4-17
join 1-8 dsnadd 2-44, 4-19
local 1-7 mkded 4-21
record 1-5 Mkded, console mode 4-24
10 Index
mkded, daemon mode 4-23 console mode 4-27
sqlmgr 4-25 daemon mode 4-26
sqlmgr, bti.ini 2-36, 2-37, 4-25 odbc.ini 2-37, 4-26
sqlmgr, console mode 4-27 ucutil 4-28
sqlmgr, daemon mode 4-26 Utilities, overview 1-1, 2-1, 5-1, 6-1
sqlmgr, odbc.ini 2-37, 4-26
ucutil 4-28 V
Unlinked mode 3-25, 3-27 Value, defined 1-5
Unloading Version
database engine 2-2 new, data files not affected by installing 5-15
Pervasive.SQL on NetWare 2-5 old, data files not affected by uninstalling 5-15
Updates Viewing
slower on NetWare NSS volumes 2-4 data 3-42
Upgrading table properties 3-39
can’t get to data after 5-19 Viewing and Modifying Table Properties 3-39
user count 5-18 Viewing database engines in PCC 3-7
where to find information 5-29
Use advanced settings field
in Create Database Wizard 2-23
W
User w3sqlqpv.exe 3-10
adding to a group 3-37 Web, scalable to 1-10
adding to database 3-34 Windows
deleting 3-36 MicroKernel Database Engine, starting and
User count stopping 2-3
how to apply 5-18 Windows server
troubleshooting expired license 5-9 migrating to NetWare 5-28
workgroup engine 5-19 Wizards
User name check database
OS vs DB 5-17 name of .exe 3-9
troubleshooting wrong 5-10 create database
User’s Guide 1-19 name of .exe 3-9
Users create table
files with owner names and 3-32 name of .exe 3-9
Users namespace node data export
cannot use with files that have owner names 3-32 name of .exe 3-10
Utilities data import
btadmin 4-5 name of .exe 3-10
butil 4-7 drop database
dbmaint 2-36, 4-17 name of .exe 3-10
dsnadd 2-44, 4-19 drop table
for Unix 4-5 name of .exe 3-10
mkded 4-21 null conversion
console mode 4-24 name of .exe 3-10
daemon mode 4-23 Pervasive System Analyzer
sqlmgr 4-25 name of .exe 3-10
bti.ini 2-36, 2-37, 4-25 SQL query plan viewer
name of .exe 3-10
Index 11
Wizards in PCC 3-9
Workgroup
and remote ODBC connections 1-13
database access 2-42
Workgroup engine
keeping from autostarting 5-16
licensing 5-19
maximum users 5-19
simultaneous access 5-18
X
Xtrieve
replacement for 5-28
Z
Z-DBA 1-10
12 Index