dbcc adds the prsqlcache and purgesqlcache parameters. The prsqlcache parameter allows you to print summaries of cached SQL statements, and the purgesqlcache parameter purges all statement cache entries, except those that are currently in use.
This is the partial syntax for dbcc:
dbcc prsqlcache[oid, printopt]
dbcc purgesqlcache
where:
prsqlcache – prints summaries of cached SQL statements.
oid – the object ID of the entry for which a summary is to be printed. Additional output is controlled by the value of the printopt variable. The value of oid can also be set to 0, in which case a brief summary is printed for every cached SQL statement, and the value of printopt is ignored.
printopt – controls the output for prsqlcache when oid is set to a valid object ID. The printopt variable can be set to 0 or 1. When printopt is set to 1, showplan output is printed.
purgesqlcache – results in all SQL statements being deleted from the statement cache except those currently in use.
See “Purging the statement cache” for an example of dbcc prsqlcache and “Printing statement summaries” for examples of dbcc purgesqlcache.
Copyright © 2004. Sybase Inc. All rights reserved. |
![]() |