|
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 grouppvsw. See Getting Started with Pervasive.SQL (Server edition) for information on Pervasive.SQL Linux utilities and user accounts.
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 namesOptions 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 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.
${PVSW_ROOT}/etc/odbc.ini. SQLMGR required settings:
${PVSW_ROOT}/etc/odbc.ini
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 Data Sources] MyDSN=Pervasive.SQL databaseodbc.inishould have:
Note
Because Linux is case sensitive, the[DSN name]must be input exactly as listed under[ODBC Data Sources].
dsnadd utility by typing the following at the command line:
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
|
Chapter contents
Prev topic: Setting Up Database Access on a NetWare Server
|