Home >Database >Mysql Tutorial >查看数据库缓存的SQL

查看数据库缓存的SQL

WBOY
WBOYOriginal
2016-06-07 14:56:551091browse

查看数据库缓存的 SQL 无 --适用MSSQL2000、MSSQL2005use?masterdeclare?@dbid?intSelect?@dbid?=?dbid?from?sysdatabases?where?name?=?'Test'--修改成数据库的名称selectdbid,UseCounts?,RefCounts,CacheObjtype,ObjType,DB_Name(dbid)?as?DatabaseName,SQ

查看数据库缓存的SQL

--适用MSSQL2000、MSSQL2005
use?master
declare?@dbid?int
Select?@dbid?=?dbid?from?sysdatabases?where?name?=?'Test'--修改成数据库的名称
select
dbid,UseCounts?,RefCounts,CacheObjtype,ObjType,
DB_Name(dbid)?as?DatabaseName,SQL
from?syscacheobjects
where?dbid=@dbid
order?by?dbid,useCounts?desc,objtype
Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn