Pervasive logo

Prev User's Guide Next

Setting Up Database Access on a Linux Server


To Set Up a Named Database and Engine DSN from a Linux Server

Database names are created in Linux by using the dbmaint utility at the server. For a complete description of dbmaint, see dbmaint or read the dbmaint man page.


Note
This utility can only be run by user accounts belonging to group pvsw. See Getting Started with Pervasive.SQL (Server edition) for information on Pervasive.SQL Linux utilities and user accounts.

  1. To create an empty database, use the following at the command line:
    dbmaint a | d | l [-b] [-i] [-e] -nDbname
    [-ldictpath] [-ddatapath] 
    

The list of commands for dbmaint include:

a - add database name
d - delete database name
l - list all database names

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  


Note
Unless datapath is specified, the new database is created in the default location, $PVSW_ROOT/data. Likewise, if dictpath is not specified, the dictionary is created in the default location.

For example, to delete the newly created database TEST, type

dbmaint d -nTEST 
  
  1. To set up an Engine DSN, modify the following files:
    • ${PVSW_ROOT}/etc/odbc.ini.

SQLMGR required settings:

[SQLManager]
MgrPort=1583
MgrUseTransport=TCP 
  


Note
The value of ${PVSW_ROOT} is typically /usr/local/psql.

Server data source - the one to which remote calls will be redirected:

[DSN name]
Driver=/usr/local/psql/lib/libsrde.so
Description=Test Pervasive database
DBQ=DBName 

In addition, each data source should be mentioned in the section [ODBC Data Sources] as in the following example:

[ODBC Data Sources]
dsnName1=Pervasive.SQL database dsnName2=Pervasive.SQL database  

For example, if you have in odbc.ini:

[MyDSN]
Driver=/usr/local/psql/lib/libsrde.so
Description=test
DBQ=MyDB 

then your odbc.ini should have:

[ODBC Data Sources]
MyDSN=Pervasive.SQL database 


Note
Because Linux is case sensitive, the [DSN name] must be input exactly as listed under [ODBC Data Sources].

An easy way to verify DBName and DSN configuration settings is to run the supplied odbctest program using the psql user account:

% /usr/local/psql/bin/odbctest DSN=DEMODATA

  1. Proceed to setting up client DSNs as explained in Setting Up Client Access .

Prev
Setting Up Database Access on a NetWare Server
Contents
Up
Check for Revisions
Next
Setting Up Client Access