Silo - Tips - Sqlbase Starter Guide
Silo - Tips - Sqlbase Starter Guide
Silo - Tips - Sqlbase Starter Guide
20-2905-1005
Team Object Manager, Web Developer, QuickObjects, Object Nationalizer, Report Builder, Connectivity
Administrator, Development Kit, Component Development Kit, SQLBase Resource Manager, and
SQLConsole are names of products from Gupta Technologies.
IBM, OS/2, NetBIOS, and AIX are registered trademarks of International Business Machines Corporation.
Linux is a trademark of Linus Torvalds. Red Hat is a trademark of Red Hat, Incorporated. Novell and
Netware are trademarks of Novell, Inc. SUSE is a trademark of SUSE LINUX AG. Java, JavaScript, and
Solaris are trademarks of Sun Microsystems, Incorporated. Microsoft, Outlook, PowerPoint, Visual C++,
Visual Studio, Internet Explorer, Internet Information Server, DOS, Win 32, Windows, ActiveX, MSDN,
SQL Server, and Visual Basic are either registered trademarks or trademarks of Microsoft Corporation in
the United States of America and/or other countries.
This product includes software developed by the OpenSSL Project for use in the OpenSSL Toolkit.
(http://www.openssl.org/).
All other product or service names mentioned herein are trademarks or registered trademarks of their
respective owners.
Copyright
Copyright © 2012 by Gupta Technologies. All rights reserved.
Trademarks............................................................................................................................................ 2
Copyright ............................................................................................................................................... 2
Each of the topics mentioned throughout this book is covered in far greater detail in other books that
make up the SQLBase Books Online collection. Be sure to check there for more information.
SQLBase platforms
SQLBase is supports the following platforms:
• Windows
• Red Hat Linux (see the release notes for exact versions).
SQLBase supports multiple users with remote communication through a network as well as local
communication.
SQLBase packages
SQLBase comes with a single installation package that installs the version of SQLBase that you have
licensed. Gupta offers two SQLBase versions: SQLBase Desktop (single-user) and SQLBase Server (multi-
user. This section describes each of these versions and their components.
SQLBase Server is a multi-user database server that runs on all versions of Windows. SQLBase for
Windows is licensed based on concurrent user connections and comes in various user bands; for
example: 5-user, 50-user, and unlimited users. The following table describes the options in the SQLBase
Server package:
Windows 32-bit and SQLBase Server is a multi-user database server program that can
64-bit Servers communicate both with local and remote client applications.
This option also includes the Connectivity Administrator and SQLBase
Management Console (SMC). Also included is SQLBase Resource Manager,
with support for COM+ transactions.
• Communication libraries
Front-end programs communicate with the server through support
programs called communication libraries.
• Connectivity Administrator (32 bit clients and servers only) A tool
for editing your SQL.INI file.
• DBError
A utility for looking up SQLBase error messages. Provides the error
text, reason for the error, and suggested solutions. This is typically
used during the application development process.
• SQL/API
The application programming interface. Included with the SQL/API is
sample source code you can use to learn how to utilize the SQL/API.
• SQLTalk
A front-end interface for SQL.
• Release notes and certification description
SQLConsole DBA utility SQLConsole is a database administration and monitoring tool for SQLBase
Servers and databases. From a single Windows desktop, SQLConsole lets you
perform administrative tasks for a local SQLBase server and all the SQLBase
servers on a network.
Documentation The documentation can be accessed from Start | Programs | Gupta |
SQLBase 11.7 | Documentation.
SQLBase ODBC Driver An industry-standard ODBC 3.5 Driver, fully supporting multi-threaded
applications.
SQLBase OLE DB Data An industry-standard set of COM objects providing access to SQLBase
Provider databases. Supports COM+ (MTS) distributed transactions.
SQLBase .NET Data An industry-standard set of ADO.NET Data provider providing access to
Provider SQLBase databases for development tools that use the .NET SDK Framework.
SQLBase JDBC Driver A set of Java classes allowing access to SQLBase from Java applets and
applications.
SQLBase Desktop is a single-user database server that runs on Windows. It is licensed by machine, and
comes in various licensing packs, such as 5- and 25-machine packs. The following table describes the
installation options in the SQLBase Desktop package:
Desktop Server (32 and SQLBase Server is a 32-bit database server program that runs under Windows.
64 bit bit) It can communicate both with local and remote client applications.
Client software includes:
• Communication libraries
Front-end programs communicate with the server through support
programs called communication libraries.
• Connectivity Administrator
A tool for editing your SQL.INI file.
• SQL/API
The application programming interface. Included with the SQL/API is
sample source code you can run to learn how the SQL/API handles
certain SQLBase features.
• SQLTalk
A front-end interface for SQL.
• Release notes and certification description
SQLConsole DBA Utility SQLConsole is a database administration and monitoring tool for SQLBase
servers and databases. From a single Windows desktop, SQLConsole lets you
perform administrative tasks for a local SQLBase server and all the SQLBase
servers on a network.
SQLBase Programmers Contains the SQL/API software and SQLBase ++. The SQL/API is a language
Interface interface that lets you develop a client application that uses SQL. You embed
SQL/API functions within your C program, which allows you to use SQL
without giving up the power and flexibility of either programming language.
You can create and run SQL/API applications on any of the server platforms.
SQLBase ++ is a C++ based source library for application development.
SQLBase ODBC Driver A standard ODBC 3.5 driver that fully supports multi-threaded applications.
SQLBase OLE DB Data An industry-standard set of COM objects providing access to SQLBase
Provider databases. Supports COM+ (MTS) distributed transactions.
SQLBase .NET Data An industry-standard set of ADO.NET Data provider providing access to
Provider SQLBase databases for development tools that use the .NET SDK Framework.
SQLBase JDBC Driver A set of Java classes allowing access to SQLBase from Java applets and
applications.
SQLBase Server is a multi-user database server that runs on Red Hat Linux (see release notes for exact
versions supported.) The following table describes the options in the SQLBase Server package:
Linux 32-bit Server SQLBase Server is a 32-bit, multi-user database server program that can
communicate both with local and remote client applications.
Client Software The Client Software contains the following components:
• DBError
A utility for looking up SQLBase error messages. Provides the error
text, reason for the error, and suggested solutions. This is typically
used during the application development process.
• SQL/API
The application programming interface. Included with the SQL/API is
sample source code you can use to learn how to utilize the SQL/API.
The API binary files also contain communication components to
handle TCP/IP communication with the database server.
• SQLTalk
A character-mode front-end interface for SQL. You can run SQLTalk
from the Linux command line.
• Release notes and certification description
Documentation The documentation can be accessed from Start | Programs | Gupta | SQLBase
11.7 | Documentation.
SQLBase ODBC Driver An industry-standard ODBC 3.5 Driver, fully supporting multi-threaded
applications.
SQLBase JDBC Driver A set of Java classes allowing access to SQLBase from Java applets and
applications.
C Programmer’s interface SQLBase C example programs and interface.
• Connectivity Administrator
• SQL.INI file
Connectivity Administrator
The Connectivity Administrator lets you edit your SQL.INI file, adding databases and routers. Using this
tool, you can set the configuration for SQLBase Server, including:
The Connectivity Administrator detects all relevant software installed on your computer, including
network protocols and configurations. The automated configuration also sets simple and advanced
parameters of the database server. You can configure connectivity for both your client and server during
the same Connectivity Administrator session. To configure your server, click the Server tab.
1. Select Programs, Gupta, SQLBase 11.7, Connectivity Administrator from the Start menu.
For detailed information about the Connectivity Administrator, read the online help that is provided with
this tool.
Note: The Windows version of SQLBase is not case-sensitive, but the Linux version of SQLBase expects
this file to be in lowercase: sql.ini.
To use a SQLBase client, you must first enable the appropriate communication libraries by setting the
correct comdll value in the sql.ini file. The easiest way to do this is by setting the communications
interfaces through the SQLBase Connectivity Administrator or your preferred text editor. Read the
online help for the SQLBase Connectivity Administrator for more information, or refer to chapters two
and three of the Database Administrator Guide.
If you have just installed SQLBase, and you wish to verify that it is running correctly, you probably will
not need to change the configuration in sql.,ini. The installation of SQLBase for Windows provides
default values that allow the server to run and to make itself available using the TCP/IP protocol on port
2155. The client components installed at the same time are configured to talk to that server and to
access the sample database ISLAND.
However, once you have tested SQLBase and you wish to begin using it for your own applications and
data, you will need to make configuration changes in the sql.ini file. Some of the reasons that you would
make these changes include:
If the command-line argument is left blank when the executable starts, it is presumed that the
configuration file is named sql.ini and that it resides in the same directory as the executable itself.
Two other important files, error.sql and message.sql, are always required to be in the same directory as
the database server executable itself.
3. \SQLBASE (for Windows) or /SQLBASE (for Linux) directory on the current drive.
Note: If the SQLBASE environment variable is set, SQLBase looks only in the directory to which it points.
It does not continue to follow the search order outlined above.
Note: In order to install SQLBase Server for Windows as a service, you must have Administrator
privileges.
SQLBase Server for Windows offers the option, during installation, to run as a Windows service. If this
option is chosen, SQLBase is set to run as a system account and to interact with the desktop.
Prior to version 8.5 only one instance of SQLBase Server could be run on a Windows machine at any
given time, regardless of whether it was being run as a service or an application program. Beginning with
version 8.5, multiple SQLBase Server engines can run simultaneously, although only one of these
instances can be a version prior to 8.5. You can use the SQLBase Management Console (SMC) to start
and stop SQLBase as a Windows service. SMC also allows you to rename a SQLBase service, and to
For more information on running SQLBase Server for Windows as a service, read Chapter 13, Running
SQLBase Server as a Windows Service in the Database Administrator’s Guide.
Note: SQLBase cannot run as a service automatically if you are using the user account in the Services
setup.
Note: Some areas in books and online help refer to the file as SQL.INI, but on Linux, with its case-
sensitivity, you should always use the lowercase form.
Each server executable accepts an optional command-line argument that contains the file name (and,
optionally, the path) of the configuration file. The name might be something other than sql.ini. An
example of a command line specifying the argument is:
If the command-line argument is left blank when the executable starts, it is presumed that the
configuration file is named sql.ini and that it resides in the same directory as the executable itself.
Two other important files, error.sql and message.sql, are always required to be in the same directory as
the database server executable itself.
If no explicit configuration file is named, the SQLBase API attempts to locate a file named sql.ini, looking
in the following locations:
1. The directory named in the SQLBASE environment variable.
2. Current directory.
3. /SQLBASE directory on the current drive.
4. Root directory on the current drive.
5. Directories specified by the PATH environment variable.
Note: If the SQLBASE environment variable is set, SQLBase looks only in the directory to which it points.
It does not continue to follow the search order outlined above.
If you have just installed SQLBase, and you wish to verify that it is running correctly, you probably will
not need to change the configuration in sql.,ini. The installation of SQLBase for Linux provides default
values that allow the server to run and to make itself available using the TCP/IP protocol on port 2155.
The client components installed at the same time are configured to talk to that server and to access the
sample database ISLAND. The CLIENTRUNTIMEDIR keyword in sql.ini has a value that points to the same
directory in which client program sqllxtlk is installed.
However, once you have tested SQLBase and you wish to begin using it for your own applications and
data, you will need to make configuration changes in the sql.ini file. Some of the reasons that you would
make these changes include:
The most complete information about configuring sql.ini is found in the Database Administrator Guide,
chapters 2 and 3.
Windows
This section describes how to start and stop the SQLBase Server for Windows. You must start the
database server before clients can access a database, unless you are using the Anonymous Pipes
protocol. When this protocol is used, SQLBase will be started automatically when an application
attempts to connect to a database on the same machine.
Starting
By default, the setup installs SQLBase as a service. If you choose to run SQLBase Server as a Windows
application, you should use SQLBase Management Console or the Windows Service Manager to make
sure that the SQLBase service is disabled first.
You can manually start SQLBase as a service using either SQLBase Management Console or the Windows
Service Manager.
For more information on running SQLBase Server as a service program, read Chapter 13 of the Database
Administrator’s Guide.
To start SQLBase as an application, select Programs, Gupta, SQLBase 11.7 and SQLBase Server from the
Start menu. This item name varies depending upon your installation directory and the server version
installed.
Stopping
It is recommended that you disconnect all users prior to stopping SQLBase. If you use SQLBase
Management Console to stop SQLBase, that tool allows you to automatically disconnect any current
users if you wish. If, however, users are still connected when you stop the server, SQLBase automatically
performs recovery on these databases during the next connection. If RECOVERY is set to off, SQLBase
will be unable to recover the affected databases.
SQLBase as an application
• Select File, Exit from the SQLBase menu bar then close the SQLBase Server window.
• Use the SQLBase Management Console to stop the SQLBase application.
• Programmatically shut down the server using either SQLTalk or using the SQLBase API.
For information on the SQLBase API, read the SQLBase SQL Application Programming
Interface Reference.
Linux
This section describes how to start and stop SQLBase on Linux operating systems. See the release notes
for the specific Linux brands and versions supported.
Starting SQLBase
The name of the SQLBase binary is dblxsrv. Navigate to the directory that contains this binary and enter
the binary name as a command. Enter ./dblxsrv from the command prompt; do not double-click the file
in File Manager.
When SQLBase starts, it displays a console window showing basic statistics about the server. To learn
more about this window, read Chapter 5 of the Database Administrator Guide.
Stopping SQLBase
In the console window which displays SQLBase statistics, press Ctrl-X. If users are currently connected,
SQLBase will prompt whether to stop anyway, and you may answer Y or N. Otherwise, SQLBase stops
immediately.
Uninstalling SQLBase
On Windows
To remove the SQLBase software from your Windows computer, use the Add/ Remove Programs applet
in the systems Control Panel.
On Linux
To remove the SQLBase software from your Linux computer, navigate to subdirectory uninst beneath
the main program directory. Then run this command:
The uninstaller runs as a GUI application. Add the -console argument to the end of the command line to
run as a console application.
This chapter contains information on testing your configuration using SQLTalk, National Language
Support, using drivers and data providers, and loading database files to the SQLBase Server.
Server-related settings
fileaccess should be set to 0 for security reasons.
cache should be set to one-quarter of your of physical memory for good performance.
dbdir should be set to a specific directory, initially the one in which the ISLAND subdirectory can be
found.
servername should be set to a unique name. Note that this unique name must be echoed in some of the
client-related settings, too.
password should be set to a non-null value for increased security.
Client-related settings
clientruntimedir should be set to a directory, even if it is the same as the directory that contains your
client components.
serverpath should be configured with correct information for the servers that your client will be
communicating with.
1. Be sure that the server program is running. Refer to Starting and stopping the server on
page 4-2. On some single-user installations in Windows, the server will start
automatically when a client program like SQLTalk begins, but ordinarily the server must
be started in advance.
2. Start SQLTalk on the client machine, as described in the previous section. Select Connect
from the Session menu.
3. In the dialog box, enter a database name (for example ISLAND), and click Connect.
Note: ISLAND is the standard default database that ships with SQLBase.
If your network and software components are configured correctly, a connection will be added to the
list as shown below (Windows example).
The Current Connections box displays ISLAND as the database name, which confirms your connection to
this database. Click Close.
CONNECT ISLAND;
4. Enter SQLTalk commands. Remember to end every command with a semicolon. You can
start entering commands at the cursor in the top pane of the SQLTalk window. For
example:
To execute the command that the cursor is currently over, press Ctrl+Enter.
Entering commands in the Linux version of SQLTalk is similar to Windows, but the console interface is
more basic. All commands are ended with a semicolon. Here is an example of a sign-on and simple query:
Ending SQLTalk.
When you are ready to end your SQLTalk session, enter this command at the cursor:
exit;
On Linux, you can also press Ctrl-C to end the session. On Windows, you can press Alt-F4.
The first method is covered in the SQLBase API Reference. There is an entire book that covers the other
four methods in detail; see Connecting to SQLBase.
Client applications
All client applications that connect to SQLBase require a configuration file (default name sql.ini). Even
clients that are simply using one of the drivers or data providers need a configuration file, with the
exception of clients using the JDBC driver. For information on how to structure the configuration file, see
chapters 2 and 3 of the Database Administrator Guide.
Linux considerations
If you run a Linux client application from a directory other than the one where the binary is actually
located, and you have not specified the clientruntimedir keyword in your configuration file, you may
encounter an error due to the program’s inability to find the supporting binary files. To remedy this, you
can either change to the binary’s directory before running, or you can use the LD_LIBRARY_PATH
environment variable to point to the directory that contains those binary files. You would do this with
commands similar to this example:
$LD_LIBRARY_PATH=SQLBaseBinaryDirectory
$export LD_LIBRARY_PATH
You can also load a non-SQLBase database to SQLBase using a common file format, such as .CSV. For
information on loading and unloading, read the LOAD and UNLOAD command documentation in the SQL
Language Reference.
You can improve the performance of the load by performing the following tasks:
1. Defragment your disk. This is also useful for server operations in general.
2. Run SET RECOVERY OFF before you run LOAD. Be aware that when you set recovery off,
SQLBase does not generate log files and this speeds up the load. When you are finished
with the load, run SET RECOVERY ON.
3. Run the LOCK DATABASE command to place an exclusive lock on the database. When
you are finished with the load, run UNLOCK DATABASE.
5. Set the server screen to show the minimal level of process detail (level 0). This is also
useful for server operations in general.