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

查看数据库缓存的SQL

WBOY
Release: 2016-06-07 14:56:55
Original
1098 people have browsed it

查看数据库缓存的 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
Copy after login
Related labels:
source:php.cn
Statement of this Website
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
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template