Skip to main content

%SYS.DBSRV

class %SYS.DBSRV extends %Library.RegisteredObject

IRIS xDBC Server This code used to be in %SYS.DBSRV.mac prior to DPV6458

Property Inventory

Method Inventory

Properties

property Auditing as %Integer [ InitialExpression = 0 ];
Flag which determings if we are performing xDBC query auditing or not
Property methods: AuditingDisplayToLogical(), AuditingGet(), AuditingIsValid(), AuditingLogicalToDisplay(), AuditingNormalize(), AuditingSet()
property AuditingDML as %Integer [ InitialExpression = 0 ];
Flag which determings if we are performing xDBC DML auditing or not, relevant to fast insert auditing specifically
Property methods: AuditingDMLDisplayToLogical(), AuditingDMLGet(), AuditingDMLIsValid(), AuditingDMLLogicalToDisplay(), AuditingDMLNormalize(), AuditingDMLSet()
property ClientMaxIdleTime as %Integer;
Maximum number of seconds this server should be allowed to remain idle for (no message from client)
Property methods: ClientMaxIdleTimeDisplayToLogical(), ClientMaxIdleTimeGet(), ClientMaxIdleTimeIsValid(), ClientMaxIdleTimeLogicalToDisplay(), ClientMaxIdleTimeNormalize(), ClientMaxIdleTimeSet()
property ConnectionLimit as %String;
Maximum number of xDBC connection we can allow for this server
Property methods: ConnectionLimitDisplayToLogical(), ConnectionLimitGet(), ConnectionLimitIsValid(), ConnectionLimitLogicalToDisplay(), ConnectionLimitLogicalToOdbc(), ConnectionLimitNormalize(), ConnectionLimitSet()
property Device as %String;
TCP/Shared Memory device for the connection
Property methods: DeviceDisplayToLogical(), DeviceGet(), DeviceIsValid(), DeviceLogicalToDisplay(), DeviceLogicalToOdbc(), DeviceNormalize(), DeviceSet()
property DeviceStack as %String [ InitialExpression = 0 , MultiDimensional ];
Memory to hold the Devices pushed/popped on the stack for gateway re-entrancy
Property methods: DeviceStackDisplayToLogical(), DeviceStackGet(), DeviceStackIsValid(), DeviceStackLogicalToDisplay(), DeviceStackLogicalToOdbc(), DeviceStackNormalize(), DeviceStackSet()
property Dispatch as %Integer [ MultiDimensional ];
Array which holds the server functions permitted by this connection
Property methods: DispatchDisplayToLogical(), DispatchGet(), DispatchIsValid(), DispatchLogicalToDisplay(), DispatchNormalize(), DispatchSet()
property EventClass as %String;
Name of the class that has transaction callmack methods %OnTranCommit and %OnTranRollback
Property methods: EventClassDisplayToLogical(), EventClassGet(), EventClassIsValid(), EventClassLogicalToDisplay(), EventClassLogicalToOdbc(), EventClassNormalize(), EventClassSet()
property FunctionTimeout as %Integer [ InitialExpression = 0 ];
Timeout from the client to be used to place a time limit (in seconds) on a function's execution
Property methods: FunctionTimeoutDisplayToLogical(), FunctionTimeoutGet(), FunctionTimeoutIsValid(), FunctionTimeoutLogicalToDisplay(), FunctionTimeoutNormalize(), FunctionTimeoutSet()
property GatewayReentry as %Integer [ InitialExpression = 0 ];
Flag used to tell the server this was called from gatewat Re-Entrancy
Property methods: GatewayReentryDisplayToLogical(), GatewayReentryGet(), GatewayReentryIsValid(), GatewayReentryLogicalToDisplay(), GatewayReentryNormalize(), GatewayReentrySet()
property HeaderReadInSQL as %Integer;
This flag is true if the header was read within the generated SQL code
Property methods: HeaderReadInSQLDisplayToLogical(), HeaderReadInSQLGet(), HeaderReadInSQLIsValid(), HeaderReadInSQLLogicalToDisplay(), HeaderReadInSQLNormalize(), HeaderReadInSQLSet()
property InBufSize as %Integer;
TCP input buffer size
Property methods: InBufSizeDisplayToLogical(), InBufSizeGet(), InBufSizeIsValid(), InBufSizeLogicalToDisplay(), InBufSizeNormalize(), InBufSizeSet()
property LCBmode as %Integer [ InitialExpression = 0 ];
Flag used to tell the server it has been called from Light C Binding
Property methods: LCBmodeDisplayToLogical(), LCBmodeGet(), LCBmodeIsValid(), LCBmodeLogicalToDisplay(), LCBmodeNormalize(), LCBmodeSet()
property Logging as %Integer [ InitialExpression = 0 ];
Flag for if we are performing server logging or not
Property methods: LoggingDisplayToLogical(), LoggingGet(), LoggingIsValid(), LoggingLogicalToDisplay(), LoggingNormalize(), LoggingSet()
property ObjectCache as %String [ MultiDimensional ];
ObjectCaache holds the orefs for cached cached query objects
Property methods: ObjectCacheDisplayToLogical(), ObjectCacheGet(), ObjectCacheIsValid(), ObjectCacheLogicalToDisplay(), ObjectCacheLogicalToOdbc(), ObjectCacheNormalize(), ObjectCacheSet()
property ObjectCacheHead as %String;
Property methods: ObjectCacheHeadDisplayToLogical(), ObjectCacheHeadGet(), ObjectCacheHeadIsValid(), ObjectCacheHeadLogicalToDisplay(), ObjectCacheHeadLogicalToOdbc(), ObjectCacheHeadNormalize(), ObjectCacheHeadSet()
property ObjectCacheMaxSize as %Integer [ InitialExpression = 0 ];
Property methods: ObjectCacheMaxSizeDisplayToLogical(), ObjectCacheMaxSizeGet(), ObjectCacheMaxSizeIsValid(), ObjectCacheMaxSizeLogicalToDisplay(), ObjectCacheMaxSizeNormalize(), ObjectCacheMaxSizeSet()
property ObjectCacheSize as %Integer [ InitialExpression = 0 ];
Property methods: ObjectCacheSizeDisplayToLogical(), ObjectCacheSizeGet(), ObjectCacheSizeIsValid(), ObjectCacheSizeLogicalToDisplay(), ObjectCacheSizeNormalize(), ObjectCacheSizeSet()
property ObjectCacheTail as %String;
Property methods: ObjectCacheTailDisplayToLogical(), ObjectCacheTailGet(), ObjectCacheTailIsValid(), ObjectCacheTailLogicalToDisplay(), ObjectCacheTailLogicalToOdbc(), ObjectCacheTailNormalize(), ObjectCacheTailSet()
property OutBufSize as %Integer;
TCP Output buffer size
Property methods: OutBufSizeDisplayToLogical(), OutBufSizeGet(), OutBufSizeIsValid(), OutBufSizeLogicalToDisplay(), OutBufSizeNormalize(), OutBufSizeSet()
property RHash as %String;
Hash of the login roles for this user
Property methods: RHashDisplayToLogical(), RHashGet(), RHashIsValid(), RHashLogicalToDisplay(), RHashLogicalToOdbc(), RHashNormalize(), RHashSet()
property RedirectionStack as %String [ InitialExpression = 0 , MultiDimensional ];
Array used to keep track of Start/Stop output redirection for each device
Property methods: RedirectionStackDisplayToLogical(), RedirectionStackGet(), RedirectionStackIsValid(), RedirectionStackLogicalToDisplay(), RedirectionStackLogicalToOdbc(), RedirectionStackNormalize(), RedirectionStackSet()
property RolesAdded as %String;
Roles that might have been added by CheckBindingsAccess
Property methods: RolesAddedDisplayToLogical(), RolesAddedGet(), RolesAddedIsValid(), RolesAddedLogicalToDisplay(), RolesAddedLogicalToOdbc(), RolesAddedNormalize(), RolesAddedSet()
property SQLCompileContext as %SYSTEM.Context.SQLCompile;
Holds the $SYSTEM.Context.SQLCompile settings at the time of connection
Property methods: SQLCompileContextGet(), SQLCompileContextGetObject(), SQLCompileContextGetObjectId(), SQLCompileContextGetSwizzled(), SQLCompileContextIsValid(), SQLCompileContextNewObject(), SQLCompileContextSet(), SQLCompileContextSetObject(), SQLCompileContextSetObjectId(), SQLCompileContextUnSwizzle()
property ServerOptions as %Integer [ MultiDimensional ];
Options supported for this connection after handshake with client
Property methods: ServerOptionsDisplayToLogical(), ServerOptionsGet(), ServerOptionsIsValid(), ServerOptionsLogicalToDisplay(), ServerOptionsNormalize(), ServerOptionsSet()
property ServiceType as %String [ MultiDimensional ];
Used to determine which types of functions are privileged for this user Multidimentional because I need to set $e on the value.
Property methods: ServiceTypeDisplayToLogical(), ServiceTypeGet(), ServiceTypeIsValid(), ServiceTypeLogicalToDisplay(), ServiceTypeLogicalToOdbc(), ServiceTypeNormalize(), ServiceTypeSet()
property UHash as %String;
Hash for the username
Property methods: UHashDisplayToLogical(), UHashGet(), UHashIsValid(), UHashLogicalToDisplay(), UHashLogicalToOdbc(), UHashNormalize(), UHashSet()
property WaterMark1 as %Integer;
Watermark level to flush fetch results for first buffer
Property methods: WaterMark1DisplayToLogical(), WaterMark1Get(), WaterMark1IsValid(), WaterMark1LogicalToDisplay(), WaterMark1Normalize(), WaterMark1Set()
property WaterMark2 as %Integer;
Watermark level to flush fetch results for second through Nth buffer
Property methods: WaterMark2DisplayToLogical(), WaterMark2Get(), WaterMark2IsValid(), WaterMark2LogicalToDisplay(), WaterMark2Normalize(), WaterMark2Set()

Methods

classmethod AuditSP(parameters)
classmethod AuthenticationError(text, status, ns="")
method BuildDispatch()
Build the local array for looking up client functions to the dispatch number The functions allows for this server process are based on the resources the process has We also define ..ServiceType here. This is a string with: position 1 ON: User has %Service_SQL position 2 ON: User has %Service_Object position 3 ON: User has %Service_DirectLoad (XEP)
classmethod CacheInfo(io, uplen)
Called from %SYS.SERVER to get available namespaces.
classmethod CacheResultSetFetch()
called from srvFR
classmethod Catalog(query)
process Catalog Queries
classmethod CloseAllStatements()
classmethod CloseStatement(%qacn)
called from srvCU, Prepare, SPPrepare
classmethod CloseUp(atend=0, nocache=0)
classmethod CreateOref(discard=0)
Structure of linked list FIFO $$$srv.ObjectCache: $$$srv.ObjectCache(%qacn)=oref $$$srv.ObjectCache(%qacn,0)=forward pointer towards the head of the queue $$$srv.ObjectCache(%qacn,1)=back pointer towards the tail of the queue $$$srv.ObjectCacheHead=head of the queue (%qacn value) $$$srv.ObjectCacheTail=tail of the queue (%qacn value) $$$srv.ObjectCacheSize=size of the queue See if we have this oref in the cache, if so return it and if not then %new the class we want and return this
classmethod DirectDialect()
classmethod DirectParameter()
DIRECT_EXECUTE_DIALECT_PARAM (DP) Field Name Description ----------------------- ------------------------------------------------------ SQL Dialect SQL Dialect (DEFAULT = 0, MSSQL = 1, SYBASE = 2) SQL Text SQL statement isStatic isStatic - unused Statement Timeout Statement Timeout (protocol>=42) Parameter Sets Number of Parameter Sets (Ignored) Parameter Count Number of Parameters ...Type Parameter Type ...Precision Parameter Precision ...Scale Parameter Scale ...Nullable Parameter Nullable ...Name Parameter Name ...Mode Parameter Mode Parameter List $LB(par1,...,parCount)
classmethod ExecuteBatch()
classmethod ExecuteBatchError(i, cnt)
classmethod FlushError(tag, ns="")
classmethod GWDisconnect(device)
This entry point is called from the gateway re-entrance code to cleanup RETURNs nothing
classmethod GWExecuteSingle(%qmsgid, %qacn, %qfun)
classmethod GatewayIn()
classmethod GetServerProcessCount()
Count the current number of xDBC server processes
classmethod GetVersion()
Called from SQLVer^SystemCheck
classmethod ISCProcAll(SCHEMA, PROC)
ISCProcAll takes a procedure and schema and checks to see if this is a class from CACHELIB with no owner. if it is, privileges do not need to be checked on this procedure and everyone can run it. This preserves behavior we had prior to DPV4707 where privileges were not checked on hidden procedures Returns: 1 - if this procedure is from CACHELIB and there is no owner - no privilege checking needed 0 - otherwise
classmethod InitSHM(ByRef shmIO, dollarJ, shmSize, shmName, shmWaitFlag, openTimeout, returnStatus=0, ByRef statusCode, currentDevice="", setQdev=0)
Generic Init SharedMemory device
classmethod IsolationLevel()
Get/set server process's isolation level Called from srvIL We support READ_COMMITED (0), READ_COMMITTED (1), and READ_VERIFIED (3) The client mapping for these values is: 0 on server, 1 on client // uncommitted 1 on server, 2 on client // committed 3 on server, 32 on client // verified if level=0, the client is simply asking what the current isolation level is.
classmethod JPAQuery()
JPAQuery() implements the QQ message processor
classmethod LCBSuperConnect1(protocol, msgid, acn, io)
Support connecting via ccallin-based SPC device, for Light C++ Binding. Called from LCB to process first message from SendLogonMessage()
classmethod LCBSuperConnect2(io)
Support connecting via ccallin-based SPC device, for Light C++ Binding. Called from LCB to process second message from SendLogonMessage()
classmethod Prepare()
Called by PP, DQ (Direct Query), DU (Direct Update), DX (Direct Static Cursor)
classmethod ProcessExternalInterrupt(pCloseCurrentStatement=1)
The process received an error, deal with it...
classmethod ReadQueryParameters()
classmethod RecordError(tag)
Record the error on the server. Like FlushError, but send nothing to the client
classmethod ResetConnection()
resets/cleans up the connection so that it can be reused in a pooled env
classmethod SPClose(%qHandle)
Called from SPFetch
classmethod SPExecute()
Called from srvMS (Multiple Result Set)
classmethod SPFetch(directcall, %qHandle)
Called from srvSF (Stored Procedure Fetch Data) and SPQuery directcall=1 means this is an srvSF call
classmethod SPFunction(procmeta)
if procmeta is defined, this was a DS call and we need to write the metadata on the wire after the proc execution
classmethod SPMoreData()
Called from srvMD (Multiple Result Sets Fetch Data)
classmethod SPMoreResults(directcall)
Called from SPExecute, srvMR (Get More Results), and DirectDialect directcall = 1 when called from srvMR, otherwise 0.
classmethod SPPrepare(ByRef returnmeta)
Called from srvDS (Direct Stored procedure) and srvSP (Prepare Stored Procedure) if returnmeta=1, do not write the metadata to the zobjexport buffer here. This means it is a "DS" call and we need to wait and wrie the metadata after SP execution. This is needed in case the SP execution performs re-entrancy, the metadata written to the buffer will be lost
classmethod SPQuery(ByRef procmeta, catalogQuery=0)
Called from srvDS (Direct Stored procedure), srvSQ (Stored Procedure Query Execute), srvUNK for catalog queries if procmeta is defined, this was a DS call and we need to write the metadata on the wire after the proc execution
classmethod SPReadParameters(parameters)
classmethod SPReadParametersDP(parameters)
classmethod SPWriteParameters(parameters)
classmethod SPWriteParametersDP(parameters)
classmethod Server(jumpToMain As %Integer = 0)
classmethod SetCompileMode()
method SetupDevice(io)
Setup TCP/IP device specific options, the device must be the current device
classmethod SetupShmDevice(ByRef shmIO, shmConnect, returnStatus=0, ByRef statusCode, currentDevice="", setQdev=0)
Setup SharedMemory device specific options, the device must be the current device
classmethod StaticCursorExecute()
classmethod SuperConnect(protocol, msgid, acn, io, %qport)
classmethod SuperError(msgid, acn, rc)
; send Super Server error message (called from %SYS.SERVER)
classmethod Transact(ttype)
classmethod XDCall()
method delta(t1, t2)
classmethod dumplog(pid="")
classmethod dumponelog(pid)
classmethod log(text="", sameid=0, ByRef sql, ByRef vartypes, ns="")
log something log file format is: 1 2 3 4 5 6 7 8 9 10 ^%sqlcq(namespace,"log",pid,id) = $lb(timestamp,text, message id, cursor number, function, isolation level, transaction level, error code, message,rowcount,%lasterr) ^%sqlcq(namespace,"log",pid,id,"sql") = array of sql text ^%sqlcq(namespace,"log",pid,id,"vartype") = array of metadata for %sqlHVarTypes ^%sqlcq(namespace,"log",pid,id,"info") = # of info lines ^%sqlcq(namespace,"log",pid,id,"info",1..n) = Additional information for this entry
classmethod logappend(info="", ns="")
Add info to the current log entry
method median(ByRefstatements, sid, fun)
classmethod purgelog(pid="*")
classmethod setupLogging(ns)
classmethod sqlcode(code)
classmethod startSYSIOLoop()
classmethod timings(outlierPerc=500, pqpulimit=1)

Inherited Members

Inherited Methods

FeedbackOpens in a new tab