
| 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
dbmaintutility at the server. For a complete description ofdbmaint, see dbmaint or read thedbmaintman page.
Note
This utility can only be run by user accounts belonging to grouppvsw. See Getting Started with Pervasive.SQL (Server edition) for information on Pervasive.SQL Linux utilities and user accounts.
- 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 named- delete database namel- list all database names
-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 listFor 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[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=DBNameIn 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 databaseFor example, if you have in
odbc.ini:[MyDSN] Driver=/usr/local/psql/lib/libsrde.so Description=test DBQ=MyDBthen your
odbc.inishould 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
psqluser account:
% /usr/local/psql/bin/odbctest DSN=DEMODATA
- 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 |