PreviousInstall Toolkit Handbook (v9 SP2 (9.5) revision 1) Next

Supplementary Installation Procedures

Chapter contents

This section contains procedures that you may want to perform in your install.

Applying a License Key

A license key is required to run the Pervasive PSQL database engine. The Install Toolkit does not provide a license, but the sample installs do install a license by use of the CustomInstallActions.vbs script.

You may provide a license key during installation in these ways:

Creating a Database After Installation

You may use Pervasive PSQL Distributed Tuning Interface (DTI) to create a database following a successful installation of the Pervasive PSQL product. The Pervasive PSQL engine must be running before you can create a database.

The following code illustrates how to use the DTI function PvCreateDatabase to create a database. You may create a database only on the local machine. See also PvCreateDatabase in API Programmer's Reference, which is part of the Pervasive PSQL Software Developer's Kit (SDK).

// This line accesses a DLL required to process 
// DTI functions 
nRet = UseDLL(szPtkTargetDir ^ PTK_DEST_BINDIR ^ 
"w3dbav80.dll"); 
// This line starts a DTI session, which is required 
before any DTI calls are made 
	nBTIRET = PvStart(nM); 
// If the DLL can be accessed then continue 
if (nRet = PTK_SUCCESS) then 
// If any existing databases need to be deleted, 
// uncommment and use the following IF structure. 
// bDeleteOld is a user-defined variable. 
//	if (bDeleteOld) then 
//	nBTIRET = PvDropDatabase(-1,szDatabaseName,0); 
	// -1 represents local connection 
	// 1 means delete DDFs, 0 means retain DDFs 
//	endif; 
// This flag sets database options 
nDBFLAG = 0; 
	// 2 means to enforce referential integrity  
	nDBFLAG = nDBFLAG | 2;  
// The following function creates a new database 
nBTIRET = PvCreateDatabase(-1, szDatabaseName, 
szDatabasePath, szDatabasePath, nDBFLAG ); 
// -1 represents local connection 
// szDatabasePath is used twice: once for the 
// database and once for the DSN 
// If the database or DSN already exists, then a 
// failure message is written to the install.log 
// and a failure return code is returned 
	if !( nBTIRET = 0 || nBTIRET = 
		PTK_STATUS_DBNAME_ALREADY_EXISTS ) then 
	Sprintf(szMsg, @PTK_ERR_CREATE_DEMODBNAME, 
			nBTIRET); 
		PtkAddToLogFile(szMsg,@PTK_STAMP_DBCONFIG); 
		nRet =PTK_FAILURE; 
	else 
// If the database and DSN were created, a success 
// return code is returned 
		nRet = PTK_SUCCESS; 
	endif; 
endif; 
// This line releases the DLL 
nRet = UnUseDLL(szPtkTargetDir ^ PTK_DEST_BINDIR ^ 
"w3dbav80.dll"); 

Running PSA During Setup

This section shows how to use the file archiving and connectivity testing capabilities of Pervasive System Analyzer (PSA). PSA runs in two phases. The first phase analyzes the system and archives files. The second phase performs engine connectivity testing.

To install PSA

From the PSA install image, run:

psa\setup.exe -s -sms 

To run PSA analysis and archiving (phase 1)

"<system common directory>\Pervasive Software 
Shared\PSA\psawizrd.exe" -p:1 -s -i<pvsw 
installdir>\ptksetup.ini 

To run PSA engine connectivity testing (phase 2)

"<system common directory>\Pervasive Software 
Shared\PSA\psawizrd.exe" -p:2 -i<pvsw 
installdir>\ptksetup.ini 

The parameters can be interpreted as follows:

Parameter
Explanation / Valid values
-p
Specifies phase of PSA.
1 : Analyze
2 : Network Connectivity, Relational and Transactional Tests
-i
Location of .ini file
-s
Specifies `silent' mode.


Chapter contents
Book contents

Prev topic: Performing Simple Installation Customizations
Next topic: Easy Updates