INFORMATION.SCHEMA.CURRENTSTATEMENTS
persistent class INFORMATION.SCHEMA.CURRENTSTATEMENTS extends %Library.Persistent, %XML.Adaptor [ Final ]
SQL Table Name: INFORMATION_SCHEMA.CURRENT_STATEMENTS
Returns one row for each metadata string pushed onto the Application Metadata Stack (AMS) that belongs to the SQL application (ApplicationID="%SQL" [WHERE "%SQL"=$$$AMSApplicationIDSQL]). The GetStackInfo() method within the %SYS.AppMetadataStack.SQL class returns the data ResultSet for this class/table.Property Inventory
- AppMetadataStackID
- CachedQuery
- CallerName
- ChildStatements
- CurrentWorkerCount
- ExecutionDuration
- ExecutionStart
- ExecutionStartUTC
- NameSpace
- Parameters
- Parent
- ParentType
- ProcessId
- QueryRunType
- QueryStmtType
- SQLStatementID
- Server
- StatementIndexHash
- StatementOrder
- Status
- SubStatement
- TPNestingLevel
- UserName
Method Inventory
Parameters
parameter READONLY = 1;
Inherited description: READONLY = 1 means that objects can be created, opened but not saved or deleted.
Tables are projected to SQL as READONLY.
Properties
property AppMetadataStackID as %List;
Property methods: AppMetadataStackIDGet(), AppMetadataStackIDIsValid(), AppMetadataStackIDLogicalToOdbc(), AppMetadataStackIDLogicalToXSD(), AppMetadataStackIDOdbcToLogical(), AppMetadataStackIDSet(), AppMetadataStackIDXSDToLogical()
property CachedQuery as %String;
Name of the Cached Query class created for this SQL Statement
NOTE: For some Embedded SQL DDL Statements, this will be the name of the Class/Routine
in which the Embedded SQL DDL Statement is specified and code generated
Property methods: CachedQueryDisplayToLogical(), CachedQueryGet(), CachedQueryIsValid(), CachedQueryLogicalToDisplay(), CachedQueryLogicalToOdbc(), CachedQueryNormalize(), CachedQuerySet()
property CallerName as %String;
Name of the Routine/Class who called this SQL Statement
If this is the top-most SQL Statement, then this value will be the empty string ("")
Property methods: CallerNameDisplayToLogical(), CallerNameGet(), CallerNameIsValid(), CallerNameLogicalToDisplay(), CallerNameLogicalToOdbc(), CallerNameNormalize(), CallerNameSet()
property ChildStatements as %List;
$LIST(...) of {StatementIndexHash} for all Children Queries
Property methods: ChildStatementsGet(), ChildStatementsIsValid(), ChildStatementsLogicalToOdbc(), ChildStatementsLogicalToXSD(), ChildStatementsOdbcToLogical(), ChildStatementsSet(), ChildStatementsXSDToLogical()
property CurrentWorkerCount as %Integer;
Number of workers currently active on behalf of this SQL Statement
Property methods: CurrentWorkerCountDisplayToLogical(), CurrentWorkerCountGet(), CurrentWorkerCountIsValid(), CurrentWorkerCountLogicalToDisplay(), CurrentWorkerCountNormalize(), CurrentWorkerCountSet(), CurrentWorkerCountXSDToLogical()
property ExecutionDuration as %Numeric (SCALE = 6) [ Required ];
Amount of time (in seconds) in which this SQL Query has been executing
Property methods: ExecutionDurationDisplayToLogical(), ExecutionDurationGet(), ExecutionDurationIsValid(), ExecutionDurationLogicalToDisplay(), ExecutionDurationNormalize(), ExecutionDurationSet(), ExecutionDurationXSDToLogical()
property ExecutionStart as %TimeStamp [ Required ];
Timestamp when this SQL Query started executing (in local timezone)
Property methods: ExecutionStartDisplayToLogical(), ExecutionStartGet(), ExecutionStartIsValid(), ExecutionStartLogicalToDisplay(), ExecutionStartLogicalToXSD(), ExecutionStartNormalize(), ExecutionStartOdbcToLogical(), ExecutionStartSet(), ExecutionStartXSDToLogical()
property ExecutionStartUTC as %TimeStamp [ Required ];
UTC timestamp when this SQL Query started executing
Property methods: ExecutionStartUTCDisplayToLogical(), ExecutionStartUTCGet(), ExecutionStartUTCIsValid(), ExecutionStartUTCLogicalToDisplay(), ExecutionStartUTCLogicalToXSD(), ExecutionStartUTCNormalize(), ExecutionStartUTCOdbcToLogical(), ExecutionStartUTCSet(), ExecutionStartUTCXSDToLogical()
property NameSpace as %String [ SqlFieldName = Namespace , Required ];
Namespace in which this SQL Statement was built/compiled into a Cached Query and invoked
Property methods: NameSpaceDisplayToLogical(), NameSpaceGet(), NameSpaceIsValid(), NameSpaceLogicalToDisplay(), NameSpaceLogicalToOdbc(), NameSpaceNormalize(), NameSpaceSet()
property Parameters as %List;
First 10 SQL Statement parameters (might be truncated)
Property methods: ParametersGet(), ParametersIsValid(), ParametersLogicalToOdbc(), ParametersLogicalToXSD(), ParametersOdbcToLogical(), ParametersSet(), ParametersXSDToLogical()
relationship Parent as INFORMATION.SCHEMA.CURRENTSTATEMENTS [ Inverse = SubStatement , Cardinality = one ];
Property methods: ParentGet(), ParentGetObject(), ParentGetObjectId(), ParentGetSwizzled(), ParentIsValid(), ParentNewObject(), ParentOnDelete(), ParentRClose(), ParentRExec(), ParentRFetch(), ParentRelate(), ParentSQLCompute(), ParentSet(), ParentSetObject(), ParentSetObjectId(), ParentUnRelate(), ParentUnSwizzle()
property ParentType as %String;
Parent Type: Parallel, Sharded
Property methods: ParentTypeDisplayToLogical(), ParentTypeGet(), ParentTypeIsValid(), ParentTypeLogicalToDisplay(), ParentTypeLogicalToOdbc(), ParentTypeNormalize(), ParentTypeSet()
property ProcessId as %String [ SqlFieldName = ProcessID , Required ];
Identifies the IRIS process ($JOB) in which this SQL Statement is running
Property methods: ProcessIdDisplayToLogical(), ProcessIdGet(), ProcessIdIsValid(), ProcessIdLogicalToDisplay(), ProcessIdLogicalToOdbc(), ProcessIdNormalize(), ProcessIdSet()
property QueryRunType as %String [ Required ];
SQL Query Run Type of this SQL Statement: EmbeddedSQL | DynamicSQL | xDBCQuery | ...
Property methods: QueryRunTypeDisplayToLogical(), QueryRunTypeGet(), QueryRunTypeIsValid(), QueryRunTypeLogicalToDisplay(), QueryRunTypeLogicalToOdbc(), QueryRunTypeNormalize(), QueryRunTypeSet()
property QueryStmtType as %Integer [ Required ];
SQL Query Statement Type # of this SQL Statement: 1 = SELECT | 2 = INSERT | 3 = UPDATE | 4 = DELETE | ... | 72 = CANCEL QUERY
Property methods: QueryStmtTypeDisplayToLogical(), QueryStmtTypeGet(), QueryStmtTypeIsValid(), QueryStmtTypeLogicalToDisplay(), QueryStmtTypeNormalize(), QueryStmtTypeSet(), QueryStmtTypeXSDToLogical()
property SQLStatementID as %Integer;
The second element of the AppMetadataStackID property, which is a
unique SQL Statement Identifier that can be used to identify a SQL Statement that is
stored in the SQL Statement Index (SSI)
Property methods: SQLStatementIDDisplayToLogical(), SQLStatementIDGet(), SQLStatementIDIsValid(), SQLStatementIDLogicalToDisplay(), SQLStatementIDNormalize(), SQLStatementIDSet(), SQLStatementIDXSDToLogical()
property Server as %String [ Required ];
Identifies the instance on which this SQL Statement is running: :
Property methods: ServerDisplayToLogical(), ServerGet(), ServerIsValid(), ServerLogicalToDisplay(), ServerLogicalToOdbc(), ServerNormalize(), ServerSet()
property StatementIndexHash as %String [ Required ];
SQL StatementIndex hash of this SQL Statement, which is used as a pointer to
the internal definition stored in the SQL Statement Index (SSI)
Property methods: StatementIndexHashDisplayToLogical(), StatementIndexHashGet(), StatementIndexHashIsValid(), StatementIndexHashLogicalToDisplay(), StatementIndexHashLogicalToOdbc(), StatementIndexHashNormalize(), StatementIndexHashSet()
property StatementOrder as %Integer [ Required ];
Order in which this SQL Statement is being executed, based on the ^||oddSQL.CURRENTSTATEMENTS("orderStmts") $LIST(...)
Property methods: StatementOrderDisplayToLogical(), StatementOrderGet(), StatementOrderIsValid(), StatementOrderLogicalToDisplay(), StatementOrderNormalize(), StatementOrderSet(), StatementOrderXSDToLogical()
property Status as %String [ Calculated , Required ];
SQL Query Status: Preparing, Executing (Current Default), Closed, Aborted - or more fine-grained
Property methods: StatusCompute(), StatusDisplayToLogical(), StatusGet(), StatusIsValid(), StatusLogicalToDisplay(), StatusLogicalToOdbc(), StatusNormalize(), StatusSQLCompute()
relationship SubStatement as array of INFORMATION.SCHEMA.CURRENTSTATEMENTS [ InitialExpression = $listbuild("INFORMATION.SCHEMA.CURRENTSTATEMENTS","Parent",+$this,"many",1,1) , Transient , Inverse = Parent , Cardinality = many ];
Property methods: SubStatementGet(), SubStatementGetObject(), SubStatementGetObjectId(), SubStatementGetSwizzled(), SubStatementIsEmpty(), SubStatementIsValid(), SubStatementNewObject(), SubStatementRClose(), SubStatementRExec(), SubStatementRFetch(), SubStatementRelate(), SubStatementSQLCompute(), SubStatementSet(), SubStatementUnRelate()
property TPNestingLevel as %Integer [ SqlFieldName = TP_NestingLevel , Required ];
Current nesting level for Transaction Processing (TP)
Property methods: TPNestingLevelDisplayToLogical(), TPNestingLevelGet(), TPNestingLevelIsValid(), TPNestingLevelLogicalToDisplay(), TPNestingLevelNormalize(), TPNestingLevelSet(), TPNestingLevelXSDToLogical()
property UserName as %String [ Required ];
$USERNAME of person who created and invoked this SQL Statement
Property methods: UserNameDisplayToLogical(), UserNameGet(), UserNameIsValid(), UserNameLogicalToDisplay(), UserNameLogicalToOdbc(), UserNameNormalize(), UserNameSet()
Methods
classmethod GetSQLStatement(ns As %String = "", hash As %String = "", Output tSC="", normalize As %Boolean = 1, upper As %Boolean = 0) as %String [ SQLProc = GetSQLStatement ]
Projected as the stored procedure: GetSQLStatement
Get and return the SQL Statement Text based on the {NameSpace} & {StatementIndexHash} fields
NOTE: Users with "USE" permission on the %Development resource can get all SQL Statements
Inherited Members
Inherited Methods
- %AddToSaveSet()
- %AddToSyncSet()
- %BuildDeferredIndices()
- %BuildIndicesAsync()
- %BuildIndicesAsyncResponse()
- %CheckConstraints()
- %CheckConstraintsForExtent()
- %ClassIsLatestVersion()
- %ClassName()
- %ComposeOid()
- %ConstructClone()
- %Delete()
- %DeleteExtent()
- %DeleteId()
- %DispatchClassMethod()
- %DispatchGetModified()
- %DispatchGetProperty()
- %DispatchMethod()
- %DispatchSetModified()
- %DispatchSetMultidimProperty()
- %DispatchSetProperty()
- %Exists()
- %ExistsId()
- %Extends()
- %GUID()
- %GUIDSet()
- %GetLock()
- %GetParameter()
- %GetSwizzleObject()
- %Id()
- %IsA()
- %IsModified()
- %IsNull()
- %KillExtent()
- %LockExtent()
- %LockId()
- %New()
- %NormalizeObject()
- %ObjectIsNull()
- %ObjectModified()
- %Oid()
- %OnBeforeAddToSync()
- %OnDeleteFinally()
- %OnDetermineClass()
- %OnOpenFinally()
- %OnSaveFinally()
- %Open()
- %OpenId()
- %OriginalNamespace()
- %PackageName()
- %PurgeIndices()
- %Reload()
- %RemoveFromSaveSet()
- %ResolveConcurrencyConflict()
- %RollBack()
- %Save()
- %SaveDirect()
- %SerializeObject()
- %SetModified()
- %SortBegin()
- %SortEnd()
- %SyncObjectIn()
- %SyncTransport()
- %UnlockExtent()
- %UnlockId()
- %ValidateIndices()
- %ValidateObject()
- %ValidateTable()
- XMLDTD()
- XMLExport()
- XMLExportToStream()
- XMLExportToString()
- XMLNew()
- XMLSchema()
- XMLSchemaNamespace()
- XMLSchemaType()
Storage
Gray indicates storage defined by superclasses.
Storage Model: SQLStorage
Maps: 1
Map number 1 is named Master
thismap.Global: ^||oddSQL.CURRENTSTATEMENTS
^||oddSQL.CURRENTSTATEMENTS({Server},{ProcessId},{StatementIndexHash})
|
= |
|