Skip to main content
Version: NG-2.16

SAP ASE

Introduction

SAP ASE (Adaptive Server Enterprise) offers rich, real-time monitoring data that can be leveraged for observability to ensure database health, performance, and reliability. By collecting metrics on query execution, CPU and I/O usage, locks, deadlocks, wait events, and cache efficiency, teams can proactively detect anomalies, troubleshoot slowdowns, optimize resource utilization, and gain insights into transactional patterns. This observability data is essential for maintaining SLAs, enabling faster root cause analysis, and ensuring seamless operation of business-critical applications.

Getting Started

Compatibility

The SAP ASE O11ySource is compatible with all versions of SAP ASE DB greater than or equal to 16.0

Data Collection Method

vuSmartMaps collects health and performance data for SAP ASE Database by using an internal data collector. This data collector collects data based on the source configuration.

Prerequisites

Dependent Configuration

To configure this O11ySource, create a 'credential' of type 'user' under the 'Definition' tab.

Inputs for Configuring Data Source

  • Instance Name: Please enter the name of the SAP ASE instance. This should be a unique identifier for the specific SAP ASE deployment you want to monitor.
  • DB Details: Please provide the details of DB
  • IP Address: IP address needs to be a valid IP Address.
  • Port: Enter a valid port
  • Credential: This field is required

Firewall Requirement

To collect data from this O11ySource, ensure the following ports are opened:

Source IPDestination IPDestination PortProtocolDirection
vuSmartMaps IPIP address of the SAP ASE server5000*TCPOutbound

*Before providing the firewall requirements, please update the port based on the customer environment.

Configuring the Target

Configure Metrics Collection from SAP ASE Server Metrics from SAP ASE are gathered by querying system monitoring tables using a read-only

  • monitor_user* user via Telegraf SQL plugin.Note: The following configuration steps must be executed by a user with system administrator privileges (e.g., login with sa or a user granted sa_role). Step 1: Enable Monitoring and Statistics Collection
sp_configure 'enable monitoring', 1
go
sp_configure 'sql text pipe active', 1
go
sp_configure 'statement pipe active', 1
go
sp_configure 'statement statistics active',1
go
sp_configure 'statement cache size', 1000
go
sp_configure 'wait event timing', 1
go
sp_configure 'per object statistics active', 1
go
go sp_configure 'object lockwait timing', 1
go
reconfigure with override
go

Step 2: Create Read-Only User and Grant Access

sp_addlogin monitor_user, <password>
go
sp_adduser monitor_user
go
grant role mon_role to monitor_user
go

Step 3: Grant Read-only Access to System Tables

grant select on sysusages to monitor_user
go
grant select on sysdatabases to monitor_user
go
grant select on sysprocesses to monitor_user
go
grant select on sysconfigures to monitor_user
go
grant select on syscurconfigs to monitor_user
go

Step 4: (Optional) Grant Access to Replication Monitoring

grant select on rs_lastcommit to monitor_user
go

Step 5: (Optional) Verify Monitoring Tables Are Enabled Login as monitor_user and run the following query to ensure monitoring tables are accessible:

select name from sysobjects where name like 'mon%' and type = 'U'
go

Configuration Steps

  • Enable the SAP ASE O11ySource.
  • Select the Sources tab and press the + button to add SAP ASE instance to be monitored.
  • Set up metrics collection configurations. The O11ySource already provides predefined metric collection queries. Afterwards, select Save and Continue

Metrics Collected

NameDescriptionData Type
@timestampThe event timestamp in string format, likely ISO-8601.String
timestampPrecise timestamp of the event, with milliseconds precision.DateTime64
database_nameDatabase Instance name of Sybase ASE ServerString
data_typeType of data being collectedString
hostHostname of the Sybase ASE ServerString
targetHostname of the Sybase ASE ServerString
SPIDSession Process ID identifying a user processUInt32
LoginUserUsername of the database user executing the queryString
ApplicationName of the client application connecting to the databaseString
SourceHostNameHostname of the machine from which the session originatedString
TableAccessesTotal number of table accesses by the sessionUInt64
TotalCPUTimeCumulative CPU time used by the process or engineUInt64
LogicalReadsNumber of logical page reads (from cache)Float64
PhysicalReadsNumber of physical page reads (from disk)Float64
DBNameName of the database associated with the query or sessionString
SQLTextSQL query text being executedString
ExecutionTimeMsElapsed execution time in millisecondsUInt64
CpuTimeMsCPU time used by the SQL query in millisecondsUInt64
QueryStateCurrent state of the query (Running or Completed)String
statusStatus of the server process (e.g., sleeping, running)String
CPUTimeMsCPU time consumed by the process in millisecondsUInt64
physical_ioNumber of physical I/O operations performedUInt64
memusageAmount of memory used by the processUInt64
MaxConnectionsMaximum configured concurrent user connectionsUInt64
TxnTypeType of transaction (commit or rollback)String
countTotal count of occurrences for the specified transaction typeFloat64
SegmentTypeType of database segment (data, log, or mixed)String
TotalBytesTotal allocated space in bytes for the segmentUInt64
UsedBytesUsed space in bytes within the segmentUInt64
FreeBytesFree space in bytes within the segmentUInt64
UsedPctPercentage of space used within the segmentFloat64
UptimeInSecondsUptime of the Sybase ASE server in secondsUInt64
DeadlockIDUnique identifier for the deadlock occurrenceString
HeldSPIDSPID holding the lock in a deadlock situationString
HeldSQLSQL statement held by the blocking processString
WaitSPIDSPID that is waiting for the resourceString
WaitSQLSQL statement waiting for the lock to be releasedString
ObjectDBNameName of the database where the locked object residesString
HeldUserNameUsername of the process holding the lockString
WaitUserNameUsername of the process waiting on the lockString
WaiterSPIDSPID of the waiting session in a lock wait scenarioString
HolderSPIDSPID of the session holding the requested lockString
LockTypeType of lock acquired or requested (e.g., page, row)String
WaitTimeTime duration the lock has been waited forUInt64
WaiterHostHostname of the client waiting for the lockString
WaiterCommandCommand being executed by the waiting processString
CacheNameName of the memory cache poolString
CacheHitRatioPctPercentage of cache hits over total cache accessesFloat64
InstanceIDID of the ASE instance (engine) reporting metricsString
ProcedureCacheHitRatioHit ratio of the procedure cacheFloat64
EngineNumberEngine number of the ASE engine threadString
UserCPUTimeCPU time consumed by user operationsUInt64
SystemCPUTimeCPU time spent on system/kernel operationsUInt64
IOCPUTimeCPU time spent on io operationsUInt64
IOPctPercentage of CPU time spent on I/O operationsFloat64
IdlePctPercentage of CPU time the engine was idleFloat64
SpinlockNameName of the spinlock structureString
TotalGrabsNumber of successful grabs of the spinlockUInt64
TotalSpinsNumber of times the engine spun while waiting for the spinlockUInt64
TotalWaitsNumber of times the engine waited for the spinlockUInt64
AvgContentionRatioAverage contention ratio of the spinlockFloat64
TotalSearchesTotal number of searches performed in the statement cacheUInt64
TotalHitsTotal number of successful statement cache hitsUInt64
HitRatioPctHit ratio percentage for statement cache usageFloat64
WaitEventIDIdentifier of the wait eventString
DescriptionText description of the wait eventString
TotalWaitTimeInMsTotal time spent waiting for the event in millisecondsUInt64
TotalWaitCountTotal number of wait events of the specified typeFloat64
DBIDInternal identifier of the databaseUInt32
PagesReadTotal number of pages read from diskUInt64
PagesWrittenTotal number of pages written to diskUInt64
LockRequestsTotal number of lock requestsUInt64
LockWaitsTotal number of times a lock request resulted in a waitUInt64
TruncTimeStampTimestamp of the last replicated transaction truncationUInt64
CurrentTimeStampCurrent timestamp at the time of metric collectionUInt64
QueueSizeCurrent size of the replication queueFloat64
ServerUserIDInternal user ID executing the queryString
StartTimeTimestamp when the SQL statement began executionUInt64
EndTimeTimestamp when the SQL statement finished executionUInt64
suidServer user ID used for mapping to login nameString
segmapSegment map indicating the purpose of database segment (data/log)String
unreservedpgsNumber of unreserved pages in a segmentUInt64
crdateCreation time of the database used to calculate uptimeString
ResolveTimeTime at which a deadlock was resolvedDateTime64
BlockedBySPID that is blocking the current processString
WaitsNumber of times a wait event occurredString
PreparedStmtCountNumber of statements preparedUInt64
SessionDuraionMsDuration of the session in millisecondsUInt64
LoggedInDateTimeLogged in time for the userString
HostProcessHost process through which the connection is establishedString
TransactionNameName of the transactionString
BlockedDurationInTicksDuration for which the current process is blocked measured in ticksUInt64
CommandCommand being executedString
IPAddressIP AddressString
ClientNameName of the client program which is using the connectionString
HeldApplNameApplication name of the session holding the lockString
WaitApplNameApplication name of the session waiting on the lockString
HeldTranNameTransaction name of the lock holderString
WaitTranNameTransaction name of the waiter for the lockString
HeldLockTypeType of the lock heldString
WaitLockTypeType of the lock waited uponString
HeldCommandCommand being executed by the lock holderString
WaitCommandCommand being executed by the lock waiterString
HeldHostNameHostname of the lock holderString
WaitHostNameHostname of the lock waiterString
ObjectNameObject NameString
InstanceNameInstance NameString