|
Pervasive.SQL Control Center (PCC) is an integrated framework in which users can connect to Pervasive.SQL engines, set up and modify databases and tables, query and update data, and tune engine performance.
PCC uses a file explorer-like motif-a tree of objects-referred to as the "Pervasive.SQL Explorer." This tree of objects can be opened or expanded to reveal more detail. Examples of objects include engines, databases, tables, and users. The following figures illustrate PCC with several window views displayed. The Pervasive.SQL Explorer is the tree view on the left.


Note that the PCC graphical user interface (GUI) may look cosmetically different depending on your distribution of Linux.
On Windows platforms, PCC is installed by default when you install a database engine or a client. See Installing Pervasive.SQL Server for Windows and Installing Pervasive.SQL Clients for Windows in Getting Started with Pervasive.SQL (Server Edition).
On Linux, PCC is a separately installable component. See Installing PCC and Documentation on Linux in Getting Started with Pervasive.SQL (Server Edition).
The way in which you start PCC depends on the platform.
You start PCC from the Pervasive program on the Start menu. You may also run the executable file pcc.exe, located, by default installation, in the C:\PVSW\Bin folder.
You start PCC by running the executable script file pcc from a command prompt. The script file is located, by default installation, in the usr/local/psql/bin directory.
Note
We recommend that you start PCC from a command prompt and not by by double-clicking on the script file using a file browser application. See Table 3-2, Troubleshooting Guide for Running PCC .
The following requirements must be met to start PCC on Linux.
|
Requirement
|
Discussion
|
|---|---|
|
Pervasive.SQL server or client
|
A compatible Pervasive.SQL server or client must already be installed on the same machine.
See Installing Pervasive.SQL Server for Linux and Installing Pervasive.SQL Client for Linux in Getting Started with Pervasive.SQL (Server edition).
|
|
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.
You may turn off X-Windows client restrictions by typing
xhost + at a terminal window.
|
|
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.
Note: The PCC installation informs you if the JRE is required.
To determine if the Standard Edition JRE is installed or if it is in your PATH variable, enter the following command at a terminal window:
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.
Add the PATH using an EXPORT command similar to the following (assuming your JRE is installed to /usr/local/java):
export PATH=/usr/local/java/bin:$PATH
|
If you have met the requirements to run PCC and still are having difficulty running the utility, refer to the following troubleshooting guide.
|
Troubleshooting Condition
|
Discussion
|
|---|---|
|
You receive the error "java.lang.UnsatisfiedLinkError."
|
This error typically occurs if you try to start PCC by double-clicking on the script file using a file browser application. Start PCC from a command prompt.
This error can result if the LD_LIBRARY_PATH variable is not set. The PCC script sets this variable for you. You may also explicitly set the variable with the following command:
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/local/psql/lib
|
|
You receive the error "SWT no more handles" when trying to run PCC as
root or as user psql.
|
You are not required to log in as user psql or root to run PCC. However, if you are neither of these users, you must be a member of group pvsw.
The "SWT no more handles" error is caused by X-Server denying a connection to a client. Before switching to user psql or root, open a console window and type
xhost + to allow other clients to connect to X-Server.
Now you can switch to user psql or root.
Also, sometimes the display environment variables needs to be set. As user psql or root, type the following command at a console window:
export DISPLAY=:0.0
or
export DISPLAY=localhost:0.0
|
|
You want to view the error log file for PCC or redirect the errors to the console window.
|
By default, the log file of PCC errors is located in a subdirectory of the user's home directory (the subdirectory is
dir_pcc/workspace/.metadata). For troubleshooting, you may find it more convenient to redirect the errors to the console window.
To redirect errors to the console window, use the "-consoleLog" option when starting PCC:
pcc -consoleLog
|
|
You receive the following error message: "Unable to connect to database engine. Make sure the target machine is accessible and an engine is running on the target machine."
|
The context of this error occurs if you attempt to administer the local server.
To administer the local server, you must be a member of the pvsw group or be the root user.
See also Pervasive.SQL Account Management on Linux in Getting Started with Pervasive.SQL (Server edition).
|
PCC caches certain information to improve efficiency. The cache must be cleared after you install or upgrade any other products that "plug in" to PCC. Otherwise, the installed or upgraded product does not appear in the Pervasive.SQL Explorer. For example, if you were to install or upgrade Pervasive Data Exchange, you would then need to clear the PCC cache.
The cache can be cleared only by starting PCC with a parameter from the command line.
To clear PCC cache
By default, the bin folder is located at C:\PVSW\bin on Windows platforms and at /usr/local/psql/bin on Linux.
This starts PCC and clears the cache. The newly installed or upgraded products should then appear in the Pervasive.SQL Explorer.
Note
Use of the -clean parameter when starting PCC provides no advantage under normal usage. The parameter is required only if you install or upgrade a plug-in product.
The PCC main window comprises editors and views:
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 4 Save).
Views, such as Pervasive.SQL Explorer, can be opened only one at a time. Actions performed within a view are applied immediately. No explicit save is required.
The following table summarizes the characteristics of the editors and views.
This view displays a tree of objects that can be opened or expanded to reveal more detail. Click the expand icon to the left of an object to reveal subordinate objects. The expand icon may be a "+" symbol, a "4" symbol, or some other similar symbol. Click the collapse icon to hide subordinate objects. (The collapse icon appears after you click an expand icon.)
The tree of objects includes a root node named Pervasive.SQL. The root node contains subordinate objects such as clients, services (if applicable), engines, databases, tables, views, stored procedures, user-defined functions, triggers, groups, users, and system objects (such as system tables).

A right-click on an object reveals actions or dialogs applicable to that object. For example, you can right-click on an object then click Properties to display configurable settings for the object (provided properties apply to the object). You may also click an object then press Alt+Enter to display properties.
SQL Editor allows you to run Structured Query Language (SQL) statements against a Pervasive.SQL database. See SQL Editor for a detailed discussion.
The Grid window view shows in a matrix format, like a spreadsheet, the result of running SQL statements. Each field is represented as a 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 and Grid Window View for further details.
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 for a detailed discussion.
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 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 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 for a detailed discussion.
You can set preferences for the following window views:
In addition, you can set preferences for external tools. See External Tools .
To set preferences for Grid
To set preferences for SQL Editor
To set preferences for Table Editor
To set preferences for Text
Some utilities have not yet been tightly integrated within the Windows PCC framework. However, they may still be started from within PCC by selecting them through the Tools menu:
Note
These utilities appear in the Tools menu only on Windows platforms. For both Windows and Linux platforms, you can add your own custom tools to the Tools menu. Refer to the next section.
You can add your own software programs to the PCC Tools menu. This provides a convenient way to start the programs from PCC.
To add add external tools
You can click
and browse to the file location if your prefer.
To set preferences for external tools
|
Chapter contents
Prev topic: Using Pervasive.SQL Control Center
|