Users Guide
Users Guide
10
User’s Guide
Guide to Using Pervasive PSQL
trademarks Btrieve, Client/Server in a Box, Pervasive, Pervasive Software, and the Pervasive Software
logo are registered trademarks of Pervasive Software Inc.
Built on Pervasive Software, DataExchange, MicroKernel Database Engine, MicroKernel Database
Architecture, Pervasive.SQL, Pervasive PSQL, Solution Network, Ultralight, and ZDBA are
trademarks of Pervasive Software Inc.
Microsoft, MS-DOS, Windows, Windows 95, Windows 98, Windows NT, Windows Millennium,
Windows 2000, Windows XP, Win32, Win32s, and Visual Basic are registered trademarks 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.
Sun, Sun Microsystems, Java, all trademarks and logos that contain Sun, Solaris, or Java, are
trademarks or registered trademarks of Sun Microsystems.
All other company and product names are the trademarks or registered trademarks of their
respective companies.
© Copyright 2008 Pervasive Software Inc. All rights reserved. Reproduction, photocopying, or
transmittal of this publication, or portions of this publication, is prohibited without the express prior
written consent of the publisher.
This product includes software developed by Powerdog Industries. © Copyright 1994 Powerdog
Industries. All rights reserved.
This product includes software developed by KeyWorks Software. © Copyright 2002 KeyWorks
Software. All rights reserved.
This product includes software developed by DUNDAS SOFTWARE. © Copyright 1997-2000
DUNDAS SOFTWARE LTD., all rights reserved.
This product includes software developed by the Apache Software Foundation
(http://www.apache.org/).
This product uses the free unixODBC Driver Manager as written by Peter Harvey
([email protected]), modified and extended by Nick Gorham ([email protected]), with
local modifications from Pervasive Software. Pervasive Software will donate their code changes to the
current maintainer of the unixODBC Driver Manager project, in accordance with the LGPL license
agreement of this project. The unixODBC Driver Danager home page is located at
www.unixodbc.org. For further information on this project, contact its current maintainer: Nick
Gorham ([email protected]).
A copy of the GNU Lesser General Public License (LGPL) is included on the distribution media for
this product. You may also view the LGPL at www.fsf.org/licensing/licenses/lgpl.html.
User’s Guide
June 2008
100-004381-002
Contents
About This Manual . . . . . . . . . . . . . . . . . . . . . . . . . . . . . xi
Who Should Read This Manual . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . xii
Manual Organization . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . xiii
Conventions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . xv
iii
Contents
iv
Contents
Tables . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-28
Data Tables . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-28
System Tables. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-28
Table Properties . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-28
Data . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-31
Creating Data Through PCC . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-31
Importing Data with Bulk Data Utility . . . . . . . . . . . . . . . . . . . . . . . . 3-31
Importing Data with Import Data Wizard . . . . . . . . . . . . . . . . . . . . . . 3-31
Exporting Data with Export Data Wizard . . . . . . . . . . . . . . . . . . . . . . 3-32
Metadata . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-33
IN DICTIONARY Clause . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-33
USING Clause . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-34
Plain Statement. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-34
Exporting a Schema . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-35
Triggers, Stored Procedures, User-defined Functions, and Views . . . . . . . . . . . . 3-37
Groups, Users, and Security . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-38
Security Tasks . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-39
Configuration . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-50
v
Contents
vi
Contents
vii
Figures
viii
Tables
2-1 Action of Dependent Services Based on Action of Database Engine Services . . . 2-3
ix
Tables
x
About This Manual
xi
Who Should Read This Manual
This manual provides information for users who install and run
Pervasive PSQL client/server and Workgroup products.
Pervasive Software would appreciate your comments and
suggestions about this manual. As a user of our documentation, you
are in a unique position to provide ideas that can have a direct
impact on future releases of this and other manuals. If you have
comments or suggestions for the product documentation, post your
request at the Community Forum on the Pervasive Software Web
site.
xii
Manual Organization
This manual is divided into the following chapters:
Chapter 1—“Introducing Pervasive PSQL”
This chapter provides an introduction to Pervasive PSQL, and an
overview of utilities and Pervasive PSQL documentation.
Chapter 2—“Using Pervasive PSQL”
This chapter covers the basic tasks required to work with
Pervasive PSQL.
Chapter 3—“Using Pervasive PSQL Control Center”
This chapter explains how to get your work done using the
Pervasive PSQL Control Center utility.
Chapter 4—“License Administrator”
This chapter explains how to increase user counts and add,
delete, and view license keys.
Chapter 5—“Table Editor”
This chapter explains how to work with tables and columns
using Table Editor.
Chapter 6—“SQL Editor”
This chapter explains how to use SQL Editor to run SQL
statements against a Pervasive PSQL database.
Chapter 7—“Pervasive System Analyzer (PSA)”
This chapter explains how to archive, restore, and remove
Pervasive PSQL components and how to test network
connections and active installations.
Chapter 8—“Command Line Interface Utilities”
This chapter explains the utilities that provide a command line
interface.
Chapter 9—“Basic Troubleshooting”
This chapter provides information for troubleshooting and
resolving problems.
xiii
Chapter 10—“Pervasive PSQL 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.
xiv
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.
xv
xvi
chapter
1-1
Introducing Pervasive PSQL
1-2
Understanding the Pervasive PSQL Database Management System
1-3
Introducing Pervasive PSQL
integrity of the data files at all times, even when people and
applications are working with the data.
Utilities
The Pervasive PSQL database engines come with a variety of
graphical and command-line tools designed to provide support for
testing, configuring, and manipulating the many features and
options provided by Pervasive PSQL. Most of the utilities run on
Windows and allow remote function to Linux database server
engines.
Table 1-1 Summary of Pervasive PSQL Utilities
Pervasive PSQL Control Windows and Linux Primary utility for Pervasive PSQL. Lists engines and
Center databases available and allows you to set properties
(configure) objects.
Configuration property Windows and Linux Manipulates settings for Pervasive client and server
dialogs within PCC components.
1-4
Understanding the Pervasive PSQL Database Management System
Function Executor Windows Executes Btrieve operations, enabling you to learn how
the Btrieve interface works or test and debug an
application.
Maintenance Windows and Linux Performs common Pervasive PSQL file and data
manipulations, such as importing and exporting data.
SQL Editor - invoked Windows and Linux Allows you to execute SQL statements interactively and
within PCC add or edit data in tables.
Table Editor - invoked Windows and Linux Allows you to add, delete, or change the characteristics of
within PCC columns within a table, and to create a table.
License Administrator Windows and Linux Manages Pervasive PSQL license keys and user counts.
ODBC Administrator Windows Sets up Data Source Names (DSNs) for client and engine
interfaces.
Gateway Locator Windows Used to configure and maintain gateway locator files for
the Workgroup engine.
Query Plan Viewer Windows Displays query plans selected by the database engine so
you can better determine how to optimize SQL queries.
DDF Builder Windows Allows you to view, create, and change Pervasive PSQL
data dictionary files (DDFs) without modifying the
underlying data file.
Documentation
Pervasive PSQL comes with a complete set of online documentation.
For more information about the documentation, see “Using
Pervasive PSQL Documentation” on page 1-13.
1-5
Introducing Pervasive PSQL
Key Concepts
This section explains some basic concepts of databases and some of
the key concepts that distinguish Pervasive PSQL 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
Another element is 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. For
example, someone might point to a specific box in the table above
and ask, “What is the value of that field?”
Row or Record
Another 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-6
Key Concepts
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 PSQL, 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
does 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 PSQL, a database consists of one or more data
files and Data Dictionary Files (DDFs) on your hard disk. The DDFs
are special data files that contain all the definitions for tables,
columns, and other attributes that define the structure of your
database.
1-7
Introducing Pervasive PSQL
Schema
The term schema refers to the complete set of definitions that
describe the entire structure of a database. A typical schema includes
definitions for tables, columns, indexes, and many other attributes.
The DDFs for a database contain the database’s schema.
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.
1-8
Key Concepts
Relational
The term relational refers to the storage of data in the form of related
tables. The related tables allow relationships to be created between
sub-sets of data.
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?” We may
also answer such questions as, “Which consumer profile purchased
the most product B after buying product A?”
You can see how powerful relational data access is. The SRDE
component of Pervasive PSQL provides full relational access to your
data.
Join
A join refers to an association between columns of related tables.
Typically, a join operation is part of a SELECT query, which is used
to obtain information from related tables.
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.
1-9
Introducing Pervasive PSQL
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
application programming. Databases that are ODBC-enabled can be
accessed by any ODBC-standard software program.
As an end user of an application based on Pervasive PSQL, you may
not be able to choose which access method your application uses, but
your application vendor has most certainly taken this into account.
No other DBMS available today offers this combination of flexible
relational access and high-speed transaction throughput.
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-10
Understanding the DBMS Products
1-11
Introducing Pervasive PSQL
Crystal Reports Another optional product, Crystal Reports provides rich capabilities
for Pervasive for creating and formatting reports based on Pervasive PSQL
PSQL 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-12
Using Pervasive PSQL Documentation
Getting Started Getting Started with Pervasive PSQL helps you get Pervasive PSQL
running with installation, setup, and troubleshooting information.
Getting Started With Pervasive PSQL covers the following topics:
Preparing to install Pervasive PSQL v10.10
Installing Pervasive PSQL v10.10
Upgrading from previous versions of Pervasive PSQL or Btrieve
Configuring Pervasive PSQL v10.10
Troubleshooting your Pervasive PSQL v10.10 installation
Where to go for Pervasive PSQL product information and
technical support
What’s New What's New in Pervasive PSQL provides an overview of the new
features and changed behavior for the current release of Pervasive
PSQL relative to the most recent previous release. This book
provides summary information on new features and directs you to
the locations in the documentation where the new features are fully
discussed.
1-13
Introducing Pervasive PSQL
User’s Guide Pervasive PSQL User's Guide introduces Pervasive PSQL and
describes common user tasks. The guide discusses the database
engine, Pervasive PSQL utilities and other key components; the
differences between Server and Workgroup engines; and the
differences between ODBC and Btrieve access. Pervasive PSQL User's
Guide provides you with the basics to work with Pervasive PSQL
successfully.
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 Quick Reference is also included with your complete
documentation set.
1-14
File System Security
1-15
Introducing Pervasive PSQL
1-16
chapter
This chapter covers the basic tasks you need to know to work with
Pervasive PSQL databases. Included in this chapter are the following
sections:
“Starting and Stopping the Database Engine” on page 2-2
“Granting Administrative Rights for the Database Engine” on
page 2-8
“Setting Up ODBC Database Access” on page 2-15
“Setting up Database Access with PCC” on page 2-18
“Accessing Data on a Remote Engine Using PCC” on page 2-26
“Accessing Data via ODBC From Other Applications” on page 2-
29
“Deleting DSNs” on page 2-35
“Using the Fast User Switching Feature of Windows XP” on page
2-37
2-1
Using Pervasive PSQL
2-2
Starting and Stopping the Database Engine
Restart
Restart
2-3
Using Pervasive PSQL
2-4
Starting and Stopping the Database Engine
3 Click OK.
3 Click OK.
2-5
Using Pervasive PSQL
Note You will receive a warning message when trying to stop the
engine if any of the following is true:
2-6
Starting and Stopping the Database Engine
Starting and In Linux, the database engine runs as a daemon. The daemon is
Stopping the loaded as part of the installation process and is set to be always
Database available if you followed the complete installation.
Engine on You must be logged in as the root user to start and stop the Pervasive
Linux PSQL v10.10 daemon process. Use the shell script psql to start and
stop the process.
For Pervasive PSQL 64-bit Server, this command starts both the
transactional daemon and the relational daemon. The relational
daemon is 32-bit only.
For Pervasive PSQL 64-bit Server, this command stops both the
transactional daemon and the relational daemon.
2-7
Using Pervasive PSQL
2-8
Granting Administrative Rights for the Database Engine
Rights Within You may use one or more Pervasive_Admin groups within an Active
an Active Directory environment. See “Active Directory Service” on page 11-4
Directory in Getting Started With Pervasive PSQL.
Environment
Tasks for To grant a user administrative rights, follow the instructions for your
Granting platform:
Administrative “Granting Administrative Rights on a Windows Server” on page
Rights 2-9
“Granting Administrator Rights on Linux” on page 2-13
“Logging in as Administrator on any platform” on page 2-14
2-9
Using Pervasive PSQL
Note You must be logged onto the Windows server as a user with
full administrator-level rights on the server or be a member of
the Pervasive_Admin group defined on the server.
2-10
Granting Administrative Rights for the Database Engine
Default Setting
By default installation, both the Transactional and Relational
services set Log on to Local System Account.
2-11
Using Pervasive PSQL
4 Expand the tree for Local Policies, and click on User Rights
Assignment.
6 Click Add.
2-12
Granting Administrative Rights for the Database Engine
7 In the Name pane, click on the user or group for whose account
you want to grant the user policy. (For example, you could grant
the policy to the Pervasive_Admin group.)
8 Click Add.
The user name is added to the bottom pane. For example, the
following image shows that the Administrator has been added.
9 Click OK.
The user name is added to the settings for local security policy.
10 Click OK.
11 Exit the window for Local Security Settings, then exit
Administrative Tools.
2-13
Using Pervasive PSQL
Note Users created with btadmin are not related to Linux system
users. These users are known only to the database engine.
2-14
Setting Up ODBC Database Access
ODBC Standard Pervasive PSQL adheres to the Microsoft standard for ODBC
database connections. According to the standard, applications using
ODBC must connect to databases through Data Source Names
(DSNs) defined in the operating system.
Note Pervasive PSQL does not support File DSNs. You must use
User or System DSNs. System DSNs are generally preferred,
because they are available to all users on a given computer.
2-15
Using Pervasive PSQL
Database
Engine Engine DSN
Data
Files
Computer
Database
Engine DSN <No server engine
Engine
or server engine
Data
not running>
Files
Database Database
Client DSN Engine DSN Server
Client
Engine
Data
Files
Servers and Pervasive PSQL servers are also clients. The client components of
Clients Pervasive PSQL are installed with every Server engine or Workgroup
engine. So you can use your server machine to connect to other
servers as a client. Pervasive PSQL clients can connect to remote
machines where a Pervasive PSQL Server engine is installed.
2-16
Setting Up ODBC Database Access
Data Source The ODBC client-server architecture calls for the naming of each
Names specific data set so that it can be referred to by a well-known name.
There are generally three ways to create DSNs:
1 Create an Engine DSN from the server console.
2 Create an Engine DSN remotely from a client machine.
3 Create a Client DSN on each client machine.
While Pervasive tools can access remote databases without a
client DSN present on the client machine, ODBC-based
applications such as Microsoft Excel and Microsoft Access
cannot do so. You must create a client DSN on each client
computer that needs to access network databases from local
ODBC applications.
Applications Applications that use only the transactional interface do not require
Using the DSNs. Also, the Pervasive PSQL Java utilities do not require DSNs.
Transactional The Pervasive PSQL Control Center, for example, uses JDBC not
Interface ODBC.
Pervasive.SQL You must recreate all DSNs created with Pervasive.SQL 7 to access
v7 users them in Pervasive PSQL v10.10. However, you do not need to
rename existing database names. To re-create DSNs, follow the
instructions provides in “Deleting DSNs” on page 2-35.
2-17
Using Pervasive PSQL
By default, PCC creates a system DSN with the same name as the
database name. The new database has a DSN associated with it
and can be accessed through ODBC.
2-18
Setting up Database Access with PCC
2-19
Using Pervasive PSQL
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
For example, to create DBName TEST with relational integrity,
type:
dbmaint a -i -nTEST
2-20
Setting up Database Access with PCC
[DSN name]
Driver=/usr/local/psql/lib/libodbcci.so
Description=Test Pervasive database
DBQ=DBName
The engine DSN can also be created using the dsnadd utility
by typing the following at the command line:
% dsnadd -dsn=DSNname -db=DBName
2-21
Using Pervasive PSQL
The Pervasive PSQL Explorer pane is the column on the left side
of the window that contains a list of machines to which you are
connected.
Note Pervasive PSQL does not support File DSNs. You must use
User or System DSNs. System DSNs are generally preferred,
because they are available to all users on a given computer.
2-22
Setting up Database Access with PCC
2-23
Using Pervasive PSQL
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 Get DSN List 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-24
Setting up Database Access with PCC
2-25
Using Pervasive PSQL
2-26
Accessing Data on a Remote Engine Using PCC
2-27
Using Pervasive PSQL
You have now obtained data from the remote database engine.
For information on advanced operating and maintenance tasks,
including database operations, see the Advanced Operations Guide.
2-28
Accessing Data via ODBC From Other Applications
1 Start Excel.
2 From the Data menu, choose:
Get External Data New Database Query as shown below.
2-29
Using Pervasive PSQL
3 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.
Figure 2-13 Excel Display of ODBC Source List
If the database you want does not appear in the ODBC Source
list, see “Before You Begin” on page 2-29.
4 Click OK. You may be prompted to login to the Pervasive PSQL
database. If the database is not secure, leave the User and
Password fields empty. Otherwise enter your assigned user name
and password.
5 The Query Wizard opens. Simply follow the wizard to select
your options such as which tables to query, how to filter and sort
the data, and how you would like Excel to return the Pervasive
data to you for your use.
2-30
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.
2-31
Using Pervasive PSQL
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 the
Machine Data Source tab as shown in the next figure.
2-32
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-29.
2-33
Using Pervasive PSQL
8 The Access Link Tables dialog box opens. Click each table that
you want to import or link, and then click OK.
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-34
Deleting DSNs
Deleting DSNs
The procedures in this section do not delete Data Dictionary Files
(DDFs) or data files.
By default, when you delete a database in the Pervasive PSQL
Control Center, the associated DSN entries are removed
simultaneously.
You can clear those DSNs that you do not want to delete.
4 You can turn on automatic removal of DSN entries at anytime by
selecting Always remove associated DSN entries in:
Confirm DSN Removal dialog
General screen of the Preferences dialog.
2-35
Using Pervasive PSQL
2-36
Using the Fast User Switching Feature of Windows XP
2-37
Using Pervasive PSQL
Only one instance of the engine may be run at a time. You cannot
run separate copies of the engine within separate user sessions.
If you attempt to start the engine that has already been started by
another user, the engine will not restart. No error message
appears and no tray icon appears.
If started by a user, the engine runs in the session of the first
user to start the engine. The operating system rights of the
first user to start the engine determine access rights to the
database files. For example, a limited user can start the
Pervasive PSQL engine but cannot create a new database.
If the Pervasive PSQL Workgroup engine is started as a
service, the operating system rights of the System Account
determine access rights to the database files. See “Running
the Workgroup Engine as a Service” on page 8-15 in Getting
Started With Pervasive PSQL.
Changes made to a database in one session are available to users
of the database in other sessions. For example, User A adds a
record to Database 1. User B fast user switches to her session.
User B sees the record in Database 1 added by User A.
A database accessed by one user’s session can lock the database
from other users’ sessions. For example, User A has Database 1
open in the PCC. User B fast user switches to her session and
attempts to add security to Database 1. User B is prevented from
adding security to the database.
2-38
chapter
3-1
Using Pervasive PSQL Control Center
3-2
An Overview of Pervasive PSQL Control Center
Note that the PCC graphical user interface (GUI) may look
cosmetically different depending on your distribution of Linux.
Installing PCC On Windows platforms, PCC is installed by default when you install
a database engine or a client. See “Pervasive PSQL v10.10 Optional
Features” on page 2-6 in Getting Started With Pervasive PSQL.
On Linux, PCC is included in the full install. See “Full and Core
Installations” on page 12-3 in Getting Started With Pervasive PSQL.
Starting PCC on You start PCC from the Pervasive PSQL group on the Start menu.
Windows You may also run the executable file pcc.exe.
3-3
Using Pervasive PSQL Control Center
Starting PCC You start PCC by running the executable script file pcc from a
On Linux command prompt. The script file is located, by default installation,
in the usr/local/psql/bin directory.
We recommend that you start PCC from a command prompt and
not by double-clicking on the script file using a file browser
application. See Table 3-2, “Troubleshooting Guide for Running
PCC” on page 3-5.
The following requirements must be met to start PCC on Linux.
Table 3-1 Requirements for Starting PCC on Linux
Requirement Discussion
Pervasive PSQL server or client A compatible Pervasive PSQL server or client must already be
installed on the same machine.
X-Server access The xhost command controls which clients can access X-Windows
on the current machine. By default, xhost turns on access control.
This means that only the user who starts X-Windows could start
PCC.
Java Runtime Environment (JRE) The Standard Edition of the JRE is required to run PCC. You can
download the version from java.sun.com.
Some Linux distributions include gcj, a GNU compiler for the Java
programming language. If your Linux distribution includes the gcj
compiler, check your PATH environment variable. Ensure that the
path to the Standard Edition JRE appears before the path to the
gcj.
Rather than change your PATH variable, you could edit the pcc
script and set the correct path in the script.
java -version
A return message of "command not found" means that you need
either to install a JRE Standard Edition or add the JRE path to the
PATH environment variable. You can download the JRE from
java.sun.com.
export PATH=/usr/local/java/bin:$PATH
3-4
An Overview of Pervasive PSQL Control Center
If you have met the requirements to run PCC and still are having
difficulty running the utility, refer to the following troubleshooting
guide.
Table 3-2 Troubleshooting Guide for Running PCC
Troubleshooting Condition Discussion
You receive the error This error typically occurs if you try to start PCC by double-clicking
“java.lang.UnsatisfiedLinkError." on the script file using a file browser application. Start PCC from a
command prompt.
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/
usr/local/psql/lib
You receive the error "SWT no more You are not required to log in as user psql or root to run PCC.
handles" when trying to run PCC as However, if you are neither of these users, you must be a member
root or as user psql. of group pvsw.
export DISPLAY=:0.0
or
export DISPLAY=localhost:0.0
You want to view the error log file for By default, the log file of PCC errors is located in a subdirectory of
PCC or redirect the errors to the the user’s home directory (the subdirectory is dir_pcc/
console window. workspace/.metadata). For troubleshooting, you may find it
more convenient to redirect the errors to the console window.
pcc -consoleLog
You receive the following error The context of this error occurs if you attempt to administer the
message: "Unable to connect to local server.
database engine. Make sure the target
machine is accessible and an engine is To administer the local server, you must be a member of the pvsw
running on the target machine.” group or be the root user.
3-5
Using Pervasive PSQL Control Center
Editors and The PCC main window comprises editors and views:
Views Within “Pervasive PSQL Explorer”
PCC
“SQL Editor”
“Grid”
“Text”
“Outline”
“Table Editor”
3-6
An Overview of Pervasive PSQL Control Center
You can display and work with objects through the different editors
and views. Multiple editors of the same type (for example, SQL
Editor) can be open at the same time. Each object being edited is
represented by a tab on top of the editor. The tab contains the name
of the object. Data modified within an editor must be explicitly saved
(for example, with File Save).
Views, such as Pervasive PSQL Explorer, can be opened only one at
a time. Actions performed within a view are applied immediately. No
explicit save is required.
Can be closed
Can be minimized
Can be maximized
Can be restored to previous size
Can be opened in new window
Can be rearranged within PCC
main window
3-7
Using Pervasive PSQL Control Center
SQL Editor
SQL Editor allows you to run Structured Query Language (SQL)
statements against a Pervasive PSQL database. See “SQL Editor” on
page 6-1 for a detailed discussion.
Grid
The Grid window view shows in a matrix format, like a spreadsheet,
the result of running SQL statements. Each field is represented as a
3-8
An Overview of Pervasive PSQL Control Center
column and the data appears in cells within the columns. You can
change data directly in the Grid cells as well as add additional rows
to the Grid.
Both Table Editor and SQL Editor use the Grid. See “To view table
data” on page 5-13 and “Grid Window View” on page 6-4 for further
details.
Text
The Text window view shows in a text format the result of running
SQL statements. The text is display only. You cannot change data
values by changing the text, but you can copy text. See “Text Window
View” on page 6-5 for a detailed discussion.
Outline
The Outline window view allows you to view the SQL statements in
a tree structure. The root node of the tree is the same name as the
name of the SQL Editor window view. See “Outline Window View”
on page 6-7 for a detailed discussion.
Note that the editor must support an outline or the Outline window
view is not available. Currently, only SQL Editor supports an outline
view.
Table Editor
Table Editor allows you to add, delete, or change the characteristics
of columns within a table. The table may be one newly created or an
existing table that you want to edit. See “Table Editor” on page 5-1
for a detailed discussion.
Preferences You can set general preferences for your experience in PCC. You can
also set preferences for the window views in PCC or for the external
tools.
3-9
Using Pervasive PSQL Control Center
The following are the options that can be set in the General
Preferences:
Always remove associated DSN entries (see “Deleting DSNs” on
page 2-35)
Do not prompt for new database each time a SQL document is
opened (see “To set database context for an SQL query” on page
6-14.
Select Always remove associated DSN entries to have all DSN entries
for any database automatically deleted along with the database
without prompting.
Unselect Do not prompt for new database each time a SQL
document is opened to be prompted to select a database each time
you open a SQL document in the SQL Editor. If this option is
unselected, select it to use the most recently selected database when
you open a SQL document. The selected database is not maintained
across PCC sessions. If you close and reopen PCC, you will have to
select a new default database context.
3-10
An Overview of Pervasive PSQL Control Center
Additional Some utilities have not yet been tightly integrated within the
Utilities Windows PCC framework. However, they may still be started from
within PCC by selecting them through the Tools menu:
Function Executor (see “Testing Btrieve Operations” on page
12-1 in Advanced Operations Guide)
Monitor (see “Monitoring Database Resources” on page 11-1 in
Advanced Operations Guide)
Maintenance (see “Manipulating Btrieve Data Files with
Maintenance” on page 13-1 in Advanced Operations Guide)
DDF Builder (see “Getting Started with DDF Builder” on page
1-1 in DDF Builder User’s Guide)
License Administrator (see “License Administrator” on page 4-
1)
Rebuild (see “Converting Data Files” on page 14-1 in Advanced
Operations Guide)
Pervasive System Analyzer (see “Pervasive System Analyzer
(PSA)” on page 7-1)
Query Plan Viewer (see “Query Plan Viewer” on page E-1 in SQL
Engine Reference)
Gateway Locator (if PCC installed with Pervasive PSQL
Workgroup) (see “Gateway Configuration” on page 8-3 in
Getting Started With Pervasive PSQL)
3-11
Using Pervasive PSQL Control Center
External Tools You can add your own software programs to the PCC Tools menu.
This provides a convenient way to start the programs from PCC.
3-12
Services on Windows Servers
Tip You can also stop or restart all services with a single
command. Right-click the Services node in the tree, then click
Stop All Services or Restart All Services.
3-13
Using Pervasive PSQL Control Center
Manual You must manually start the service after the operating system
starts.
Services See “To set services startup policy by using PCC” on page 4-13 in
Properties Advanced Operations Guide.
3-14
Database Engines
Database Engines
You can use PCC to work with database engines that are on your
machine or with remote server engines. To work with a remote server
engine, you must introduce it to PCC. This procedure is called
registering the server.
Your local server is automatically registered to PCC when you install
Pervasive PSQL v10.10. The local server appears in the Pervasive
PSQL Explorer as the first entry under the Engines node.
3-15
Using Pervasive PSQL Control Center
3-16
Databases
Databases
A database is a collection of data stored together. Newly created
databases are empty and may be populated with tables. Refer to the
chapter “Pervasive PSQL Databases” in Advanced Operations Guide
for a detailed discussion of databases.
The properties of a database include such items as file locations,
referential constraints, security, and whether the database is bound.
Database You set properties for a database from a Properties dialog in PCC.
Properties The dialog contains a tree with the following property nodes:
“Code Page”
“Directories”
“General”
“Relational Constraints”
“Security”
3-17
Using Pervasive PSQL Control Center
Code Page
This section details the property settings for Code Page.
“Database Code Page” on page 3-18
“PCC Connection Encoding” on page 3-18
Note The database engine does not validate the encoding of the
data and metadata that an application inserts into a database.
The engine assumes that all data was entered using the encoding
of the server or the client, as explained in “Encoding Interaction”
on page 10-16 in Getting Started With Pervasive PSQL.
Note Changing the database code page does not convert existing
data or metadata in the database. To avoid data corruption,
ensure that the code page setting matches the current encoding
of any pre-existing data or metadata in the database.
3-18
Databases
PCC ignores “Database Code Page” PCC and the database automatically
and uses the encoding specified to read establish compatible encoding.
and insert data and metadata.
The database metadata and data are
(This is the legacy behavior of PCC.) translated from the encoding specified
for “Database Code Page” to the
encoding used on the system where
PCC is running.
When a database has OEM character data in it, the legacy solution
was for the access method, such as ODBC using a DSN, to specify
OEM/ANSI conversion. Now it is possible to set the OEM code page
for the database and have the access method specify automatic
translation. See also “Automatic” on page F-6 in SQL Engine
Reference.
Directories
The property settings for Directories specify where certain types of
files reside on physical storage.
“Dictionary Location” on page 3-19
“Data Directories” on page 3-20
3-19
Using Pervasive PSQL Control Center
Dictionary Location
This location specifies where the dictionary files (DDFs) reside on
physical storage. This location must be on the same server to which
you are connected (and where the database engine is running). The
location must be formatted as though you are working directly at the
server machine.
For Windows operating systems, enter a path in the form
drive:\path, where drive is a drive letter on the server.
For Linux, enter the standard Linux path format from root.
For example, if you are at a workstation connected to a Windows
server where the database engine is running, and you want to create
a new database on the C:\ drive of the server in the folder “mydata,”
enter the location as “c:\mydata.” You would enter it this way even if
you have a local network drive (for example, F:\) mapped to the
server’s C:\ drive.
Data Directories
The Data Directories list specifies where the data files reside on
physical storage. Add locations to the list by clicking New. Remove
lets you remove locations from the list. The locations must be on the
same server where the database engine is running.
Specify the location in the same manner as for the dictionary
locations.
General
General contains the following property settings:
“Bound Database” on page 3-20
“Integrity Enforced” on page 3-20
“Long Metadata (V2 metadata)” on page 3-21
“Relational Constraints” on page 3-21
Bound Database
Indicates whether or not the database is bound. Binding a database
prevents the DDFs or data files from being used in another database
and prevents a data file from having two or more different table
definitions within the same database.
3-20
Databases
Integrity Enforced
Specifies whether integrity constraints (security, RI, and triggers) are
enforced on the database. These constraints apply to Btrieve access
to the data files as well as ODBC/SQL access.
See “Setting Up Referential Integrity” on page 6-1 and “Interactions
Between Btrieve and Relational Constraints” on page 6-11.
Relational Constraints
Relational Constraints displays a matrix that lists the relational
constraints in effect for the database. See “Interactions Between
Btrieve and Relational Constraints” on page 6-11.
Security
Security contains property settings (tabbed areas) for Database
Security and Btrieve Security. See the chapter “Pervasive PSQL
Security” on page 7-1 for a complete discussion of security.
3-21
Using Pervasive PSQL Control Center
Database The name for the database that you want to appear in the “Identifiers and Object Names”
Name database listing in PCC. on page 1-3
Location This location must be on the same server to which you are “Dictionary Location” on page
connected (and where the database engine is running). 3-19 on page 3-19 and “Data
Location must be formatted as though you are working Directories” on page 3-20
directly at the server machine.
Bound Indicates whether or not the database is bound. Binding a “Interactions Between Btrieve
database prevents the DDFs or data files from being used and Relational Constraints” on
in another database and prevents a data file from having page 6-11
two or more different table definitions within the same
database.
3-22
New Database GUI Reference
Create Specifies whether you want data dictionary files (DDF) “Dictionary Location” on page
dictionary files created with the database. Dictionary files are required for 3-19
(if they do not relational (SQL) access to your data.
exist)
By default, the dictionary files and data files are created in
the same location. You may specify different locations for
these types of files after you create the database.
Typically, the only situation for which you would choose not
to create DDF files is when you have an unnamed legacy
database for which DDFs already exist, and you are now
creating a database name for that database. Under these
circumstances, the database engine links the new
database name with the pre-existing DDFs.
Relational Specifies whether integrity constraints (security, RI, and “Setting Up Referential
integrity triggers) are enforced on the database. These constraints Integrity” on page 6-1
enforced apply to Btrieve access to the data files as well as ODBC/
SQL access. “Interactions Between Btrieve
and Relational Constraints” on
page 6-11
Long The database engine supports two versions of metadata, “Versions of Metadata” on
Metadata (V2 referred to as version 1 (V1) and version 2 (V2). (V2 page 2-2 in SQL Engine
metadata) metadata is also referred to as “long metadata.”) Reference
Metadata version is a property of the database and applies “System Tables” on page C-1
to all tables within that database. A database cannot use in SQL Engine Reference
some tables with V1 metadata and others with V2
metadata. The DDFs of different metadata versions
cannot interact.
3-23
Using Pervasive PSQL Control Center
Database Specifies the code page property for the database. The “Database Code Page” on
Code Page default is “server default,” meaning the default operating page 3-18
system code page on the server.
Create Engine For ODBC access, you must set up a data source name “DSNs and ODBC
DSN (DSN) to refer to the database name. By default, the name Administrator” on page F-1 in
of the new DSN is the same as the Database Name. SQL Engine Reference
Multiple DSNs may point to the same named database.
“Automatic” on page F-6 in
The default is to create the DSN with an encoding SQL Engine Reference
translation option of “None.”
“None” on page F-5 in SQL
Note: The DSN that you are creating must be unique. You Engine Reference
cannot create a database if the name that you specify for
the database matches an existing DSN.
3-24
Pervasive PSQL Database Tasks
3-25
Using Pervasive PSQL Control Center
2 On the Properties dialog, click the tree node for which you want
to specify properties:
“Directories” on page 3-19
“General” on page 3-20
“Relational Constraints” on page 3-21
“Security” on page 3-21
3 Set the specific properties as required.
³ To delete a database
You cannot delete the database to which you are currently logged in.
See “To log out from a database engine” on page 3-15 in Pervasive
PSQL User's Guide.
If database security is set to “mixed” or “database,” you must first
remove the security. You cannot delete a database if security on it is
set to “mixed” or “database.” See “To turn off security using
Pervasive PSQL Explorer” on page 3-41 and “To turn off security
using SQL” on page 3-41.
1 In PCC Pervasive PSQL Explorer, right-click on the database
engine that you want to delete.
2 Click Delete.
3-26
Pervasive PSQL Database Tasks
Note If you select the option, PCC no longer prompts you for
DSN removal when you delete a database. PCC will
automatically remove all DSNs associated with the database
being deleted.
If you decide later to turn off the option, in PCC click Window
Preferences General.
3-27
Using Pervasive PSQL Control Center
Tables
Tables are the objects in which databases store data. Pervasive PSQL
contains two types of tables: data and system. Data tables are user-
created. Newly created ones are empty and must be populated with
data. System tables are created and populated as required by the
Pervasive PSQL database management system.
Data Tables Refer to the chapter “Table Editor” on page 5-1 for a detailed
discussion of data tables. That chapter also contains the tasks
pertaining to tables, such as creating one, deleting one, working with
columns, foreign keys, and so forth.
System Tables System tables appear in the Pervasive PSQL Explorer under the
System Objects node. You may view properties of them as explained
in “To view properties of a table.”
Table Table properties provides information about the table. Separate tabs
Properties let you view general properties, columns information, and indexes
information. The following table describes the parameters listed on
the General tab.
Table 3-5 Table Properties on General Tab
Parameter Description
Table Name Shows the name of the table as it appears in the database definition.
Table Location Shows the physical location of the data file associated with the table.
Dictionary Path Shows where the database's DDF files are located.
File Version Shows the file format version of the data file.
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 or Records Shows the number of records currently contained in the data file.
3-28
Tables
Number of Indexes Shows the number of indexes defined for the table.
Number of Duplicate Pointers Shows the number of linked duplicate indexes that can be added.
(Ptrs)
Number of Unused Pages Shows the number of pre-allocated pages available. If pre-allocation is
enabled, the MicroKernel pre-allocates a specified number of pages
when it creates the data file. Pre-allocation guarantees that disk space
for the data file is available when the MicroKernel needs it.
Variable Records Shows whether the data file contains variable-length records.
Variable Record Blank Truncation Shows whether blank truncation is enabled. If it is, the MicroKernel
truncates the blanks in variable-length records. Blank truncation is
applicable only if the Variable Records statistic is Yes and Data
Compression is set to No.
Record Compression Shows whether record compression is enabled. If it is, the MicroKernel
compresses each record it inserts into the data file. See “Record and
Page Compression” in Advanced Operations Guide.
Key Only File Shows the name of the key-only file for the table, if any. A key-only file
contains no data records but serves as an index to other Btrieve files.
FreesSpace Threshold Shows a percentage (5%, 10%, 20% or 30%) if the data file has a free
space threshold. The database engine 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).
Uses Alternate Collating Shows whether the table uses an alternate collating sequence for
Sequence sorting.
System Data Key Shows whether the data file has system data keys enabled.
Page Compression Shows whether page compression is enabled. See “Record and Page
Compression” in Advanced Operations Guide.
3-29
Using Pervasive PSQL Control Center
Tip You can use the table properties to view a list of the indexed
columns for the table.
3-30
Data
Data
The tables that you create with PCC are initially empty. You can add
data to them through PCC or by importing data. PCC provides a
wizard to export data and one to import data.
Creating Data See “To add rows of data to the Grid” on page 6-22.
Through PCC
Importing Data See “bdu” on page 8-7 in Pervasive PSQL User's Guide.
with Bulk Data
Utility
Importing Data The Import Data Wizard reads delimited data from a text file and
with Import adds the data to a table. The wizard allows you to specify the
Data Wizard following:
Text file that contains the data to import.
Field delimiter.
Encoding of the imported data. The encoding must match the
encoding that was used to export the data. See “Exporting Data
with Export Data Wizard” on page 3-31.
Whether or not the first line of the exported data contains the
column names. If the data was exported with column names as
the first line, it be must imported the same way.
Restrictions
The data must use a field delimiter of the comma, colon, or tab
character. A combination of carriage return and line feed must
delimit records.
3-31
Using Pervasive PSQL Control Center
Exporting Data The Export Data Wizard exports data from a table to a text file. A
with Export combination of carriage return and line feed delimits records.
Data Wizard The wizard lets you specify the following:
Name of the file to which the data is exported. If you include a
path with the file name, the directory or directories in the path
must already exist.
SQL statement on which the export is based. For example,
SELECT * FROM t1 would export all records from table t1.
Field delimiter (character used to separate data items in each
record).
Encoding of the exported data. For example, if you select ISO-
8859-1, the data is exported using that code page. The encoding
choices are obtained from the machine on which the utility is
running.
Whether or not to write the names of the columns as the first line
of the exported data.
3-32
Metadata
Metadata
Metadata is data about data. The metadata for a Pervasive PSQL
database is called a schema. For a relational database, the schema
defines the tables, the fields in each table, and the relationships
between fields and tables. Schemas are stored as data dictionary files
(DDFs) by Pervasive PSQL.
You can export the schema for one or more tables to a text file. The
exported schema contains the CREATE TABLE SQL statement (and
CREATE INDEX statement if applicable) to create the table and its
indexes. The exported file has a default file extension of “sql” and is
called an SQL script.
The SQL script file can be run (executed) in SQL Editor. See “To
open an SQL script” on page 6-16.
The SQL script contains the text “Unable to open table” if a table
cannot be opened. For example, the error occurs if an owner name is
set on a table or a table has been deleted outside of PCC while PCC
is currently running.
You have three options when exporting a table schema:
Include an IN DICTIONARY clause with a USING clause in the
statement
Include only the USING clause in the statement
Omit both the IN DICTIONARY clause and the USING clause
in the statement (a “plain” statement)
3-33
Using Pervasive PSQL Control Center
USING Clause The USING keyword allows you to associate a table with a particular
data file.
An exported statement looks similar to the following:
CREATE TABLE "Course" USING 'Course.mkd' (
"Name" CHAR(7) NOT NULL CASE ,
"Description" CHAR(50) CASE ,
"Credit_Hours" USMALLINT,
"Dept_Name" CHAR(20) NOT NULL CASE
);
CREATE UNIQUE INDEX "Course_Name" IN DICTIONARY ON
"Course"("Name");
CREATE INDEX "DeptName" IN DICTIONARY ON
"Course"("Dept_Name");
Plain Statement The “plain” statement omits the IN DICTIONARY clause and the
USING clause. The plain CREATE TABLE syntax is useful to
duplicate an existing table by simply changing the table name or to
create the same table in a different database.
An exported statement looks similar to the following:
3-34
Metadata
Exporting a You can export a schema for a particular table (or tables) or, at the
Schema database level, for all tables at once.
3-35
Using Pervasive PSQL Control Center
3-36
Triggers, Stored Procedures, User-defined Functions, and Views
3-37
Using Pervasive PSQL Control Center
3-38
Groups, Users, and Security
Security Tasks This section contains step-by-step tasks pertaining to security. The
tasks are divided into the following categories:
Category Description
Btrieve Security Policy Tasks Apply to security policies for the transactional interface
• “To set or change the security policy for a database” on page 3-42
• “To use an existing database, including the pre-defined DefaultDB, with
your Pervasive PSQL files” on page 3-43
3-39
Using Pervasive PSQL Control Center
General Tasks
Note As the Master user, logging in as another user can aid you
in testing the more restrictive permissions you have assigned this
user.
3-40
Groups, Users, and Security
3-41
Using Pervasive PSQL Control Center
3-42
Groups, Users, and Security
3-43
Using Pervasive PSQL Control Center
3-44
Groups, Users, and Security
3-45
Using Pervasive PSQL Control Center
3-46
Groups, Users, and Security
4 Click OK.
5 In SQL Editor, create the desired statement for the group or user.
Refer to the following statements in SQL Engine Reference:
“CREATE GROUP” on page 3-60
“ALTER GROUP” on page 3-8
“DROP GROUP” on page 3-137
“CREATE USER” on page 3-111
“ALTER USER” on page 3-26
“DROP USER” on page 3-143
“GRANT” on page 3-154
“REVOKE” on page 3-200
“SET PASSWORD” on page 3-250
6 To execute the statement, click SQL Execute in Text (or click
in the toolbar).
3-47
Using Pervasive PSQL Control Center
3-48
Groups, Users, and Security
3-49
Using Pervasive PSQL Control Center
Configuration
Configuration is the process by which you provide settings for
database engines and clients. You can specify configuration settings
with PCC for database engines and the local client.
In PCC, the configuration settings are properties of the engine or
client. In Advanced Operations Guide, see “To access configuration
settings in PCC for an engine” on page 4-4 and “To access
configuration settings in PCC for a local client” on page 4-4.
In addition, refer to the following sections in Advanced Operations
Guide for a discussion of configuration settings that can be
configured through PCC:
“Services Configuration Parameters” on page 4-13
“Server Configuration Parameters” on page 4-14
“Windows Client Configuration Parameters” on page 4-49
3-50
chapter
License Administrator
4
Working with License Keys and User Counts
4-1
License Administrator
License Key The license key also controls the conditions under which the
Platform Pervasive PSQL product permits installation of, or access to, the
database engine. The following table summarizes the restrictions
based on license key platform. For example, if your license key has a
platform of "Win64," you can apply that license to a database engine
running only on a Windows 64-bit platform. The license is invalid
for Windows 32-bit platforms and for any Linux platform.
Note that separate Pervasive PSQL Server products exist for each bit
architecture on each operating system. Pervasive PSQL Workgroup
is a 32-bit product that runs only on Windows.
Table 4-1 Restrictions Pertaining To License Key Platform
License Key Pervasive PSQL Server Operating OS Bit
Platform System (OS) Architecture
Any
Windows
Win32 1
Win64
1The Windows 32-bit version of Pervasive PSQL Server installed on a Windows
64-bit machine runs under the Windows-on-Window (WOW) execution layer.
4-2
License Administrator Concepts
User Count Each license specifies a user count. A user count allows the specified
number of computers to connect to the Pervasive PSQL database
engine concurrently. Users are counted by network address. The IP
address is used for TCP/IP; the IPX address is used for SPX/IPX.
Each computer that accesses Pervasive PSQL as a client counts as one
user. Multiple applications on a single client computer are counted
as one user, not separate users. Each Terminal Server session also
counts as one user.
Collectively, all applications that access the database engine, use the
same network protocol and address, and run on the same machine
as the database engine count as one user.
If one application uses TCP/IP and another application uses SPX/
IPX, two licenses are counted if both applications run on the same
machine. Similarly, if a machine contains multiple network cards, a
user is counted for each unique network address being used.
4-3
License Administrator
Terminal Server Each terminal server client session with the database engine counts
Licensing as one user. Collectively, all applications that access the database
engine and run on the same machine as the database engine also
count as one user.
Your user count licenses must be sufficient for the number of users
accessing the database engine. For example, suppose that you have a
user license for 20 users and your application runs on the same
machine as the database engine. The application itself counts as one
user. The database engine prohibits more than 19 terminal server
client sessions from accessing the database engine concurrently (19
+ 1 = 20). This applies whether the users connect through terminal
server sessions or remote database sessions.
Licenses for Pervasive.SQL 2000i and prior releases use a different type of license.
Prior Versions License Administrator automatically detects the database engine
of Pervasive version to which you want to apply a license. For Pervasive.SQL
PSQL 2000i and prior releases, you must use the legacy utility, User Count
Administrator, to work with the older license type. User Count
Administrator is installed as part of the prior release’s database
engine.
Refer to the Pervasive PSQL documentation of the prior release for
instructions on how to use User Count Administrator.
4-4
License Administrator Graphical User Interface
GUI Visual The following image shows the GUI. The table below the image
Reference describes the GUI objects.
Title Bar Shows the name of the utility and the name of the computer
that License Administrator is accessing. By default, the
computer name is the local computer to which you are
currently logged in.
Computer Name By default, shows the name of the computer that the License “To Select a Computer
Administrator is accessing. for License
Administration” on
This object is also an entry field into which you may type the page 4-12
name of a computer. If you have typed in a computer name but
not clicked Connect (or pressed Enter), the field could
contain a computer name that differs from the one in the title
bar. The title bar always shows the computer that License
Administrator is accessing.
4-5
License Administrator
Select Engine Allows you to choose a computer on which to administer “To Select a Computer
licenses. for License
Administration” on
page 4-12
License Key Accepts a license key (a combination of letters and numbers) “License Administrator
typed in or pasted. Concepts” on page 4-2
Apply License Key Applies the license key in the License Key field to the “To Apply a License
specified database engine. The title bar shows the computer Key or User Count
on which the database engine is running. Increase” on page 4-
14
This button is enabled if the license key in the License Key
field is valid and a database engine is running on the specified
computer.
Applied Licenses Lists the applied license information for the specified “User Count” on page
computer: 4-3
• Product – The name of the Pervasive PSQL product, such
as Server or Workgroup. “To Display Applied
• License Type – The type of license, such as permanent, Licenses” on page 4-
16
temporary or user count increase.
• User Count – The user count for the specific license.
• Platform – The combination of Pervasive PSQL Server
product, operating system, and bit architecture to which
the license applies. See Table 4-1.
• Expiration Date – The date on which a license expires, if
applicable, or "n/a" if not applicable.
• Vendor – A unique number identifying the vendor software
that installed the license.
• Application – A unique number identifying the application
to which the license applies.
4-6
License Administrator Graphical User Interface
Hide Expired Hides all expired licenses in the list of licenses for the current “To Hide Expired
session of License Administrator. Licenses” on page 4-
15
Remove License Removes the selected license(s) from the specified computer. “To Remove a
License” on page 4-15
This button is enabled when a Product name is selected in the
Applied Licenses list.
Refresh Re-displays the information for Applied Licenses and removes “To Refresh the List of
any license key information from the License Key field. The Applied Licenses” on
Computer Name field is cleared then displays the machine page 4-17
name to which License Administrator is currently connected.
Help Displays the online help for License Administrator. “To Display Help” on
page 4-18
4-7
License Administrator
CLI Syntax The CLI uses the same syntax on all platforms:
utility_name -option parameters
The utility name is one of the following:
clilcadm.exe (Windows 32-bit), w64clilcadm.exe (Windows 64-
bit)
clilcadm (Linux)
4-8
License Administrator Command Line Interface
-<apply | a> license_key Applies the specified license key to the computer
on which the CLI utility is running.
-<remove | r> license_key Deletes the specified license from the computer on
which the CLI utility is running.
See “CLI Tasks” on page 4-10 for the tasks pertaining to the CLI.
4-9
License Administrator
GUI Tasks
“To Start License Administrator from Pervasive PSQL Control
Center (PCC)” on page 4-11
“To Start License Administrator as a Stand-alone Application”
on page 4-12
“To Select a Computer for License Administration” on page 4-12
“To Apply a License Key or User Count Increase” on page 4-14
“To Hide Expired Licenses” on page 4-15
“To Remove a License” on page 4-15
“To Display Applied Licenses” on page 4-16
“To Determine a Total User Count” on page 4-17
“To Refresh the List of Applied Licenses” on page 4-17
“To Display Help” on page 4-18
CLI Tasks
“To Display All Applied Licenses” on page 4-18
“To Display a Specific Applied License” on page 4-18
“To Apply a License Key or Increase User Count” on page 4-18
“To Remove a License” on page 4-19
“To Display Help” on page 4-19
4-10
License Administrator Tasks
4-11
License Administrator
4-12
License Administrator Tasks
4-13
License Administrator
4-14
License Administrator Tasks
Note Once you click Hide Expired, the button remains disabled
for the duration of the License Administrator session. If you exit
License Administrator, then restart it, the button is again
enabled and all expired licenses once again show in the list.
³ To Remove a License
1 Ensure that the computer name in the title bar is the computer
from which you want to delete a database license. If not, select a
different computer as described in “To Select a Computer for
License Administration” on page 4-12.
4-15
License Administrator
4-16
License Administrator Tasks
4-17
License Administrator
³ To Display Help
1 Click Help from the menu bar of the License Administrator.
2 Click the desired area:
License Administrator Concepts — to understand the basics
of License Administrator
License Administrator Graphical User Interface — to
identify and understand the purpose of the objects on the
GUI
License Administrator Command Line Interface — to
understand the options and parameters for the CLI
License Administrator Tasks — to perform activities with
License Administrator.
4-18
License Administrator Tasks
³ To Remove a License
1 Enter the following command:
clilcadm -<remove | r> license_key
³ To Display Help
1 Enter either of the following commands:
clilcadm -<help | h>
clilcadm
4-19
License Administrator
4-20
chapter
Table Editor
5
A Tour of Pervasive Table Editor
5-1
Table Editor
Overview Table Editor is one of the editor windows within Pervasive PSQL
Control Center (PCC). Table Editor is a special type of editor that
contains multiple pages. The pages are represented by tabs across the
bottom of the editor. The editor allows you to add, delete, or change
the characteristics of columns within a table. The table may be one
newly created or an existing table that you want to edit.
To modify tables with Table Editor, you must have full administrator
rights on the machine on which the database engine is running even
if you are a member of the Pervasive_Admin group. See “Granting
Administrative Rights for the Database Engine” on page 2-8 and
“Database Security” on page 2-4 in Advanced Operations Guide.
Caution Backup all your data definition files (DDFs) and data
files before you perform functions through Table Editor. This
tool gives you the ability to modify your database table
definitions and data. If you inadvertently set the options
incorrectly or enter incorrect data, you could change your files in
an irreversible manner. Full recovery is possible if you have
performed a backup.
Table Editor Table Editor contains the following pages that you use as work areas:
Pages Columns
Indexes
Foreign Keys
SQL View
You select a page by clicking on its page name tab.
5-2
Table Editor Concepts
Columns Page
The Columns page lets you add, delete, modify columns, and set
primary keys. See “Columns Page” on page 5-6 for a description of
the areas on the Columns page. See “Columns Tasks” on page 5-10
for the tasks that you perform on the page.
Data Types
Refer to “Pervasive PSQL Supported Data Types” on page A-2 in SQL
Engine Reference for a list of the data types supported by the database
engine. That section lists the Pervasive PSQL data types for the
transactional and relational interfaces and the equivalent ODBC
data types. You may use any data types listed in “Pervasive PSQL
Supported Data Types” and that appear in the “Type” selection list
on the Columns page in Table Editor.
Null Values
The ability to modify the null attribute 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
deleting the index key, changing the data type, and re-adding the key.
Keep in mind that you must ensure that all associated index key
columns in the database remain synchronized.
For example, if you have a primary index key in table T1 that is
referenced by foreign keys in tables T2 and T3, you must first delete
the foreign keys. Then you delete the primary key and change all
three columns to the same data type and size. Finally, you must re-
add the primary key and then the foreign keys.
5-3
Table Editor
Indexes Page
The Indexes page lets you add and modify indexes and index
segments. See “Indexes Tasks” on page 5-11 for the tasks that you
perform on the page.
CREATE Statements
The CREATE TABLE statement shows the SQL used to create the
table. For a new table, one that has not yet been saved, the CREATE
TABLE statement reflects the SQL used to implement edits from the
other three tabbed dialogs. For example, if you were to create a new
table named “MyNewTable,” SQL View initially shows the following
CREATE statement:
CREATE TABLE MyNewTable(
);
5-4
Table Editor Concepts
If you were to add two CHAR columns to the new table on the
Columns page, SQL View reflects this in the CREATE statement:
CREATE TABLE MyNewTable(
"FirstName" CHAR(20),
"LastName" CHAR(30)
);
ALTER Statements
When you are editing an existing table, the ALTER TABLE
statements show what SQL is used to implement edits from the other
three Table Editor pages. For example, suppose that you edit the
“Course” table provided with the sample database DEMODATA. On
the Index page, you change the sort order for the “Name” index
segment from ascending to descending. SQL View shows the
following ALTER statements:
DROP INDEX Course.Course_Name;
CREATE INDEX Course_Name ON Course("Name" DESC);
5-5
Table Editor
Columns Page The Columns page can be considered the primary page of Table
Editor just as columns and rows are central to tables. The following
image shows the Columns page of Table Editor. The table below the
image describes the GUI objects.
See also “Columns Tasks” on page 5-10 for the tasks that you
perform on the page.
Figure 5-1 Columns Page
5-6
Table Editor Graphical User Interface
Column Specifies the alpha-numeric name for the column. “To specify a column name” on page 5-16
Name
“Relational Interface Limits” on page 2-2
in SQL Engine Reference
Type Specifies the data type of the column. “Pervasive PSQL Supported Data
Types” on page A-2 in SQL Engine
Reference
Size Specifies how many bytes are permitted for the “To set a column size” on page 5-17
data type. A shaded cell indicates that size does
not apply.
Precision Specifies the number of significant digits for “To set column precision” on page 5-19
floating point values. A shaded cell indicates that
precision does not apply.
Scale Specifies the number of significant digits that are to “To set a column scale” on page 5-19
the right of the decimal point for floating point
values. A shaded cell indicates that scale does not
apply.
Null Specifies whether NULL values are allowed for the “To set a column to allow or disallow
data type. A shaded square ( ) indicates that nulls” on page 5-20
nulls do not apply to the data type. A checked
square ( ) indicates that NULL values are
allowed for the data type.
Case Specifies whether the database engine uses case- “To set case sensitivity for a column” on
sensitive or case-insensitive comparisons when page 5-20
searching for character values in the database. A
checked square ( ) indicates that case-
insensitive values are used. A shaded square
( ) indicates that case sensitivity does not apply
to the data type.
5-7
Table Editor
Collate Specifies that an alternating collating sequence “To set a column collating sequence” on
(ACS) is used for sorting. Contains the path and page 5-21
ACS file name.
Default Specifies a default value for the column. The “To set a column default” on page 5-22
default value is used if you perform an SQL
INSERT for a row but do not provide a value for the
column.
Indexes Page The Indexes page allows you to add and delete indexes. The Indexes
page is explained within the context of the tasks that you perform for
indexes. See “Indexes Tasks” on page 5-11.
Foreign Keys The Foreign Keys page allows you to add and delete foreign keys. The
Page Foreign Keys page is explained within the context of the tasks that
you perform for foreign keys. See “Foreign Keys Tasks” on page 5-11.
SQL View Page The SQL View page displays, and allows you to copy, the SQL
statements used to create or alter the table. The CREATE TABLE
panel displays the SQL with which you could create the same table.
The ALTER TABLE panel reflects any editing changes to an existing
table that you make with Table Editor. When you save the table
changes, the ALTER TABLE panel is cleared and the ALTER
statement(s) becomes part of the CREATE TABLE statement.
The SQL View page is further explained within the context of the
tasks that you can perform. See “SQL View Tasks” on page 5-11.
5-8
Table Editor Tasks
Category Description
General Tasks General tasks apply to the overall use of the tool.
Getting Started
“To start Table Editor for an existing table” on page 5-12
“To start Table Editor for a new table” on page 5-11
“To work with columns” on page 5-12
“To work with indexes” on page 5-12
“To work with foreign keys” on page 5-12
“To view SQL statements applicable to the table” on page 5-13
5-9
Table Editor
Data
“To view table data” on page 5-13
“To identify tables with changes that have not been saved” on
page 5-13
“To save changes for the table being edited” on page 5-14
“To save changes for all tables being edited” on page 5-14
“To undo changes or to redo changes” on page 5-14
5-10
Table Editor Tasks
Foreign Keys Foreign keys tasks apply to the Foreign Keys page.
Tasks “To add a foreign key” on page 5-37
“To modify a foreign key” on page 5-39
“To delete a foreign key” on page 5-39
SQL View SQL view tasks apply to the SQL View page.
Tasks “To copy SQL statements” on page 5-39
“To maximize or restore view of SQL statements” on page 5-40
General Tasks
5-11
Table Editor
Note that in the same directory, no two files should share the
same file name and differ only in their file name extension. For
example, do not create a table (data file) Invoice.btr and another
one Invoice.mkd in the same directory. This restriction applies
because the database engine uses the file name for various areas
of functionality while ignoring the file name extension. Since
only the file name is used to differentiate files, files that differ
only in their file name extension look identical to the database
engine.
5 Click Finish.
5-12
Table Editor Tasks
5-13
Table Editor
Note You cannot save the changes to the structure of a table if the
table is open in SQL Editor. Close the SQL Editor referencing the
table then save the changes.
Note You cannot save the changes to the structure of a table if the
table is open in SQL Editor. Close the SQL Editors referencing
the tables then save the changes.
5-14
Table Editor Tasks
Columns Tasks
5-15
Table Editor
³ To delete a column
1 Ensure that the “Columns” page of Table Editor is active. If
required, perform the steps for “To work with columns” on page
5-12.
2 Right-click anywhere on the desired column row.
3 Click Drop Column.
5-16
Table Editor Tasks
5-17
Table Editor
5-18
Table Editor Tasks
5-19
Table Editor
Nulls specified
5-20
Table Editor Tasks
You can set a collating sequence only for applicable data types. A
shaded square indicates that case sensitivity does not apply to the
data type.
Case insensitive
Case sensitive
5-21
Table Editor
5-22
Table Editor Tasks
Date • now()
• curdate()
Time • now()
• curtime()
Timestamp • now()
1
The names are case insensitive. NOW() and now() are equivalent. The
parentheses are required. That is, NOW is invalid but NOW() is valid.
5-23
Table Editor
Index Tasks
³ To create an index
Only the database engine can add an index to an IDENTITY or
SMALLIDENTITY column. However, you can include an
IDENTITY or SMALLIDENTITY column as part of a multiple-
segment index.
Table Editor permits you to include an IDENTITY or a
SMALLIDENTITY column in the Indexes list if you have not saved
the table. However, the DBMS returns an error when you attempt to
save the table. After you delete the IDENTITY or SMALLIDENTITY
column from the list, you may then save the table.
1 Ensure that the “Indexes” page of Table Editor is active. If
required, perform the steps for “To work with indexes” on page
5-12.
2 Click Add.
The New Index dialog displays.
3 Type the name of the new index and click OK.
5-24
Table Editor Tasks
The new index appears in the Indexes list and the Index Segment
Details display. Note that the first column is populated into the
Columns list.
4 In the Columns list, select the Column to designate for the Index
or Index Segment.
5 Continue selecting columns from the list until all the segments
are added.
Note that a column can be selected for an index only once. Once
selected, the column is removed from the list of choices because
the column has already been designated in the index.
5-25
Table Editor
The new index appears in the Indexes list and the Index Segment
Details display.
5-26
Table Editor Tasks
5 In the Columns list, select the Column to designate for the Index
or Index Segment.
6 Continue selecting columns from the list until all the segments
are added.
Note that a column can be selected for an index only once. Once
selected, the column is removed from the list of choices because
the column has already been designated in the index.
5-27
Table Editor
The new index appears in the Indexes list and the Index Segment
Details display.
5-28
Table Editor Tasks
5 In the Columns list, select the Column to designate for the Index
or Index Segment.
6 Continue selecting columns from the list until all the segments
are added.
Note that a column can be selected for an index only once. Once
selected, the column is removed from the list of choices because
the column has already been designated in the index.
7 Click File Save or before changing pages within Table
Editor.
See also “Creating Indexes” on page 12-13 in Pervasive PSQL
Programmer's Guide, which is part of the Pervasive PSQL
Software Developer’s Kit (SDK).
5-29
Table Editor
³ To delete an index
The database engine creates some indexes, such as IDENTITY
column indexes and primary key indexes. These indexes are read-
only and cannot be deleted.
1 Ensure that the “Indexes” page of Table Editor is active. If
required, perform the steps for “To work with indexes” on page
5-12.
2 Click the desired index in the Indexes list.
3 With the Index you want to delete selected, click Delete in the
Indexes list.
5-30
Table Editor Tasks
4 From the list, click the desired column for the segment.
5-31
Table Editor
5-32
Table Editor Tasks
5-33
Table Editor
5-34
Table Editor Tasks
5-35
Table Editor
A check mark in the box indicates that the index value can be
modified. Lack of a check mark indicates that the index value
cannot be modified.
The default for all SQL data types is that the index column is
modifiable.
4 Click File Save or before changing pages within Table
Editor.
5-36
Table Editor Tasks
4 Click OK.
The new foreign key appears in the Foreign Keys list and the
Foreign Keys Details display.
5-37
Table Editor
6 Click the desired table in the list (only tables with a primary key
appear in the list).
The primary field(s) in the table appear in “Primary Table
Fields” column.
7 Match fields in the foreign table with fields in the primary table:
Click the empty cell in the “Foreign Table Fields” column for the
corresponding field in the “Primary Table Fields,” then click
to displays the list of permissible fields.
Note The data type and size of the fields must match. The list of
Foreign Table Fields contains only fields that are the same data
type and size as the primary table field being matched.
5-38
Table Editor Tasks
5-39
Table Editor
Icon Action
5-40
chapter
SQL Editor
6
A Tour of the SQL Editor
6-1
SQL Editor
Overview SQL Editor is one of the editors within Pervasive PSQL Control
Center (PCC). The editor allows you to run Structured Query
Language (SQL) statements against a Pervasive PSQL database. With
SQL statements, you may retrieve, create, change, or delete data in a
database provided you have the proper database permissions to
perform these actions.
The SQL statements that you may use with SQL Editor are
documented in SQL Engine Reference. See especially “Grammar
Statements” on page 3-2.
Figure 6-1 SQL Editor
6-2
SQL Editor Concepts
Caution Backup all your data definition files (DDFs) and data
files before you perform functions through SQL Editor. This tool
gives you the ability to modify your database table definitions
and data. You could inadvertently change your files in an
irreversible manner. Full recovery is possible if you have
performed a backup.
Statement Separators
SQL Editor requires a way to differentiate where one statement ends
and another begins. The way to differentiate statements is to place a
statement separator at the end of each statement. SQL Editor accepts
only the pound sign (#) and the semicolon (;) as statement
separators. See “To select an SQL statement separator” on page 6-17.
If you are not using temporary tables, you may use either separator
solely or mix their usage within a set of SQL statements. That is,
some statements can end with a pound sign and others with a
semicolon if you so choose.
Temporary tables begin with “#” or “##.” If you use temporary tables,
the pound sign may not be used as a statement separator. Instead, set
the statement separator to the semicolon.
Restrictions The following actions and SQL statements are not supported in SQL
Editor:
Creating a database
Use of dynamic parameters (indicated by a question mark)
COMMIT and START TRANSACTION
Displaying SQL Editor displays the results of running SQL statements in the
Statement following PCC window views:
Results Grid
Text
In addition, by default, an Outline window view displays a list of the
SQL statements in SQL Editor, typically with a shorter line length.
For example, you may want the Outline view to show only the first 5
words of each SQL statement in SQL Editor. “To set preferences for
SQL Editor, click SQL Editor.” on page 3-10.
6-3
SQL Editor
Note The Grid is also used by Table Editor to show table data
when you start Table Editor. That is, when you right-click on a
table then click Edit. See “To view table data” on page 5-13.
6-4
SQL Editor Concepts
Once you scroll to the bottom, the rows fetched indicator reports the
total number of records returned by the SQL statement.
6-5
SQL Editor
For how to change the font used by the Text window, see “To set
preferences for Text Output, click Text Output.” on page 3-10.
For PCC running on an operating system set to an English language
locale, the system selects a default font. For non-English locales, PCC
seeks to match the “default font” or “system font” if such can be
found. Otherwise it will select reasonable font.
Figure 6-3 Text Window View
If execution stops because of an error, the Text window view lists the
statement that was last run. Knowing the last statement run can help
you troubleshoot problems.
6-6
SQL Editor Concepts
Outline Window The Outline window view allows you to view the SQL statements in
View a tree structure. The root node of the tree is the same name as the
name of the SQL Editor session to which the outline corresponds.
Figure 6-4 Outline Window View
6-7
SQL Editor
SQL Editor provides the newly created object with a default name of
object_n, where object is the name of the object and n is an integer
that starts with one and increments by one. For example, if you
create a new view, SQL Editor contains a new tab named “View_1.”
After you save the object with a name of your choice, the tab reflects
the saved name.
6-8
Working with Common SQL Objects
The following table defines the common objects and refers you to
SQL Engine Reference for additional information.
Table 6-1 Description of Common SQL Objects in PCC
Object Description Related Information
Triggers A type of stored procedure that are “CREATE TRIGGER” on page 3-108 in SQL
automatically executed when data in a table is Engine Reference
modified with an INSERT, UPDATE, or
DELETE. “Common SQL Object Tasks” on page 6-12
Stored A collection of one or more SQL statements “CREATE PROCEDURE” on page 3-68 in
procedures that can take and return user-supplied SQL Engine Reference
parameters.
“Common SQL Object Tasks” on page 6-12
User-defined A scalar routine that returns a value. “CREATE FUNCTION” on page 3-53 in SQL
functions Engine Reference
Views A database object that stores a query and “CREATE VIEW” on page 3-113 in SQL
behaves like a table. Engine Reference
6-9
SQL Editor
6-10
SQL Editor Tasks
Category Description
Note If you use SQL Editor to change the structure of table with
SQL statements, refresh the Pervasive PSQL Explorer to see the
change. Right-click on the Tables node in Pervasive PSQL
Explorer then click Refresh.
General Tasks General tasks orient you to the overall use of SQL Editor.
“To start SQL Editor for a new SQL query” on page 6-13
“To start SQL Editor by displaying all records in a table” on page
6-14
“To set database context for an SQL query” on page 6-14
“To identify editor settings for SQL Editor” on page 6-15
“To create an SQL query or script” on page 6-16
“To open an SQL script” on page 6-16
“To type comments into SQL Editor” on page 6-17
“To cancel (undo) or restore (redo) typing actions in SQL
Editor” on page 6-18
6-11
SQL Editor
Grid Tasks Grid tasks apply to working with the Grid window.
“To change data within the Grid” on page 6-21
“To add rows of data to the Grid” on page 6-22
“To delete row(s) of data from the Grid” on page 6-23
“To enter a date, time, or timestamp data type in the Grid using
scalar functions” on page 6-24
“To refresh data in the Grid” on page 6-24
“To copy data from the Grid” on page 6-25
Text View Tasks Text view tasks apply to working with the Text window.
“To clear results from Text view” on page 6-25
“To select and copy text from Text view” on page 6-25
Outline View Outline view tasks apply to working with the Outline window.
Tasks “To minimize, maximize, or restore Outline view size” on page
6-26
Common SQL Common SQL Object tasks apply to working with triggers, stored
Object Tasks procedures, user-defined functions, and views.
“To create a common SQL object” on page 6-26
“To modify a common SQL object” on page 6-27
“To delete a common SQL object” on page 6-27
6-12
SQL Editor Tasks
General Tasks
Select the Set selected database as default for this session option
to use the selected database whenever you open a new SQL
Editor tab. If you leave this option unselected, you will be
prompted to select a database each time you open a new SQL
Editor tab.
4 Click OK.
SQL Editor appears as a new window view in PCC. By default,
PCC names the new document SQLDocn, where n is an integer
that starts with 1 and increments by 1. The document name
appears in the tab for SQL Editor.
6-13
SQL Editor
6-14
SQL Editor Tasks
3 Click OK.
Note Select the Set selected database as default for this session
option to use the selected database whenever you open a new
SQL Editor tab. If you leave this option unselected, you will be
prompted to select a database each time you open a new SQL
Editor tab.
6-15
SQL Editor
Block Meaning
6-16
SQL Editor Tasks
2 Navigate to the location of the text file, select the file, then click
Open.
By default, the Open dialog looks for files in the PVSW\bin
directory with a file name extension of “SQL.”
3 Execute the file. See “To run all SQL statements in SQL Editor”
on page 6-20 and “To run SQL statements in Outline view” on
page 6-20.
Note Based on the separator option you select, PCC looks for the
selected character(s) and identifies each as the end of a
statement. It sends each identified statement to the database
engine and displays results of that statement before sending the
next statement.
If you use # as a separator in a script but do not select the
# (Pound) option, you will receive an error message when you
run the script.
If you do not select ; (Semicolon) as a separator, but use a
semicolon as a separator in a script anyway, you will not receive
an error message if the statements are properly parsed. This is
because the database engine recognizes semicolons as
separators. However, PCC will not display the results for all the
statements. It will only display results for one statement
(probably the first statement). As far as PCC is concerned, if you
don’t select a semicolon as a separator, statements separated by a
semicolon are a single statement.
6-17
SQL Editor
6-18
SQL Editor Tasks
Note SQL Editor automatically uses the Text window view for
the results of SQL statements that are not SELECT statements.
Only SELECT statements use the Grid window view.
6-19
SQL Editor
Note SQL Editor automatically uses the Text window view for
the results of SQL statements that are not SELECT statements.
Only SELECT statements use the Grid window view.
6-20
SQL Editor Tasks
Note SQL Editor automatically uses the Text view for the results
of SQL statements that are not SELECT statements. Only
SELECT statements use the Grid.
Grid Tasks
Caution Moving the cursor from the cell automatically saves the
data changes to physical storage. You cannot explicitly save the
changes made to the cell.
6-21
SQL Editor
2 Click in the Value cell for each Column Name and type the
desired value.
The value must be a data type valid for that column.
Tip You can copy data from Grid cells and paste it into the Value
cells. Click on a Grid cell then right-click. Click Copy. Click on a
Value cell on the Add Rows dialog then right-click. Click Paste.
Also note that Ctrl+C and Ctrl+V provide the copy and paste
actions, respectively.
3 Click Add.
The record is added to the table. Also note that the option
Refresh Grid on Exit becomes enabled.
If you want to add multiple records, you can change values for
specific value cells then click Add. If you want to clear all of the
value cells, click Reset.
6-22
SQL Editor Tasks
4 Optionally, click Refresh Grid on Exit if you want the table data
refreshed .
When you close the Add Rows dialog, a refresh re-executes the
statement last executed in SQL Editor.
5 Click Close.
If Refresh Grid on Exit is enabled, the Grid displays the record(s)
that you just added (assuming that the last statement executed in
SQL Editor was SELECT * FROM Billing).
Caution Deleting a row from the Grid removes that record from
physical storage. No undo feature is available to reclaim the
deleted record.
1 Click any cell within the row (the record) that you want to delete.
You may also select and delete multiple rows. To select multiple
rows, press and hold down the Shift or Ctrl key, then click a cell
in each desired row.
2 Click Edit Delete or click .
3 Click OK to confirm the deletion.
6-23
SQL Editor
Date • now()
• curdate()
Time • now()
• curtime()
Timestamp • now()
1
The names are case insensitive. NOW() and now() are equivalent. The
parentheses are required. That is, NOW is invalid but NOW() is valid.
Note You can also omit the seconds for a time data type provided
that you include “AM” or “PM.” For example, 10:30 AM is a valid
entry. Time defaults to “AM” if you omit “AM” or “PM.” For
example, 10:30:00 is entered as 10:30:00 AM.
6-24
SQL Editor Tasks
Note When you copy an entire row or multiple rows, the rows
are pasted in the same layout as they appear in the Text window
view. You can specify the number of characters between the
pasted columns. Click Window then expand the Pervasive node
in the Preferences tree. Click Text Output in the tree and set the
desired value for Number of spaces between columns.
6-25
SQL Editor
6-26
SQL Editor Tasks
A new SQL Editor is opened that contains a default name for the
object on a tab. The name is in the form object_n, where object is
the name of the object and n is an integer that starts with one and
increments by one. For example, if you create a new view, a new
SQL Editor contains a tab named “View_1.” After you save the
object with a name of your choice, the tab reflects the saved
name.
4 Modify the skeletal SQL statement for the common object.
Tip Hover the mouse cursor on the statement to obtain a tool tip
on the syntax, which also includes an example.
6-27
SQL Editor
6-28
chapter
7-1
Pervasive System Analyzer (PSA)
PSA Concepts
Pervasive System Analyzer (PSA) is a utility that allows you to
perform the following actions:
View the Pervasive components on your system with version
information, usage status, size, and location.
Identify duplicate components on your system.
Test your network communications to verify connectivity.
Test the transactional interface to verify connectivity to the
database engine.
Test the relational interface to verify connectivity to the database
engine.
View Modules
This option allows you to view all Pervasive components and any
other files you specify. You can add additional components to the
search list. Their versions, usage status, file size, and location is
displayed. Duplicate files are identified so you can resolve any
potential conflicts.
View modules scans a machine for Pervasive components to
determine which ones are loaded into memory.
Network
The Network Communication tests verify that your client or or
workstation can communicate with network protocols to reach the
machine on which the Pervasive PSQL database engine is installed.
Using Advanced Settings, you can select the protocols to test as well
as the number of stress test messages to send. By default, the network
test connects using any available protocol that is installed on the
system and configured for use in Pervasive PSQL. See “Supported
7-2
PSA Concepts
Transactional Engine
This test verifies the ability of your client to connect to the Pervasive
PSQL database through the transactional interface (Btrieve).
When you run this test, PSA attempts to perform basic database
operations that are common to most transactional interface
applications. If your machine passes this test, then the following is
verified:
The Pervasive PSQL transactional interface is responding
Your client interface components are installed correctly
The network communication between the client and the
database engine is functioning correctly
Transactional interface applications running on your computer
should function correctly
Relational Engine
This test verifies the ability of your client to connect to the Pervasive
PSQL database engine through the relational interface (SQL). When
you run this test, PSA attempts to perform common SQL database
operations. A dialog box displays during the tests to show progress.
If your machine passes this test, then the following is verified:
Your Pervasive PSQL relational engine is running
Your client interface components are installed correctly
7-3
Pervasive System Analyzer (PSA)
Frequently Listed below are some frequently asked questions about PSA.
Asked What is the default log file name?
Questions
Can I use a different log file name?
What is the local default location for the log file?
What is the remote default location for the log file?
What kind of information is contained in the log file?
What happens to the information in the log file each time the
utility is run?
How do I run PSA?
When would I want to use PSA?
7-4
PSA Concepts
7-5
Pervasive System Analyzer (PSA)
View loaded Displays all current Pervasive PSQL components “View Modules Tasks” on page 7-8
Pervasive modules and version information in a table. Also allows you
to add additional components to the matrix.
Test active Test the Pervasive PSQL installation in three ways: “Test Active Installation Tasks” on
installation network connectivity, functionality of the page 7-10
transactional interface, and functionality of the
relational interface. Select the options that
correspond to the tests you wish to perform.
Test network Test the network connectivity to a machine running “To test your network” on page 7-
the database engine. The network tests display 10
detailed information about any problems
encountered during the test and provide
suggestions on how to remedy the problems.
Test transactional Tests the functionality of the transactional interface “To test the transactional
engine (Btrieve) to the database engine. interface” on page 7-11
7-6
PSA GUI Visual Reference
Test relational Tests the functionality of the relational interface “To test the relational interface” on
engine (SQL) to the database engine. page 7-12
Log file Allows you to specify a different log file location “To specify a different location for
than the default. PSA logs detailed information on the PSA log file” on page 7-13
the tests it performs. You can use this log file to
review tests at a later time or to forward them to
Pervasive Technical Support for further review.
7-7
Pervasive System Analyzer (PSA)
PSA Tasks
General Tasks
“To start PSA” on page 7-8
7-8
PSA Tasks
3 Click Next.
A dialog displays similar to the following figure.
Figure 7-2 View Modules Section of PSA
7-9
Pervasive System Analyzer (PSA)
7-10
PSA Tasks
6 If you want to control how the tests are run, click Advanced
Settings and complete the following steps:
a. By default, PSA uses the first available protocol. You can
force PSA to use one or more protocols by clicking Use Only
These Protocols.
b. Select the protocol options that you want PSA to test. Note
that the NetBIOS protocol is not supported on Pervasive
PSQL Server. The SPX protocol is not supported on
Pervasive PSQL Workgroup.
c. Specify the number of stress test messages to send by typing
a value for test messages. The default is 75. (After
successfully connecting using any protocol, PSA sends
stress test messages to ensure that the connectivity is
functioning correctly. )
d. Click OK to save the changes.
7 Click Next to start the test.
PSA runs a series of tests and displays the results.
If the test succeeds, PSA informs you that all test messages were
successfully transmitted. If the test fails, PSA lists the issues along
with tips on how to resolve them. The tips are also written to the
PSA log file.
8 Click Next.
9 Click Finish if you are finished using PSA, or click View Log File
to view the log.
7-11
Pervasive System Analyzer (PSA)
7-12
PSA Tasks
6 For Engine DSN, type the name of the DSN for the data source
you want to test. The default, demodata, uses the DSN for the
sample database installed with the database engine.
7 Select the operations you want to perform for the relational
interface (by default, all are selected):
Create Table
Read Data
Update Data
Insert Data
8 Click Next.
PSA performs the tests and displays the results. A check mark
indicates a test succeeds and an "x" indicates a test fails.
If all of the tests succeed, your client requester can use the
relational interface to communicate with the database engine.
9 Click Next.
10 Click Finish if you are finished using PSA, or click View Log File
to view the log.
Log Files Tasks ³ To specify a different location for the PSA log file
1 Start PSA and click Next.
2 In the Log File field, type a path to the PSA log file, or browse to
the desired location (click ).
If you want a log file that contains information only about the
current PSA session, clear the Append to log file option.
You can also specify a different name for the log file, but the
name applies only for that session of PSA. PSA defaults the name
to PSALog.txt the next time you execute PSA.
7-13
Pervasive System Analyzer (PSA)
7-14
chapter
8-1
Command Line Interface Utilities
Linux
In Linux, utilities are installed to /usr/local/psql/bin. The user
psql has the necessary environment variables to use the utilities. If
you wish to use utilities from accounts other than psql, follow these
instructions in Getting Started With Pervasive PSQL: “Pervasive
PSQL Account Management on Linux” on page 13-4.
Utilities by The following tables outlines the command line utilities, the
Platform and platform on which they are made available, as well as if a graphical
Engine Type user interface is available for the utility.
8-2
CLI Utilities Overview
bcfg Configures Pervasive Pervasive PSQL Control Yes Yes Yes Yes
components Center (see “Configuration
Reference” on page 4-1 in
Advanced Operations
Guide)
butil Repairs and manipulates Maintenance Utility (see Yes Yes Yes Yes
data files “Manipulating Btrieve Data
Files with Maintenance” on
page 13-1 in Advanced
Operations Guide)
8-3
Command Line Interface Utilities
pvdbpass Specifies user names and Pervasive PSQL Control Yes Yes Yes Yes
passwords for secure Center (see “Pervasive
databases PSQL Security” on page 7-
1 in Advanced Operations
Guide)
pvddl Processes SQL Pervasive PSQL Control Yes Yes Yes Yes
statements in a command Center (see “SQL Editor”
file on page 6-1)
8-4
Command Line Interface Utility Reference
8-5
Command Line Interface Utilities
bcfg
The bcfg utility is documented in Advanced Operations Guide. See
“Configuration Through CLI Utility” on page 4-5.
8-6
Command Line Interface Utility Reference
bdu
Description The Bulk Data Utility (BDU) is a command line utility that allows
you to load data from a delimited text file into a Pervasive PSQL
table. The table and database must already exist.
The BDU, the table, the database, and the Pervasive PSQL database
engine must all be located on the same machine. The delimited text
file must be locally accessible by the database engine server through
a local drive, mapped drive, mounted folder, or shared folder.
You may use a default delimiter or a user-specified delimiter. The
delimiting character must not be contained in the data itself. The
following tables list the permissible delimiters.
Table 8-2 Delimiters for Columns
Delimiter Indicated By
Tab \t (default)
Delimiter Indicated By
Carriage return \r
The BDU supports only the single quote (') and the double quote (")
characters as text qualifiers. The data file may contain column values
enclosed by single quotes or by double quotes. For example, the
8-7
Command Line Interface Utilities
Note When loading data with BDU into a secured database for
which the Btrieve Security policy is set to “Mixed,” the supplied
credentials (user name and password) must match those of a
Pervasive PSQL database user account and an operating system
user account.
Options
Table 8-4 Bulk Data Utility Parameters
8-8
Command Line Interface Utility Reference
first_row Optional Row 1 The first row in the delimited text file
with which the load begins. This
parameter allows you to skip a header
row. For example, if your header row is
row 1, set first_row to 2.
last_row Optional End of the source file Last row in source file (row will be
included in load). The load will stop after
the end row has been loaded
row_term Optional A new line character Row delimiter in the source file
text_qualifier Optional
8-9
Command Line Interface Utilities
BDU loads data into a table using the accelerated mode. During the
load of data, the MicroKernel does not perform transaction logging.
If you use archival logging, back up your data files again
Error Logging
By default, BDU logs all information and error messages to the
standard error stream (stderr). You may specify a log file to which the
utility writes the information or error messages.
Two types of errors are not logged: critical and recoverable. With
critical errors, BDU exits because it cannot perform error recovery.
For example, a missing delimited data file is a critical error.
With recoverable errors, BDU skips the error and continues
processing. The utility keeps a count of such skipped errors and exits
when it reaches a user-specified threshold. By default, the threshold
is set to zero.
Constraints
The following constraints apply to loading data with BDU.
Constraint Discussion
Table into which data is being BDU returns an error and does not attempt
loaded contains insert triggers to load the table. Drop the insert triggers on
the table then re-run BDU
Table into which data is being BDU does not attempt to load the table
loaded contains CLOB or BLOB
columns
8-10
Command Line Interface Utility Reference
Constraint Discussion
1
BDU is not aware of default values for a column defined during table creation or
update
Best Practices
If possible, run BDU when the database load is minimal or when no
concurrent sessions exist on the table being loaded.
If the table being loaded contains any indexes, drop the indexes
before using DBU. Re-create the indexes after the load is complete.
If the table being loaded contains any columns with check
constraints, drop the check constraints before using BDU. Re-specify
the constraints after the load is complete.
8-11
Command Line Interface Utilities
To run the BDU for a database that requires username and password:
bdu demodata BDU_Table C:\data_file.txt -u <username> -
p <password>
For instance, for loading to continue until 100 errors have occurred:
bdu demodata BDU_Table C:\data_file.txt -e 100
Example:
When the source file contains text in which each row is separated by ,
bdu demodata BDU_Table C:\data_file.txt -t ,
8-12
Command Line Interface Utility Reference
For instance, when the source file contains text in which each row is
separated by \n:
bdu demodata BDU_Table C:\data_file.txt -n \n
You may combine parameters. To load the first 15 rows from the
source file containing data that is separated by | and is enclosed in ':
bdu demodata BDU_Table C:\data_file.txt -f 1 -l 15 -t |
8-13
Command Line Interface Utilities
bmon
The bmon utility is documented in Advanced Operations Guide. See
“Monitor Command Line Interface” on page 11-21.
8-14
Command Line Interface Utility Reference
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 PSQL users. Users given administrator rights can
monitor engine status and configure the engine remotely.
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.
8-15
Command Line Interface Utilities
8-16
Command Line Interface Utility Reference
butil
Synopsis butil
-clone outputFile sourceFile [/O<owner | *>] [/pagecompresson |
/pagecompressoff] [/recordcompresson | /
recordcompressoff] [/UIDuname /PWDpword [/DBdbname]]
-clrowner sourceFile /O<owner | *> [/UIDuname /PWDpword [/
DBdbname]]
@commandFile [commandOutputFile]
-copy sourceFile outputFile
[/O< owner1 | *> [/O<owner2 | *>]] [/UIDuname /PWDpword
[/DBdbname]]
-create outputFile descriptionFile [< Y | N >] [/UIDuname /
PWDpword [/DBdbname]]
-drop sourceFile < keyNumber | SYSKEY >
[/O<owner | *>] [/UIDuname /PWDpword [/DBdbname]]
-endbu < /A | sourceFile | @listFile > [/UIDuname /PWDpword [/
DBdbname]]
-index sourceFile indexFile descriptionFile
[ /O<owner | *>] [/UIDuname /PWDpword [/DBdbname]]
-load unformattedFile outputFile [/O<owner |*>] [/UIDuname /
PWDpword [/DBdbname]]
-recover sourceFile unformattedFile [/O<owner |*>] [/UIDuname /
PWDpword [/DBdbname]]
8-17
Command Line Interface Utilities
Options Maintenance Utility command options are not case sensitive unless
the option is a filename.
If you run butil without specifying a command option or with an
invalid command option, a usage message is printed. The usage
message indicates that there is an optional /S command line
argument to butil. This argument is ignored under Linux.
For a complete discussion of the utility commands, options, and
examples, see the section “Btrieve Command-Line Maintenance
Utility (butil)” on page 13-38 in Advanced Operations Guide.
8-18
Command Line Interface Utility Reference
Description The clilcadm utility manages the user count licenses on your engine.
The 64-bit version of this utility is named w64clilcadm.
Options
8-19
Command Line Interface Utilities
dbmaint
list database names l [-a]. The -a option displays the full information
about the dbnames.
Options Commands
8-20
Command Line Interface Utility Reference
Options
-c=codepage Set the database code page. Zero specifies the server default
(-c=0).
-ssecuritymode Specify Btrieve security policy for database. Valid choices are:
Classic, Mixed, Database
Examples
To create a database named “TEST” with relational integrity:
% dbmaint a -i -nTEST
For the same database, to set the code page to the default operating
system code page:
% dbmaint m -nmydbase -c=0
To see a list of valid code pages (specify an invalid code page and
dbmaint returns a list of valid ones):
8-21
Command Line Interface Utilities
8-22
Command Line Interface Utility Reference
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.
or
dsnadd -dsn=myDSN -desc=DSN_description
-db DBname -host=psqlhost -sdsn=svDSN
Options
8-23
Command Line Interface Utilities
-srv-port | -port Server port number [1583] (See also “Changing the
Default Communication Ports” on page 10-10 in
Getting Started With Pervasive PSQL.)
8-24
Command Line Interface Utility Reference
isql
Description isql is an interactive ODBC test utility that you can use to test your
DSNs for their connectivity to databases. For example, to connect to
the DEMODATA database included with Pervasive PSQL, run isql
with the DSN as the first parameter. For example, isql DEMODATA.
The utility puts you in an interactive state with the database. From
that state, you can query the database (such as SELECT * FROM
Department).
To enable security on a database using isql, first connect to the
database as the “Master” user, then use the SET SECURITY
statement in SQL to set the Master user password. For example:
isql DEMODATA Master
SET SECURITY = password
Synopsis isql
Options
8-25
Command Line Interface Utilities
psc
Description Psc stands for Pervasive service controller. The utility retrieves and
sets control information about Pervasive PSQL services.
You must have administrator authority to run psc.
or
psc setpolicy servicename < automatic | manual | disabled
>
manual The service must be started manually after the operating system
starts
disabled The service is disabled and does not start after the operating
system starts
8-26
Command Line Interface Utility Reference
Examples
To start the Workgroup Engine service manually:
psc start psqlWGE
Note that “psql.all” is a shortcut method available only with the psc
utility. It affects both the “Pervasive.SQL (transactional)” service and
the “Pervasive.SQL (relational)” service, and can be used with the
psc parameters start, stop, or restart.
8-27
Command Line Interface Utilities
psregsvr
Options
8-28
Command Line Interface Utility Reference
pvdbpass
Description pvdbpass allows users to change their passwords for secure databases
without administrator intervention.
Synopsis The utility will prompt for the passwords with this syntax
pvdbpass database username [-server name] [-port number]
Options
password The current password for the user. You must provide the
original password in order to modify it. You can either
provide the password as a parameter or omit it and be
prompted.
8-29
Command Line Interface Utilities
8-30
Command Line Interface Utility Reference
pvddl
Options
8-31
Command Line Interface Utilities
See Also SQL Engine Reference for more information about supported SQL
syntax.
8-32
Command Line Interface Utility Reference
pvmdconv
Pervasive PSQL includes a conversion utility, pvmdconv, to convert
V1 metadata to V2 metadata. This command line utility is located in
the BIN subdirectory under the installation directory.
Parameters
8-33
Command Line Interface Utilities
[-<h | ?>] Prints on the screen the usage information for the
utility.
8-34
Command Line Interface Utility Reference
Conversion From All of the data from the V1 DDFs is directly copied to the V2 DDFs
V1 to V2 Metadata with the following exceptions:
X$View The value of Xv$Id is copied to Xv$Sequence has auto-increment values for each row.
Xv$Sequence in pvview.ddf.
The value of Xv$Trustee, which is The value is stored as -1 regardless of the security
a new column in V2 metadata, is setting for the database. That is, if the database has
explicitly stored as -1. security enabled or if the databases does not have
security enabled.
X$Proc The value of Xp$Id is copied to Xp$Sequence has auto-increment values for each row.
Xp$Sequence in pvproc.ddf.
The value of Xp$Trustee which is The value is stored as -1 regardless of the security
a new column in V2 metadata, is setting for the database. That is, the value is stored as
explicitly stored as -1. -1 if the database has security enabled or if the
databases does not have security enabled.
Conversion From The current release of pvmdconv does not support conversion from
V2 to V1 Metadata V2 to V1 metadata.
Examples For default locations of Pervasive PSQL files, see “Where are the
Pervasive PSQL files installed?” on page 7-2 in Getting Started With
Pervasive PSQL.
Default Conversion
To convert the sample database DEMODATA to V2 metadata
(assuming a default installation on a Windows platform):
pvmdconv -o 2 -d file_path\PSQL\Demodata\ -n demodata
8-35
Command Line Interface Utilities
8-36
Command Line Interface Utility Reference
8-37
Command Line Interface Utilities
pvnetpass
Synopsis pvnetpass [-g] {-a | -r | -m} server [-u user] [-p pwd]
pvnetpass -d
8-38
Command Line Interface Utility Reference
Options
From all users (-g) to all servers ('*'), use default credentials
joe:password
pvnetpass -g -a '*' -u joe -p password
8-39
Command Line Interface Utilities
8-40
Command Line Interface Utility Reference
rbldcli
Options For a complete discussion of the rebuild utility, see “Command Line
Parameters” on page 14-18 in Advanced Operations Guide.
See Also Advanced Operations Guide for more information about the Rebuild
utility.
8-41
Command Line Interface Utilities
8-42
chapter
Basic Troubleshooting
9
How to Identify and Solve Common Problems
9-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 9-2
“I get an error about ServerDSN or DBQ was not found in the
connection string” on page 9-2
“I get a message about Engine components’ version is different
than my client components’ version” on page 9-2
“I can’t get to my data on the server engine” on page 9-3
“PCC runs slowly or hangs when retrieving large record sets” on
page 9-7
“PCC crashes when browsing a directory structure using the File
Open dialog or when adding an external tool” on page 9-8
9-2
General Troubleshooting
9-3
Basic Troubleshooting
9-4
General Troubleshooting
You can now be certain that the server engine is installed and
running.
5 The next step is to ensure that the server engine is accepting
remote communication requests.
In PCC, ensure that the remote database engine is configured to
accept remote requests. If you are having difficulty accessing a
Windows 32-bit server engine remotely, then you must check the
setting at the server itself. You must have administrative
permission on the server (or membership in the
Pervasive_Admin group) in order to do so. In PCC, right-click
on the server, then click Properties. Click Access and ensure that
Accept Remote Request is selected.
You can now rule out the possibility the server is not accepting
remote requests.
6 Note: If your application uses pure Btrieve access only, without
ODBC, then skip this step.
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, expand the Databases node 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.
9-5
Basic Troubleshooting
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.
Follow the instructions in “Setting Up ODBC Database Access”
on page 2-15 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-21. 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 PSQL 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).
First, determine what protocols ought to be used on your
network. If you have a Linux network or a 100% Microsoft
network, then your preferred protocol is TCP/IP.
9-6
General Troubleshooting
Once you know what the protocol should be, you should ensure
that your server is using this protocol. You must have
administrative rights on the server operating system (or be a
member of Pervasive_Admin) to perform this task. In PCC,
right-click on the server name then click Properties. Click
Communication Protocols. Ensure that the correct protocol is
listed in the Supported Protocols list and that TCP/IP is selected.
Ensure that your client is using the same protocol. Using PCC,
right-click on Local Client then click Properties. Click
Communication Protocols and ensure that the correct protocol
is selected in the Supported Protocols list.
9 If you have performed all of the above tasks with no success at
accessing your data, refer to “Pervasive PSQL Resources and
Contacts” on page 10-1 for more ways to get help.
9-7
Basic Troubleshooting
The -vm parameter is required if you specify the JRE. The full path to
javaw.exe must be enclosed by double quotes if the path contains
spaces.
Note that you can combine the parameters for this command with
those discussed in the previous troubleshooting topic. The -vm
parameter must be specified first. For example, you would start PCC
as follows:
pcc.exe -vm "e:\Program Files\Java\jre1.5.0\
bin\javaw.exe" -vmargs -Xms256M -Xmx256
9-8
Error Messages from PCC
9-9
Basic Troubleshooting
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. 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.
9-10
Error Messages from PCC
9-11
Basic Troubleshooting
at the next logon. Make sure the user is not also a member of a group
that has restricted permissions.
For Windows 32-bit platforms, be sure that the user is set up as a
local user on the system, not a network user. Network users have a
domain name and a back slash 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.
9-12
Frequently Asked Questions
Installation
Will I lose my data files if I uninstall my existing version of the
product, or install a new version?
Why do I not see in PCC Pervasive PSQL Explorer the “plug-in”
product that I just installed or upgraded?
What type of client install should I do?
How can I be sure what service pack level of client I am running?
Is Pervasive PSQL supported on a Terminal Server?
Can I install Pervasive PSQL in a Failover environment? or
Can I install Pervasive PSQL in a Clustering environment?
Can I install Pervasive PSQL in a Load Balancing environment?
Can I install Pervasive PSQL on a server running Btrieve v6.x or
earlier?
How do I keep my Workgroup Engine from starting up
automatically when I reboot?
PCC
How do I start PCC on Linux?
Security
When do I login using an operating system user and password,
and when do I login using a database user and password?
Why do I get a “log in failed” message when I have a
Pervasive_Admin group defined or I have administrator rights?
User Counts
How do I apply a User Count Upgrade?
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?
9-13
Basic Troubleshooting
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.
9-14
Frequently Asked Questions
9-15
Basic Troubleshooting
9-16
Frequently Asked Questions
7 Use the Bulk Data Utility (BDU) to populate the tables with data
(see “bdu” on page 8-7).
a. Open a command prompt.
b. Go to the "restore" directory for DEMODATA. An "SDF"
file exists for each table in DEMODATA.
c. For each SDF file, use BDU to load the data into the table.
For example, to load the data for the "Billing" table use the
following command. The comma is the field delimiter in
the file.
bdu demodata billing billing.sdf -t ,
Miscellaneous
I dumped Btrieve records to a file and now I can’t read the file.
What happened?
Does Pervasive PSQL take advantage of multiple processors?
How do I run Pervasive PSQL in trace mode?
Does garbage collection occur in the data files and indexes? For
example, is space from deleted records recovered or reused?
Is database shadowing available, allowing a complete up-to-date
second copy of the database to exist on another drive or
machine?
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?
9-17
Basic Troubleshooting
9-18
Frequently Asked Questions
9-19
Basic Troubleshooting
Once you start to work with the data itself, then you must supply a
database user and password, if prompted. If database security is
turned off, then you would never need a database user name or
password. In this case, you would only need an operating system user
and password to perform administrative tasks, as noted in the
preceding paragraph.
9-20
Frequently Asked Questions
9-21
Basic Troubleshooting
I have files sitting on the server that are shared and yet
Pervasive PSQL cannot read them. What’s wrong?
How are the files shared? Pervasive does not support mapping a drive
letter using Redirected mapping under Microsoft, or using the
hidden Admin share (C$) under Windows 32-bit platforms.
Make sure that users have appropriate operating system login
credentials to access the file server.
9-22
Frequently Asked Questions
9-23
Basic Troubleshooting
original data file with a different name, then save your new file using
the original file name.
ODBC and Frequently asked questions about ODBC and dictionary files.
DDFs
How can I tell if I can use ODBC to access my data files?
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.
9-24
Frequently Asked Questions
special files that must remain synchronized with each other and with
the data files at all times.
Standard dictionaries do not have case sensitive table names or field
names. That is, the column definitions for column Xf$Name in
file.ddf and column Xe$Name in field.ddf have the Case flag set,
meaning the values are case insensitive.
DDFs are Btrieve files and thus can be opened and viewed (not
updated) using the Function Executor. This is one way to confirm
the contents of file.ddf or field.ddf.
On some non-standard dictionaries, the DDFs file.ddf, field.ddf,
and/or index.ddf do not exist. Such dictionaries do not work with
our products. For example, if you see a file called x$file.ddf, instead
of file.ddf, you can assume your DDFs are non-standard.
Non-standard DDFs are unlikely to work properly with Pervasive
PSQL Control Center or the relational engine.
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.
9-25
Basic Troubleshooting
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, see use
PCC to find out. Right-click on the table in PCC then click
Properties. Click Information in the tree. The File Name 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 the CREATE GROUP and GRANT statements in SQL. You
can also add users and groups with PCC. See “Users and Groups” on
page 7-3 in Advanced Operations Guide.
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
9-26
Frequently Asked Questions
9-27
Basic Troubleshooting
I dumped Btrieve records to a file and now I can’t read the file.
What happened?
If you use the Btrieve Maintenance Utility to save/dump the records,
the resulting file contains the binary image of each record. Unless the
record consists entirely of character data, it may not be readable to
the human eye.
The only way that Pervasive PSQL can dump a record in ASCII
readable format, is by reading the DDFs to get a description of the
total contents of the record. Btrieve only has the record length, the
data type of indexes and length of the indexes. Btrieve does not have
information on how to interpret the entire contents of the record.
9-28
Frequently Asked Questions
Windows Client
Run the PSA network connectivity tests to verify network
connectivity. See “Test Active Installation Tasks” on page 7-10. Also
refer to the Knowledge Base, available at the Pervasive Software
website, for information about particular issues.
9-29
Basic Troubleshooting
9-30
chapter
10-1
Pervasive PSQL Resources and Contacts
Pervasive Software Web The site is a great source for everything http://www.pervasive.com
site Pervasive PSQL
10-2
Thirty-Day Free Note that your purchase of Pervasive products entitles you to 30 days
Technical of free technical support for installation and configuration
Support problems. The free technical support is limited to two support issues
(referred to as “tickets”) during the 30 days.
10-3
Pervasive PSQL Resources and Contacts
10-4
Index
A testing transactional interface 7-11
Bulk Data Utility 8-7
Access conflict 9-20
Bulk Data utility
Access methods 9-27
constraints 8-10
Access rights
error logging 8-10
cannot perform the operation 9-9
examples 8-11
problems due to lack of O/S rights 9-4
BUTIL
Access to database
Linux and 8-17
setting up 2-15
ACS
viewing 3-28 C
Active Directory Cache
create Pervasive_Admin group on domain clearing 3-6
controller 2-11 Case comparisons
Admin share not supported 9-22 in Table Editor 5-7
Administrative rights 2-8 Cell
for Active Directory 2-9 defined 1-7
granting 2-8 Changing file path in DDF 9-24
troubleshooting 9-20 Client
user rights policy 2-11 definition of 1-4
Administrator DSN 2-15
login 2-14 DSN setup 2-22, 2-25
Administrator user installation 9-18
fast user switching 2-37 password utility for use with 8-38
Autostart setting up database access 2-21
keeping Workgroup engine from autostarting 9- testing connectivity to database engine 7-10
19 troubleshooting network protocols 9-6
Available sessions Client DSN
error in PCC if none available 9-10 on Linux workstation 2-25
set up with ODBC Administrator 2-22
B Clilcadm utility 8-19
Clustering 9-18
Backup
Collate
online 9-30
in Table Editor 5-8
Bcfg utility 8-6
Collating sequence
Bdu utility 8-7
setting for column in Table Editor 5-21
Bmon utility 8-14
Column
Bound database
defined 1-6
properties for database 3-20
Column name
Btadmin utility 8-15
in Table Editor 5-7
Btrieve
Columns
and terminology 1-10
allowing index duplicates in Table Editor 5-35
owner names 9-26
Index 1
arranging order of index segment in Table Editor O/S rights required 9-4
5-34 setting preferences
deleting in Table Editor 5-16 external tools 3-12
deleting index in Table Editor 5-30 general 2-35, 3-9, 6-15
deleting index segment in Table Editor 5-33 Grid 3-9, 3-10
inserting in Table Editor 5-15 SQL Editor 3-10
inserting index segment in Table Editor 5-31 Table Editor 3-10
modifying index in Table Editor 5-30 Text window 3-10
modifying index segment in Table Editor 5-32 window views 3-10
naming in Table Editor 5-17 setting preferences for Data Grid 3-10
selecting in Table Editor 5-16 setting preferences for external tools 3-12
setting case in Table Editor 5-20 Conflict, access 9-20
setting collating sequence in Table Editor 5-21 Connection strings
setting data type in Table Editor 5-17 ’ServerDSN’ or ’DBQ’ not found in 9-2
setting default in Table Editor 5-22 Continuous Operations
setting for nulls in Table Editor 5-20 behavior after server failure 9-30
setting index in Table Editor 5-24 Continuous operations
setting precision in Table Editor 5-19 restriction for files with same name 5-12
setting primary key in Table Editor 5-23 Control Center. See PCC
setting scale in Table Editor 5-19 Convert data files to older file format 9-23
setting size in Table Editor 5-18 Create database 3-25
specifying index as modifiable in Table Editor 5- Create Database Wizard
36 creating a Client DSN 2-21
specifying sort order for index in Table Editor 5- creating an Engine DSN on Windows 2-18
35 CREATE GROUP 9-26
viewing those defined for a table 3-30 CREATE USER 9-26
Columns page
in Table Editor 5-3 D
interface in Table Editor 5-6 Data
Command-line files where stored 9-27
utility to execute SQL statements from 8-31 importing 3-31
utility to rebuild data files from 8-41 location of files for database 3-20
Communication Data compression
testing network connectivity 7-10 viewing 3-28
Configuration Data definitions
bti.ini 2-19 where stored 9-27
database code page 3-18 Data directories for database 3-20
defined 3-50 Data files
engine DSN 2-19 convert to older file format 9-23
object properties in PCC 3-50 not affected by install/uninstall 9-18
PCC connection encoding 3-19 rebuilding with utility 8-41
properties for database 3-17 re-use of space 9-30
properties for database engine 3-16 sharing of DDFs 9-25
properties for services 3-14 Data Grid
properties for table 3-28 setting preferences 3-10
server Data replication 9-30
2 Index
Data source name registering in PCC 3-15
engine DSN 2-19 running as service in PCC 3-13
Data table 3-28 services dependent on 2-2
Data types setting services properties 3-14
Columns page in Table Editor 5-3 setting startup policy 3-14
Database start and stop on Windows 2-3, 2-4
access 2-15, 2-18 starting and stopping on Linux 2-7
access for client workstation 2-21 starting or stopping 3-13
as object in PCC 3-17 starting server 2-2
bound 3-20 stopping 2-2
cannot retrieve names error 9-9 SWT no more handles error on Linux 3-5
code page properties 3-18 unable to connect to error on Linux 3-5
concepts 1-2 Database Management System
creating 3-25 defined 1-3
data directories 3-20 functions of 1-3
defined 1-2, 1-7 Database Workgroup Engine
dictionary location 3-20 start and stop on Windows 2-5
error 7039 when creating 3-25 DataExchange
importing data 8-7 displaying in PCC after installation 3-6
integrity enforced 3-21 displaying in PCC after upgrading 3-6
logging out from in PCC 3-17 Dbmaint utility 2-19, 8-20
mirroring 9-30 DBMS. See Database Management System
PCC connection encoding property 3-19 DBQ not found error 9-2
security 3-38 DDF location for database 3-20
logging in as an administrator 2-14 DDFs
security vs OS security 9-19 changing file path 9-24
set up access for Workstation or Workgroup creating for old data 9-23
engine 2-18 detecting non-standard 9-24
set up access on Linux 2-19 for ODBC access 2-18
set up access on Windows 2-18 keeping safe 9-24
setting properties for 3-17 mixing among databases 9-25
setting up on client 2-21 path viewing 3-28
starting engine 2-2 sharing among data files 9-25
stopping engine 2-2 Default
structures 1-6 object in Table Editor 5-8
structures and terms 1-6 Definitions
test ODBC connection 8-25 client 1-4
testing client connectivity to 7-10 requester 1-4
Database encoding 3-18 Delete
Database engine DSN 2-35
as object in PCC 3-15 Deleted records, re-use of disk space 9-30
java.lang.UnsatisfiedLinkError error on Linux 3- Delimited data
5 loading into a database 8-7
logging in to in PCC 3-16 DEMODATA
logging out from in PCC 3-15 recovering default tables 9-15
reconnecting to in PCC 3-16 restoring to installation defaults 9-15
Index 3
Dependency setting properties for 3-16
of services of database engine 2-2 setting services properties 3-14
Detect non-standard DDFs 9-24 setting startup policy 3-14
Determining starting or stopping 3-13
network protocol in use 9-22 stopping Workgroup under fast user switching 2-
service pack level 9-18 38
Dictionary testing client connectivity to 7-10
location of files for database 3-20 tray icon with fast user switching 2-38
Dictionary path Error 1114 9-2
error 7039 when creating a database 3-25 Error 7039 when creating a database 3-25
viewing 3-28 Error was encountered message 9-11
Disk space Events
re-use of 9-30 scheduling 9-27
Documentation 1-13 Expired licenses
Online help 1-14 hiding 4-15
DSN Export
client 2-15, 2-22 data from table 3-32
Linux client 2-25 files
client DSN needed for many applications 9-6 cannot read file 9-28
concepts 2-15 Export table schema 3-33
engine 2-15, 2-19 External tools
on a Linux server 2-19 adding to PCC 3-12
File DSN not supported 2-15, 2-22
recreating 2-17, 2-35 F
removing 2-35 Failover 9-18
test connection to database 8-25 FAQ. See Frequently asked questions
Dsnadd utility 2-25, 8-23 Fast user switching 2-37
Dump file running Workgroup engine 2-37
cannot read it 9-28 tray icon with 2-38
Duplicate pointers types of users for 2-37
viewing number of 3-28 Field
defined 1-6
E Field.ddf 9-24
Encoding File
database code page 3-18 viewing file name associated with a table 3-30
Engine viewing location of table 3-28
as object in PCC 3-15 File DSN not supported 2-15, 2-22
components File format
different version than client 9-2 converting data to older 9-23
DSN 2-15 File path
DSN setup 2-19 changing in DDF 9-24
logging in to in PCC 3-16 File system security 1-15, 2-29
logging out from in PCC 3-15 File version
reconnecting to in PCC 3-16 viewing 3-28
registering in PCC 3-15 File.ddf 9-24
running as service in PCC 3-13 Files with same name
4 Index
restriction for 5-12 I
Find non-standard DDFs 9-24
Identifying
Finding
service pack level 9-18
service pack level 9-18
Import Data Wizard
Foreign key
restrictions 3-31
adding in Table Editor 5-37
Importing
deleting in Table Editor 5-39
data 3-31
modifying in Table Editor 5-39
data into a database 8-7
Foreign keys page
data into table 3-31
in Table Editor 5-4
IN DICTIONARY
Freespace threshold
clause in exporting table schema 3-33
viewing 3-28
Increasing user count licenses 9-20
Frequently asked questions 9-13
Index
defined 1-7
G Index balancing
Garbage collection viewing 3-28
on disk 9-30 Index.ddf 9-24
GRANT 9-26 Indexes
Granting allowing duplicates in Table Editor 5-35
administrative rights 2-8 arranging order of segment in Table Editor 5-34
for "this account" 2-10 creating unique 5-26
on Linux 2-13 deleting in Table Editor 5-30
on Windows 2000 2-10 deleting segment in Table Editor 5-33
Grid inserting segment in Table Editor 5-31
adding rows of data 6-22 modifying in Table Editor 5-30
changing data in 6-21 modifying segment in Table Editor 5-32
copying data from 6-25 partial 5-28
deleting rows of data 6-23 setting in Table Editor 5-24
in PCC 3-8 specifying as modifiable in Table Editor 5-36
refreshing data in 6-24 specifying sort order in Table Editor 5-35
setting preferences 3-9, 3-10 viewing number of 3-28
using scalar functions 6-24 viewing those defined for a table 3-30
view in SQL Editor 6-4 Indexes page
Group in Table Editor 5-4
as object in PCC 3-38 Installation
assign user to 3-46 client FAQ 9-18
data files not affected by 9-18
H testing with PSA 7-2
How Interfaces
to apply a user count upgrade 9-20 supported for programming 9-27
to grant a user administrative rights Intigrity enforced
for "this account" 2-10 properties for database 3-21
on Linux 2-13 Isql utility 8-25
on Windows 2000 2-10
Index 5
J administering licenses with License
Administrator 4-1
Java.lang.UnsatisfiedLinkError error on Linux 3-5
and user count 4-2, 4-3
Join
applying a key 4-14, 4-18
defined 1-9
applying user count 4-3
determining total user count 4-17
K displaying a specific license 4-18
Key displaying all applied licenses 4-16, 4-18
system 3-28 for prior releases 4-5
Key only file obtaining user count 4-3
viewing 3-28 platforms 4-2
removing a license 4-15, 4-19
L starting License Administrator 4-11, 4-12
Legacy data License Key Platform 4-2
creating DDFs for 9-23 Licenses for Prior Versions of Pervasive PSQL 4-4
Legacy file format Licensing
convert data files to 9-23 database engine on terminal server 4-4
License Administrator 4-1 workgroup engine 9-21
apply license key 4-14, 4-18 Limited user
CLI syntax 4-8 fast user switching 2-37
CLI tasks 4-18 Linux
command line interface 4-8 client DSNs 2-25
concepts 4-2 directory owner required to create a database 3-
determine total user count 4-17 25
display all applied licenses 4-18 engine DSNs 2-19
display applied license 4-16 naming databases 2-19
display help 4-18, 4-19 PCC
display specific license 4-18 errors trying to start 3-4
graphical user interface 4-5 java.lang.UnsatisfiedLinkError engine error
GUI tasks 4-11 3-5
GUI Visual Reference 4-5 SWT no more handles engine error 3-5
hide expired licenses 4-15 troubleshooting starting 3-4
license key 4-2 unable to connect to database engine error 3-
licenses for prior releases 4-5 5
remove a license 4-15, 4-19 psql force command 2-7
select a computer for license administration 4-12 psql start command 2-7
start as stand-alone application 4-12 psql stop command 2-7
start from PCC 4-11 starting and stopping database engine 2-7
tasks with 4-10 utilities 8-5
user count 4-2, 4-3 btadmin 8-15
applying 4-3 butil 8-17
obtaining 4-3 clilcadm 8-19
License count dbmaint 2-19, 8-20
increasing 9-20 dsnadd 2-25, 8-23
License count. See User count sqlmgr and odbc.ini 2-20
License key to change passwords 8-29
6 Index
to register components in Pervasive registry use of 9-29
8-28
Load balancing 9-19 N
Load data Naming databases
bulk data utility 8-7 dbmaint utility 2-19
Loading from a Linux server 2-19
database engine 2-2 Network
Local communications
defined 1-8 verifying 9-22
Log protocol
name of PSA log file 7-4 determining 9-22
specifying name for PSA log file 7-13 protocol troubleshooting 9-6
Log file 7-7 setting protocol for connectivity test 7-11
Log on authority for service 2-10 testing connectivity with PSA 7-10
Log on failed Network password utility 8-38
troubleshooting 9-20 Non-standard DDFs
Log out detecting 9-24
from database 3-17 Null
Login in Table Editor 5-7
OS vs DB 9-19 Nulls
and Columns page in Table Editor 5-3
M setting for column in Table Editor 5-20
Map Root not supported 9-22 Number of duplicate pointers
Memory viewing 3-28
increasing amount available to PCC 9-7 Number of indexes
viewing modules loaded in 7-8 viewing 3-28
Metadata Number of unused pages
files where stored 9-27 viewing 3-28
utility to convert 8-33 Number or records
Metadata conversion utility 8-33 viewing 3-28
MicroKernel Database Engine
defined 1-3 O
Microsoft Object properties
Access accessing in PCC 3-8
accessing Pervasive PSQL data using 2-31 ODBC
Excel accessing data 2-29
accessing Pervasive PSQL data using 2-29 concepts 2-15
Migrating 9-28 determining if used 9-24
Mirroring of database 9-30 test utility 8-25
MKDE. See MicroKernel Database Engine ODBC standard 2-15
Monitor ODBC.INI
O/S rights required 9-4 configuration 2-20
Monitoring Online backup 9-30
bmon utility 8-14 Online help 1-14
Multiple Operating system
processors security vs DB security 9-19
Index 7
troubleshooting access rights 9-4 Outline window 3-9
Outline window overview
in PCC 3-9 Pervasive PSQL Explorer 3-7
Outline window view plug-in
in SQL Editor 6-7 displaying after plug-in installation 3-6
running all SQL statements 6-20 preferences
sizing 6-26 general 2-35, 3-9, 6-15
Owner names window views 3-10
and SQL security 9-26 preferences for external tools 3-12
reconnecting to a server engine 3-16
P registering a remote server engine 3-15
Page size running slowly or hanging 9-7
viewing 3-28 security 3-38
Pages services 3-13
viewing number of unused 3-28 setting connection encoding 3-19
Partial indexes 5-28 setting database code page 3-18
Password setting database engine properties 3-16
troubleshooting wrong 9-11 setting database properties 3-17
utility to change on Linux 8-29 setting table properties 3-28
utility used to manage 8-38 specifying amount of memory to use 9-7
Passwords SQL Editor 3-8
utility used to manage 8-38 stored procedure object 3-37
PCC SWT no more handles error on Linux 3-5
accessing object properties 3-8 Table Editor 3-9
additional utilities 3-11 table object 3-28
clean parameters 3-6 Text window 3-9
clearing cache 3-6 trigger object 3-37
configuration 3-50 troubleshooting starting on Linux 3-4
database engine object 3-15 unable to connect to database engine error on
database engine running as a service 3-13 Linux 3-5
database object 3-17 user object 3-38
DataExchange and other plug-ins user-defined function object 3-37
displaying 3-6 view object 3-37
editor characteristics 3-7 vmargs parameter to increase memory 9-7
editors and window view within 3-6 window view characteristics 3-7
external tools 3-12 window views 3-10
setting preferences 3-12 PCC connection encoding 3-19
general preferences 2-35, 3-9, 6-15 PCC hangs 9-7
Grid 3-8 PCC hangs, See PCC
group object 3-38 PCC running slowly 9-7
increasing memory available to 9-7 Pervasive Control Center hangs, See PCC
java.lang.UnsatisfiedLinkError error on Linux 3- Pervasive PSQL
5 client, defined 2-16
logging in to server engine 3-16 explained 1-2
logging out from database 3-17 need to recreate DSNs 2-17
logging out from server engine 3-15 Server 1-11
8 Index
server, defined 2-16 determining network 9-22
Workgroup 1-11 setting for PSA connectivity test 7-11
Pervasive PSQL Control Center. See PCC PSA
Pervasive PSQL Explorer log file name 7-4
accessing object properties 3-8 name of wizard executable 7-8
expanding tree objects 3-7 setting protocols for network connectivity test 7-
within PCC 3-7 11
Pervasive PSQL utilities. See Utilities specifying name for log file 7-13
Pervasive registry starting 7-8
utility to register components 8-28 test active installation 7-2
Pervasive Software testing Btrieve application 7-11
how to contact 10-1 testing network connectivity 7-10
Pervasive System Analyzer. See PSA testing relational interface 7-12
Pervasive_Admin security group 2-8 testing SQL application 7-12
use with Active Directory 2-11 testing transactional interface 7-11
Platform for license key 4-2 view modules 7-2
Precision viewing Pervasive modules 7-8
GUI object in Table Editor 5-7 PSA. See Pervasive System Analyzer
Preferences Psc utility 8-26
external tools 3-12 Psql force command 2-7
for Data Grid 3-10 Psql start command 2-7
for SQL Editor 3-10 Psql stop command 2-7
for Table Editor 3-10 Psregsvr 8-28
for Text window 3-10 Pvdbpass utility 8-29
general 3-9 Pvddl utility 8-31
database default for current session 6-15 Pvmdconv utility 8-33
DSN entries 2-35 Pvnetpass utility 8-38
setting for Grid 3-9, 3-10 authenticating to a domain server 8-40
setting in PCC for external tools 3-12 PVSW.LOG
window views 3-10 client and server compatibility 9-3
Primary key
setting for column in Table Editor 5-23 R
Programming interfaces supported 9-27 Rbldcli utility 8-41
Properties Rebuild
accessing in PCC 3-8 data files with utility 8-41
bound database 3-20 Reconnect
data directories location for database 3-20 to database engine in PCC 3-16
dictionary location for database 3-20 Record
integrity enforced for database 3-21 defined 1-6
setting database code page 3-18 length 3-28, 9-23
setting for database 3-17 viewing variable 3-28
setting for database engine 3-16 Recover
setting for services 3-14 default data for DEMODATA sample database 9-
setting for table 3-28 15
setting PCC connection encoding 3-19 Recreating DSNs 2-17, 2-35
Protocol Redirected mapping not supported 9-22
Index 9
Referential constraints exporting table 3-33
listing 3-17 Security 3-38
Register administrative rights 2-8
database engine in PCC 3-15 as object property in PCC 3-38
Registry file system 1-15, 2-29
utility to register components on Linux 8-28 logging in as administrator 2-10, 2-14
Relational OS login vs DB login 9-19
testing interface with PSA 7-12 owner names vs SQL security 9-26
Remote tasks for 3-39
defined 1-8 Separator
Remote database access 2-22 selecting statatement separator 6-17
Removing Server
DSN 2-35 troubleshooting network protocols 9-6
Replication 9-30 ServerDSN not found error 9-2
Requester Service
defined of 1-4 database engine running as 3-13
for SQL Relational Database Engine 9-27 log in authority for "this account" 2-10
troubleshooting client 9-4 setting properties 3-14
Restore setting startup policy for database engine 3-14
DEMODATA sample database to installation starting or stopping database engine 3-13
defaults 9-15 stopping Workgroup engine when using fast user
Restrictions switching 2-38
Import Data Wizard 3-31 Service pack
Rights identifying level 9-18
administrative 2-8 Services
granting administrative psc utility for 8-26
for "this account" 2-10 Set up database access 2-15
on Linux 2-13 Shadowing of database 9-30
on Windows 2000 2-10 Shared files, troubleshooting 9-22
if changed from system account 2-10 Size
Row in Table Editor 5-7
defined 1-6 SMP. See Multiple processors
SQL
S CREATE GROUP 9-26
Sample database CREATE USER 9-26
recreating DEMODATA 9-15 GRANT 9-26
Scalar functions testing relational interface 7-12
DATE in SQL Editor 6-24 utility to execute statements 8-31
TIME in SQL Editor 6-24 SQL Editor 3-8
TIMESTAMP in SQL Editor 6-24 adding rows of data within Grid 6-22
using within SQL Editor Grid 6-24 changing data within Grid 6-21
Scale clearing results in Text window 6-25
GUI object in Table Editor 5-7 copying data from Grid 6-25
Scheduling events 9-27 creating SQL query or script 6-16
Schema creating stored procedures 6-26
defined 1-8 creating triggers 6-26
10 Index
creating user-defined functions 6-26 creating in SQL Editor 6-16
creating views 6-26 opening in SQL Editor 6-16
deleting rows of data within Grid 6-23 SQL statements
deleting stored procedures 6-27 comments in 6-18
deleting triggers 6-27 copying in Table Editor 5-40
deleting user-defined functions 6-27 creating query or script in SQL Editor 6-16
deleting views 6-27 enabling commands to execute 6-19
enabling SQL execution commands 6-19 finding text in 6-18
finding text 6-18 opening SQL script in SQL Editor 6-16
Grid 6-4 redoing typing in SQL Editor 6-18
identifying setting 6-15 running all in SQL Editor 6-20
modifying stored procedures 6-27 running in SQL Editor Outline window view 6-
modifying triggers 6-27 20
modifying user-defined functions 6-27 running single in SQL Editor 6-19
modifying views 6-27 selecting text in 6-19
opening SQL script 6-16 separators in SQL Editor 6-3
Outline window view 6-7 setting database context in SQL Editor for query
overview 6-2 6-14
redoing an action 6-18 starting SQL Editor 6-13
refreshing data in Grid 6-24 starting SQL Editor by showing all table records
running all SQL statement 6-20 6-14
running all SQL statement in Outline window typing comments in SQL Editor 6-18
view 6-20 undoing typing in SQL Editor 6-18
running single SQL statement 6-19 SQL View
selecting SQL statement separator 6-17 in Table Editor 6-10
selecting text 6-19 SQL view
selecting text in Text window 6-25 in Table Editor 5-4
setting database context for query 6-14 Sqlmgr utility
setting preferences 3-10 odbc.ini 2-20
sizing Outline window view 6-26 Start database engine on Linux 2-7
SQL statement separators 6-3 Start up
starting by showing all table records 6-14 keeping Workgroup engine from autostarting 9-
starting for new query 6-13 19
stored procedures 6-8 Starting
Text window view 6-5 database engine 2-2
triggers 6-8 Startup policy
typing comments in 6-18 for database engine 3-14
undoing an action 6-18 Statement separator
used in SQL View of Table Editor 6-10 selecting 6-17
user-defined functions 6-8 troubleshooting 6-17
using scalar functions within Grid 6-24 Stop database engine on Linux 2-7
views 6-8 Stopping
SQL Relational Database Engine database engine 2-2
defined 1-4 Workgroup engine under fast user switching 2-
SQL requester 9-27 38
SQL script Stored procedure
Index 11
as object in PCC 3-37 viewing system data key 3-28
creating in SQL Editor 6-26 viewing variable records 3-28
deleting in SQL Editor 6-27 Table columns
in SQL Editor 6-8 viewing 3-30
modifying in SQL Editor 6-27 Table Editor
Structured Query Language adding a foreign key 5-37
utility to execute statements 8-31 allowing index duplicates 5-35
Structures arranging order of index segment 5-34
database 1-6 columns page 5-3
SWT no more handles error on Linux 3-5 columns page interface 5-6
Symmetric Multiprocessing. See Multiple processors copying SQL statement 5-40
System account rights 2-10 creating an index 5-24
System data key deleting a column 5-16
viewing 3-28 deleting a foreign key 5-39
System key deleting an index 5-30
viewing 3-28 deleting an index segment 5-33
System tables 3-28 foreign keys page 5-4
identifying tables with changes pending 5-13
T in PCC 3-9
Table indexes page 5-4
as object in PCC 3-28 inserting an index segment 5-31
creating data for 3-31 inserting columns 5-15
data 3-28 modifying a foreign key 5-39
defined 1-7 modifying an index 5-30
export data 3-32 modifying an index segment 5-32
exporting schema 3-33 naming a column 5-17
import data 3-31 overview 5-2
system 3-28 saving changes for edited table 5-14
viewing saving changes to edited table 5-14
variable record blank truncation 3-28 selecting columns 5-16
viewing alternate collating sequence 3-28 setting a column data type 5-17
viewing data compression 3-28 setting column case 5-20
viewing dictionary path 3-28 setting column collating sequence 5-21
viewing file version 3-28 setting column default 5-22
viewing freespace threshold 3-28 setting column nulls 5-20
viewing index balancing 3-28 setting column precision 5-19
viewing key only file 3-28 setting column primary key 5-23
viewing location of file 3-28 setting column scale 5-19
viewing name 3-28 setting column size 5-18
viewing number of duplicate pointers 3-28 setting preferences 3-10
viewing number of indexes 3-28 specifying index as modifiable 5-36
viewing number of records 3-28 specifying sort order for index 5-35
viewing number of unused pages 3-28 SQL View 6-10
viewing page size 3-28 SQL view 5-4
viewing physical file name associated with 3-30 starting for a new table 5-11
viewing record length 3-28 starting for an existing table 5-12
12 Index
tasks performed with 5-9 testing interface with PSA 7-11
undoing or redoing changes 5-14 Tray icon
viewing SQL statements applicable to the table 5- with fast user switching 2-38
13 Trigger
viewing table data 5-13 as object in PCC 3-37
work area pages 5-2 creating in SQL Editor 6-26
working with columns 5-12 deleting in SQL Editor 6-27
working with foreign keys 5-12 in SQL Editor 6-8
working with indexes 5-12 modifying in SQL Editor 6-27
Table file location Troubleshooting
viewing 3-28 client DSN not available 9-6
Table indexes disabled client requester 9-4
viewing 3-30 network outage 9-4
Table name no server (engine) DSN available 9-5
viewing 3-28 OS permissions problems 9-4
viewing physical file name associated with 3-30 PCC running slowly or hanging 9-7
Table schema server not accepting requests 9-5
exporting 3-33 server not running 9-5
Tables SQL Statement Separator 6-17
exporting schema 3-33 wrong network protocol settings 9-6
Terminal Server 9-18 Type
database engine licensing 4-4 in Table Editor 5-7
Terminal Server Licensing 4-4
Terminology U
Btrieve usage 1-10 Unable to connect error
client 1-4 troubleshooting 9-10
requester 1-4 Unable to connect to database engine error on Linux
Test active installation 7-6 3-5
Test network 7-6 Unauthorized access
Test relational engine 7-7 to data file with owner name 9-26
Test transactional engine 7-6 Uninstalling
Text window data files not affected 9-18
in PCC 3-9 Unloading
setting preferences 3-10 database engine 2-2
Text window view Unused pages
clearing results in 6-25 viewing number of 3-28
in SQL Editor 6-5 Upgrading 9-28
selecting text in 6-25 user count 9-20
Tools User
adding external to PCC 3-12 as object in PCC 3-38
Trace User count 4-3
run in trace mode 9-29 administering with License Administrator 4-1
Trace mode applying 4-3
running in 9-29 determining total 4-17
Tracing 9-29 how to apply 9-20
Transactional increasing 4-3
Index 13
license key 4-2, 4-3 Variable record blank truncation
obtaining 4-3 viewing 3-28
troubleshooting expired license 9-10 Variable records
workgroup engine 9-21 viewing 3-28
User name Version
OS vs DB 9-19 new, data files not affected by installing 9-18
troubleshooting wrong 9-11 old, data files not affected by uninstalling 9-18
utility used to manage 8-38 viewing file 3-28
User rights policy View
act as part of the operating system 2-11 as object in PCC 3-37
for "this account" 2-11 creating in SQL Editor 6-26
User switching 2-37 deleting in SQL Editor 6-27
User-defined function in SQL Editor 6-8
as object in PCC 3-37 modifying in SQL Editor 6-27
creating in SQL Editor 6-26 Pervasive modules loaded in memory 7-8
deleting in SQL Editor 6-27 View loaded Pervasive modules 7-6
in SQL Editor 6-8 View modules 7-2
modifying in SQL Editor 6-27 Vmargs
Users PCC parameter to increase memory 9-7
assign to group 3-46
types of for fast user switching 2-37 W
Uses alternate collating sequence W64clilcadm utility 8-19
viewing 3-28 Windows
USING fast user switching 2-37
clause in exporting table schema 3-33 running Workgroup engine with fast user
Utilities switching 2-37
btadmin 8-15 start and stop Database Workgroup Engine 2-5
butil 8-17 types of users for fast user switching 2-37
clilcadm 8-19 XP operating system
dbmaint 2-19, 8-20 tray icon with fast user switching 2-38
dsnadd 2-25, 8-23 Windows services
for Linux 8-5 psc utility 8-26
License Administrator 4-1 Wizard
overview 1-1, 2-1, 9-1 PSA 7-8
psc 8-26 Workgroup engine
sqlmgr database access 2-22
odbc.ini 2-20 keeping from autostarting 9-19
w64clilcadm 8-19 licensing 9-21
simultaneous access 9-20
V stopping under fast user switching 2-38
V1 metadata
conversion utility 8-33 X
V2 metadata Xtrieve
conversion utility 8-33 replacement for 9-27
Value
defined 1-6
14 Index