|
Utilizando os principais comandos do DBCC
|
Blogger |
O que você gostaria de ver nesta página? Envie sua sugestão.
Utilizando os principais comandos do DBCCDBCC CACHESTATS displays information about the objects currently in the buffer cache, such as hit rates, compiled objects and plans, etc. Example: DBCC CACHESTATS Sample Results (abbreviated): Object Name Hit Ratio Proc 0.86420054765378507 Here's what some of the key statistics from this command mean:
[7.0, 2000] Updated 9-1-2005 ***** DBCC DROPCLEANBUFFERS: Use this command to remove all the data from SQL Server's data cache (buffer) between performance tests to ensure fair testing. Keep in mind that this command only removes clean buffers, not dirty buffers. Because of this, before running the DBCC DROPCLEANBUFFERS command, you may first want to run the CHECKPOINT command first. Running CHECKPOINT will write all dirty buffers to disk. And then when you run DBCC DROPCLEANBUFFERS, you can be assured that all data buffers are cleaned out, not just the clean ones. Example: DBCC DROPCLEANBUFFERS [7.0, 2000, 2005] Updated 9-1-2005 ***** DBCC ERRORLOG: If you rarely restart the mssqlserver service, you may find that your server log gets very large and takes a long time to load and view. You can truncate (essentially create a new log) the Current Server log by running DBCC ERRORLOG. You might want to consider scheduling a regular job that runs this command once a week to automatically truncate the server log. As a rule, I do this for all of my SQL Servers on a weekly basis. Also, you can accomplish the same thing using this stored procedure: sp_cycle_errorlog. Example: DBCC ERRORLOG [7.0, 2000, 2005] Updated 9-1-2005 ***** DBCC FLUSHPROCINDB: Used to clear out the stored procedure cache for a specific database on a SQL Server, not the entire SQL Server. The database ID number to be affected must be entered as part of the command. You may want to use this command before testing to ensure that previous stored procedure plans won't negatively affect testing results. Example: DECLARE @intDBID INTEGER SET @intDBID = (SELECT dbid FROM master.dbo.sysdatabases WHERE name = 'database_name') [7.0, 2000, 2005] Updated 9-1-2005 ***** DBCC INDEXDEFRAG: In SQL Server 2000, Microsoft introduced DBCC INDEXDEFRAG to help reduce logical disk fragmentation. When this command runs, it reduces fragmentation and does not lock tables, allowing users to access the table when the defragmentation process is running. Unfortunately, this command doesn't do a great job of logical defragmentation. The only way to truly reduce logical fragmentation is to rebuild your table's indexes. While this will remove all fragmentation, unfortunately it will lock the table, preventing users from accessing it during this process. This means that you will need to find a time when this will not present a problem to your users. Of course, if you are unable to find a time to reindex your indexes, then running DBCC INDEXDEFRAG is better than doing nothing. Example: DBCC INDEXDEFRAG (Database_Name, Table_Name, Index_Name)
|
importar no delicious Domínio Grátis! Hospedagem de Páginas Grátis Backup Online Grátis Expositores: Poker RegrasPokercores htmlwebdesign poker de graça importar no delicious Bookmark to:
CID10: a09 b34_9 c18_9 c44_9 c61 c73 f06_8 f19 f20_0 f29 f31_8 f31_9 f32 f32_0 f32_2 f33_1 f40_9 f41_1 f41_9 f42_2 f43_1 f43_2 f60_3 f71_0 f72 f72_8 f84_0 f90_1 i10 j18 m19_0 m25_5 m41_1 m46_9 m47_2 m47_8 m48_0 m50_1 m53_1 m54_1 m54_4 m54_5 m65 m75_1 m75_2 m77_1 m79_0 m79_1 n60_2 n87_1 q90 r42 s60_0 z31_0 z43_1 z43_5 z54_0 CID-10 |