A  B  C  D  E  F  G  H  I  J  K  L  M  N  O  P  Q  R  S  T  U  V  W  X  Y  Z  special characters  sybase-tech-blog


Category: ASE: Functions: System Functions

curunreservedpgs()

The system function curunreservedpgs() returns the number of free pages on the specified fragment of a device.

Syntax of the System Function curunreservedpgs()

    curunreservedpgs ( dbid, lstart, unreservedpgs)
    

The parameters of the System Function curunreservedpgs()

"dbid"
The parameter "dbid" is the unique identifier (id) of a database. The id is stored in the system table sysdatabases located in the master database.

"lstart"
The parameter "lstart" is one page on the fragment of a device, for which the number of free pages should be returned.

"unreservedpgs"
The parameter "unreservedpgs" specifies the default value to be returned, if the table is currently unavailable.

Example for the System Function curunreservedpgs()

    select curunreservedpgs(4, 51200, 0)
go
-----
50044

Returns the number of free pages, in this case 50044.

See also:

ASE T-SQL - Aggregate Functions,
audit_event_name(),
col_length(),
col_name(),
datachange(),
datalength(),
data_pages(),
data_pgs(),
db_id(),
db_name(),
host_id(),
host_name(),
identity(),
index_col(),
index_colorder(),
isnull(),
lct_admin(),
license_enabled(),
lockscheme(),
next_identity(),
object_id(),
object_name(),
pagesize(),
pointer_size(),
ptn_data_pgs(),
reserved_pages(),
reserved_pgs(),
rowcnt(),
row_count(),
showplan_in_xml(),
syb_sendmsg(),
syb_sendmsg(),
System Functions,
tempdb_id(),
tran_dumpable_status(),
tsequal(),
used_pages(),
used_pgs().