- 论坛徽章:
- 0
|
我做了一个存储过程,
运行结果如下:
cpu_usage Memory_Usage
----------- ------------
0.00% 16608KB
Misc_Hit Execution_Hit Cursor_Hit Trigger_Hit Replication_Hit
----------- ------------- ----------- ----------- ---------------
71% 21% 0% 0% 0%
Adhoc_Hit Prepared_Hit Procdure_Hit
----------- ------------ ------------
77% 50% 51%
proc_id proc_name user_name
---------- ------------- ----------------
2244 SQL 查询分析器 HC-ZS
dbid dbname dbsize usage growth status dbfilename
------ -------------------------------------------------------------------------------------------------------------------------------- --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- -------------------------------------------------------------------------------------------------------------------------------- --------------------------------------------------------------------------------------------------------------------------------
1 master 14MB 12624KB 10% READ_WRITE C:\Program Files\Microsoft SQL Server\MSSQL\data\master.mdf
1 mastlog 2MB 576KB 10% READ_WRITE C:\Program Files\Microsoft SQL Server\MSSQL\data\mastlog.ldf
2 tempdev 8MB 472KB 10% READ_WRITE C:\Program Files\Microsoft SQL Server\MSSQL\data\tempdb.mdf
2 templog 1MB 451KB 10% READ_WRITE C:\Program Files\Microsoft SQL Server\MSSQL\data\templog.ldf
3 modeldev 1MB 432KB 10% READ_WRITE C:\Program Files\Microsoft SQL Server\MSSQL\data\model.mdf
3 modellog 1MB 245KB 10% READ_WRITE C:\Program Files\Microsoft SQL Server\MSSQL\data\modellog.ldf
4 MSDBData 12MB 10152KB 32% READ_WRITE C:\Program Files\Microsoft SQL Server\MSSQL\data\msdbdata.mdf
4 MSDBLog 2MB 793KB 32% READ_WRITE C:\Program Files\Microsoft SQL Server\MSSQL\data\msdblog.ldf
5 pubs 2MB 1200KB 10% READ_WRITE C:\Program Files\Microsoft SQL Server\MSSQL\data\pubs.mdf
5 pubs_log 1MB 444KB 10% READ_WRITE C:\Program Files\Microsoft SQL Server\MSSQL\data\pubs_log.ldf
6 Northwind 3MB 2384KB 10% READ_WRITE C:\Program Files\Microsoft SQL Server\MSSQL\data\northwnd.mdf
6 Northwind_log 1MB 391KB 10% READ_WRITE C:\Program Files\Microsoft SQL Server\MSSQL\data\northwnd.ldf
7 test_Data 2MB 560KB 10% READ_WRITE C:\Program Files\Microsoft SQL Server\MSSQL\data\test_Data.MDF
7 test_Log 5MB 1077KB 10% READ_WRITE C:\Program Files\Microsoft SQL Server\MSSQL\data\test_Log.LDF
7 test_1_Data 1MB 560KB 10% READ_WRITE C:\Program Files\Microsoft SQL Server\MSSQL\data\test_Data1.MDF
7 test_1_Log 1MB 1077KB 10% READ_WRITE C:\Program Files\Microsoft SQL Server\MSSQL\data\test_Log1.MDF
8 bank_Data 1MB 672KB 10% READ_WRITE C:\bank_Data.MDF
8 bank_Log 1MB 553KB 10% READ_WRITE C:\bank_Log.LDF
10 newDB_dat 2MB 968KB 10% READ_WRITE C:\Program Files\Microsoft SQL Server\MSSQL\data\newDB.mdf
10 newDB_log 1MB 425KB 10% READ_WRITE C:\Program Files\Microsoft SQL Server\MSSQL\data\newDB.ldf
而运行的结果是
0.00% 44832KB
0 return values received.
0% 0% 0% 0% 0% 0%
0% 0%
0 return values received.
hc-zs
0 return values received.
少了很多东西怎么回事啊?
源代码:
dbcmd(dbproc,"db_monitor" ;
dbsqlexec(dbproc);
while((re_code=dbresults(dbproc))!=NO_MORE_RESULTS)
{
if(re_code==SUCCEED)
{
dbprrow(dbproc);
numrets = dbnumrets(dbproc);
printf("%d return values received.\n\n", numrets);
}
} |
|