Previous Topic

Next Topic

Session properties

The default session properties are suitable for most c-treeDB applications. Advanced developers may need to tune c-treeDB to meet application requirements. Use ctdbSetSessionParams() to set the following properties:

Property

Description

Default

BUFS

Index file buffers

10

FILS

File structure blocks

32

SECT

Node sectors

32

DBUFS

Data file buffers

10

USERPROF

User profile mask

513

The default USERPROF value of 513 tells single-user, transaction-control applications, to remove the auxiliary log files S*.FCS and L*.FCS upon successful termination of the application, and also removes the automatic key transformation. The table below presents all possible values for the USERPROF parameter.

Keyword

Value

Explanation

USERPRF_NTKEY

1

Do not perform auto tfrmkey

USERPRF_SAVENV

2

Savenv mode for transactions

USERPRF_NDATA

32

Do not perform auto data - UNIFRMAT conversion

USERPRF_LOCLIB

64

Use a local library: not server

USERPRF_PTHTMP

128

Add tmpname to input path, otherwise use system tmpname

USERPRF_CODCNV

256

Auto language conversion

USERPRF_CLRCHK

512

Clear transaction logs

Example


/* setting different user profile before logging on to session */
ctdbSetSessionParam(hSession, USERPROF, (USERPRF_NTKEY | USERPROF_CLRCHK));
if (ctdbLogon(hSession, “FAIRCOMS”, “ADMIN”, “ADMIN) != CTDBRET_OK)
   FatalError(“Session logon failed\n”);