26
%s: function called with invalid argument.
This error is only raised when using diagserver.
This error occurs when an attempt to execute a threshold action fails because of a problem in a memory structure.
If there are additional messages in the server error log that tell you which threshold was initiated, do the following steps:
Select the database:
1> use <database_name> 2> go
Where <database_name> is the database which contains the failed threshold.
Determine the stored procedure that is associated with the segment for which the error occurred:
1> sp_helpthreshold <segment_name> 2> go
Run the stored procedure manually.
If you were not able to determine which threshold was initiated by looking at the error log output, run the following curunreservedpgs query (appropriate to the version of Adaptive Server Enterprise that you are using) in each database to determine which threshold action did not execute properly:
Versions prior to 15.0:
1> use master 2> go
1> select db_name(dbid), d.name, 2> curunreservedpgs (dbid, lstart, unreservedpgs) 3> from sysusages u, sysdevices d 4> where d.low <= u.size + vstart 5> and d.high >= u.size + vstart - 1 6> and d.status &2 = 2 7> go
Version 15.0 and later
1> use master 2> go
1> select db_name(dbid), d.name, 2> curunreservedpgs (dbid, lstart, unreservedpgs) 3> from sysusages u, sysdevices d 4> where d.vdevno = u.vdevno 5> and d.status &2 = 2
This query returns the database name, device name, and the number of unreserved pages for each device fragment. If you can determine which threshold was reached (compare the output of the curunreservedpgs query with the free space for the segment), execute the threshold action manually. Refer to the chapter “Transact-SQL Functions” in the Reference Manual: Building Blocks for information about curunreservedpgs.
To prevent this error from occurring in the future, review the Adaptive Server error log and look for other messages associated with this error. There may be other errors that will tell you why the threshold failed. If more information is available, take the necessary steps to prevent the error from recurring.
All versions