System Functions

System functions return system information.

This table lists the system functions and their parameters.

System functions

System function

Parameters

COL_LENGTH

table-name, column-name )

COL_NAME

table-id, column-id [ , database-id ] )

CONNECTION_PROPERTY

( { property-id | property-name } [ , connection-id ] )

DATALENGTH

expression )

DB_ID

( [ database-name ] )

DB_NAME

( [ database-id ] )

DB_PROPERTY

( { property-id | property-name } [ ,{database-id | database-name } ] )

EVENT_CONDITION

condition-name )

EVENT_CONDITION_NAME

integer )

EVENT_PARAMETER

context-name )

GROUP_MEMBER

group-name-string-expression [ , user-name-string-expression ] )

INDEX_COL

table-name, index-id, key_# [ ,user-id ] )

NEXT_CONNECTION

[connection-id] [, database-id])

NEXT_DATABASE

( { NULL | database-id } )

OBJECT_ID

object-name )

OBJECT_NAME

object-id [ , database-id ] )

PROPERTY

( { property-id | property-name } )

PROPERTY_DESCRIPTION

property-id | property-name } )

PROPERTY_NAME

property-id )

PROPERTY_NUMBER

property-name )

SUSER_ID

( [ user-name ] )

SUSER_NAME

( [ user-id ] )

USER_ID

( [ user-name ] )

USER_NAME

( [ user-id ] )

Description

Databases currently running on a server are identified by a database name and a database ID number. The db_id and db_name functions provide information on these values.

A set of system functions provides information about properties of a currently running database, or of a connection, on the database server. These system functions take the database name or ID, or the connection name, as an optional argument to identify the database or connection for which the property is requested.

Performance

System functions are processed differently than other SAP Sybase IQ functions. When queries to SAP Sybase IQ tables include system functions, performance is reduced.

Compatibility

This table shows the Adaptive Server Enterprise system functions and their status in SAP Sybase IQ:

Status of Adaptive Server Enterprise system functions in SAP Sybase IQ

Function

Status

col_length

Implemented

col_name

Implemented

db_id

Implemented

db_name

Implemented

index_col

Implemented

object_id

Implemented

object_name

Implemented

proc_role

Always returns 0

show_role

Always returns NULL

tsequal

Not implemented

user_id

Implemented

user_name

Implemented

suser_id

Implemented

suser_name

Implemented

datalength

Implemented

curunreservedpgs

Not implemented

data_pgs

Not implemented

host_id

Not implemented

host_name

Not implemented

lct_admin

Not implemented

reserved_pgs

Not implemented

rowcnt

Not implemented

used_pgs

Not implemented

valid_name

Not implemented

valid_user

Not implemented

Notes

  • Some of the system functions are implemented in SAP Sybase IQ as system stored procedures.

  • The db_id, db_name, datalength, suser_id, and suser_name functions are implemented as built-in functions.