Best Practices Analyzer Tool for Microsoft SQL Server 2000 Rule Reference

download Best Practices Analyzer Tool for Microsoft SQL Server 2000 Rule Reference

of 43

Transcript of Best Practices Analyzer Tool for Microsoft SQL Server 2000 Rule Reference

  • 8/13/2019 Best Practices Analyzer Tool for Microsoft SQL Server 2000 Rule Reference

    1/43

    Best Practices Analyzer Tool for Microsoft SQL Server 2000 Rule Reference

    This document describes the rules included in the Best Practices Analyzer !0!

    Rule Categories

    Backup and Recovery

    "atabase Bac#u$s%ailed Bac#u$sMaster and MS"B Bac#u$&'(L') Lo* Bac#u$sRecovery Model +sa*eReuse of Bac#u$ %ile

    Configuration Options

    Affinity Mas#Allo, +$dates -nabled%iber ModeMa. Server MemoryPriority Boost -nabledRecovery /ntervalSet ,or#in* set size disabled

    Database Design

    Tables ,ithout Primary eys or +ni1ue onstraints+ser 'b3ect &amin*

    Database Administration

    Auto reation of Statistics"atabase om$atibility Level"atabase "is# S$ace"atabase %ile om$ression"atabase %ile Placement

    "atabase SQL '$tions/nde. %ra*mentationLo* %ile )ro,th4irtual Lo* %ile ount

    Deprecation

    R-AT- "ATABAS- ,ith %'R L'A""efaults and Rules"e$recated Builtin %unctions&on5Ansi 'uter 6oins

    S-T+S-R usa*eStrin* 7 -.$ression Aliasin*+se of s$(dbo$tion

    Full-Text

  • 8/13/2019 Best Practices Analyzer Tool for Microsoft SQL Server 2000 Rule Reference

    2/43

    "u$licate %ull5Te.t $redicates%ull5Te.t han*e Trac#in* -nabled%ull5Te.t Bac#*round Services '$timized%ull Te.t BL'B -.tension Ty$e%ull Te.t atalo* ount%ull Te.t atalo* Placement%ull Te.t Pro$erty Store SizeMSSearch Service Account

    Timestam$ olumn for %ull5Te.t

    eneral Administration

    A4s and Severe -rrors-rror Lo* Size&+LL 88servername9tem$db9 urrent Size+ne.$ected Shutdo,ns+ser 'b3ects in Master

    eneric

    'b3ect Prefi.es'b3ect Suffi.es

    T-!"#

    ursor %'R +P"AT- column listursor +sa*e-.$licit /nde. reation

    /&S-RT olumn List&ested Tri**ers onfi*uration&''+&T '$tion in Tri**ers&+LL om$arisonsResults in Tri**ersSco$in* of TransactionsS-L-T :S-T '$tionsTem$ Table +sa*eT'P ,ithout 'R"-R B;+se of Schema Qualified Tables

  • 8/13/2019 Best Practices Analyzer Tool for Microsoft SQL Server 2000 Rule Reference

    3/43

    Rule( Affinity )ask

    Category

    onfi*uration '$tions

    Description

    This rule chec#s if P+ affinity is confi*ured in such a ,ay that not all $rocessors are used! /n mostcases the affinity maskconfi*uration o$tion $rovides best $erformance ,hen set to 0 ?thedefault@!

    SQL Server $rocessor affinity is a s$ecialized o$eration it is recommended that SQL Server$rocessor affinity be used only ,hen necessary! /n most cases the default affinity $rovides thebest $erformance!

    *arameters

    &one

    Additional 'nformation

    affinity mas# '$tion ?Administerin* SQL Server ?SQL Server@@

    Rule( Allo+ ,pdates nabled

    Category

    onfi*uration '$tions

    Description

    This rule chec#s that u$dates to the system catalo* are not enabled! The allo+ updateso$tion isused to s$ecify ,hether direct u$dates can be made to system tables!

    By default allo+ updatesis disabled ?set to 0@ so users cannot u$date system tables throu*h adhoc u$dates! +sers can u$date system tables usin* system stored $rocedures only! =hen allo+

    updatesis enabled ?set to @ any user ,ho has a$$ro$riate $ermissions can u$date system tablesdirectly ,ith ad hoc u$dates and can create stored $rocedures that u$date system tables!

    +$datin* fields in system tables can $revent an instance of MicrosoftC SQL ServerD from runnin* orcan cause data loss! )iven that system tables are critical to the o$eration of SQL Server enableallo+ updatesonly in ti*htly controlled situations!

    *arameters

    &one

    Additional 'nformation

    allo, u$dates '$tion ?Administerin* SQL Server ?SQL Server@@

    http://msdn.microsoft.com/library/default.asp?url=/library/en-us/adminsql/ad_config_6rw2.asphttp://msdn.microsoft.com/library/default.asp?url=/library/en-us/adminsql/ad_config_3kxa.asphttp://msdn.microsoft.com/library/default.asp?url=/library/en-us/adminsql/ad_config_6rw2.asphttp://msdn.microsoft.com/library/default.asp?url=/library/en-us/adminsql/ad_config_3kxa.asp
  • 8/13/2019 Best Practices Analyzer Tool for Microsoft SQL Server 2000 Rule Reference

    4/43

    Rule( Auto Creation of !tatistics

    Category

    "atabase Administration

    Description

    This rule chec#s ,hether databases have EAuto reation of StatisticsE and EAuto +$date ofStatisticsE enabled or not!

    Thou*h some cases may benefit from havin* these o$tions off it is *enerally recommended to#ee$ them on!

    This ruleF

    'nly scans databases s$ecified in the "atabase List of a re*istered SQL Server instance! "oes not chec# databases that are not online!

    *arameters

    &one

    Additional 'nformation

    Settin* "atabase '$tions ?reatin* and Maintainin* "atabases ?SQL Server@@

    Statistical /nformation ?reatin* and Maintainin* "atabases ?SQL Server@@

    Rule( A.s and !evere rrors

    Category

    )eneral Administration

    Description

    This rule chec#s the &T -vent lo* fla**in* any Access 4iolations ?A4s@ or Severe -rrors ,ithin thelast G number of days ?H0 days by default@! -rrors ,ith severity bet,een I and 2J are re$orted!

    Severity levels from I throu*h 2J indicate soft,are or hard,are errors! The system administratorshould be informed ,henever $roblems that *enerate errors ,ith severity levels I and hi*heroccur!

    *arameters

    /umber of DaysF an inte*er value re$resentin* the number of days to scan for severeerrors! "efaultF H0 days!

    Additional 'nformation

    -rror Messa*e Severity Levels ?Troubleshootin* ?SQL Server@@

    http://msdn.microsoft.com/library/default.asp?url=/library/en-us/createdb/cm_8_des_03_6ohf.asphttp://msdn.microsoft.com/library/default.asp?url=/library/en-us/createdb/cm_8_des_05_72r9.asphttp://msdn.microsoft.com/library/default.asp?url=/library/en-us/trblsql/tr_errorformats_0tpv.asphttp://msdn.microsoft.com/library/default.asp?url=/library/en-us/createdb/cm_8_des_03_6ohf.asphttp://msdn.microsoft.com/library/default.asp?url=/library/en-us/createdb/cm_8_des_05_72r9.asphttp://msdn.microsoft.com/library/default.asp?url=/library/en-us/trblsql/tr_errorformats_0tpv.asp
  • 8/13/2019 Best Practices Analyzer Tool for Microsoft SQL Server 2000 Rule Reference

    5/43

    Rule( CRAT DATABA! +it0 FOR #OAD

    Category

    "e$recation

    Description

    This rule chec#s stored $rocedures functions vie,s and tri**ers for use of R-AT- "ATABAS-statement s$ecifyin* the %'R L'A" clause!

    %'R L'A" clause has been de$recated and ,ill not be su$$orted in a future release of SQL Server!R-ST'R- statement $rovides o$tion to recreate a database!

    This ruleF

    'nly scans databases s$ecified in the "atabase List of a re*istered SQL Server instance! Scans trace files associated ,ith a re*istered SQL Server instance! "oes not chec# databases that are not online!

    *arameters

    &one

    Additional 'nformation

    R-AT- "ATABAS- statement

    Rule( Cursor FOR ,*DAT column list

    Category

    T5SQL

    Description

    This rule chec#s stored $rocedures functions vie,s and tri**ers for correct s$ecification ofcolumn list on usa*e of %'R +P"AT- clause!

    =hen a cursor is declared ,ith a %'R +P"AT- clause it is recommended to s$ecify a column list!This rule fla*s such missin* column lists! SQL Server can o$timize o$erations based on column listinformation available! A future release may have ti*hter re1uirements on s$ecification ofu$datable columns!

    This ruleF

    'nly scans databases s$ecified in the "atabase List of a re*istered SQL Server instance! Scans trace files associated ,ith a re*istered SQL Server instance!

    http://msdn.microsoft.com/library/en-us/tsqlref/ts_create_1up1.asp?frame=truehttp://msdn.microsoft.com/library/en-us/tsqlref/ts_create_1up1.asp?frame=true
  • 8/13/2019 Best Practices Analyzer Tool for Microsoft SQL Server 2000 Rule Reference

    6/43

    "oes not chec# databases that are not online!

    *arameters

    &one

    Additional 'nformation

    "-LAR- +RS'R statement

    Rule( Cursor ,sage

    Category

    T5SQL

    Description

    This rule chec#s stored $rocedures functions vie,s and tri**ers for correct declaration of cursoru$datability based on a$$arent usa*e!

    This rule re$orts failure ,hen a cursor is declared ,ithout a %'R +P"AT- clause and u$dates aredone throu*h the cursor or ,hen a cursor is declared ,ith a %'R +P"AT- clause and no u$datesoccur throu*h the cursor!

    This ruleF

    'nly scans databases s$ecified in the "atabase List of a re*istered SQL Server instance! Scans trace files associated ,ith a re*istered SQL Server instance! "oes not chec# databases that are not online!

    *arameters

    &one

    Additional 'nformation

    "-LAR- +RS'R statement

    Rule( Database Backups

    Category

    Bac#u$ and Recovery

    Description

    This rule chec#s that each database ?e.ce$t if read5only@ is bac#ed u$ in the last G number of days?H0 days by default@!

    http://msdn.microsoft.com/library/en-us/tsqlref/ts_de-dz_31yq.asp?frame=truehttp://msdn.microsoft.com/library/en-us/tsqlref/ts_de-dz_31yq.asp?frame=truehttp://msdn.microsoft.com/library/en-us/tsqlref/ts_de-dz_31yq.asp?frame=truehttp://msdn.microsoft.com/library/en-us/tsqlref/ts_de-dz_31yq.asp?frame=true
  • 8/13/2019 Best Practices Analyzer Tool for Microsoft SQL Server 2000 Rule Reference

    7/43

    /t is recommended that databases that are not read5only be bac#ed u$ often to minimize loss ofcritical data incase of failure!

    This ruleF

    'nly scans databases s$ecified in the "atabase List of a re*istered SQL Server instance! "oes not chec# databases that are not online!

    *arameters

    /umber of DaysF an inte*er value re$resentin* the number of days to scan for databasebac#u$s! "efaultF H0 days!

    Additional 'nformation

    Bac#in* +$ and Restorin* "atabases ?Administerin* SQL Server ?SQL Server@@

    Rule( Database Compatibility #evel

    Category

    "atabase Administration

    Description

    This rule chec#s that all databases on the server are runnin* under the latest com$atibility mode!

    This ruleF

    'nly scans databases s$ecified in the "atabase List of a re*istered SQL Server instance! "oes not chec# databases that are not online!

    *arameters

    &one

    Additional 'nformation

    s$(dbcm$tlevel ?Transact5SQL Reference ?SQL Server@@

    Rule( Database Disk !pace

    Category

    "atabase Administration

    Description

    This rule chec#s database *ro,th confi*uration and available dis# s$ace! /t chec#s and re$orts ifany database files are ,ithin GK ?default is JK@ of reachin* their ma.imum size ?if s$ecified@!

    http://msdn.microsoft.com/library/default.asp?url=/library/en-us/adminsql/ad_bkprst_9zcj.asphttp://msdn.microsoft.com/library/default.asp?url=/library/en-us/tsqlref/ts_sp_da-di_5c8c.asphttp://msdn.microsoft.com/library/default.asp?url=/library/en-us/adminsql/ad_bkprst_9zcj.asphttp://msdn.microsoft.com/library/default.asp?url=/library/en-us/tsqlref/ts_sp_da-di_5c8c.asp
  • 8/13/2019 Best Practices Analyzer Tool for Microsoft SQL Server 2000 Rule Reference

    8/43

    This ruleF

    'nly scans databases s$ecified in the "atabase List of a re*istered SQL Server instance! "oes not chec# databases that are not online!

    *arameters

    Cutoff *ercentage !i1eF an inte*er value bet,een and re$resentin* the cutoff

    $ercenta*e to use ,hen scannin* database files for bein* ,ithin GK of reachin* theirma.imum size! "efaultF JK!

    Additional 'nformation

    -.$andin* a "atabase ?reatin* and Maintainin* "atabases ?SQL Server@@

    Rule( Database File Compression

    Category

    "atabase Administration

    Description

    This rule chec#s all databases to ensure that data and lo* files are not on a com$ressed volumeand in an &T%S $artition! "atabase or file*rou$s that are read5only are not scanned!

    MicrosoftC SQL ServerD 2000 data and transaction lo* files must not be $laced on com$ressed file

    systems or a remote net,or# drive such as a shared net,or# directory! /t is recommended thatdata and lo* files are $laced in an &T%S $artition!

    This ruleF

    'nly scans databases s$ecified in the "atabase List of a re*istered SQL Server instance! "oes not chec# databases that are not online!

    *arameters

    &one

    Additional 'nformation

    reatin* a "atabase ?reatin* and Maintainin* "atabases ?SQL Server@@

    Rule( Database File *lacement

    Category

    "atabase Administration

    Description

    http://msdn.microsoft.com/library/default.asp?url=/library/en-us/createdb/cm_8_des_03_71d1.asphttp://msdn.microsoft.com/library/default.asp?url=/library/en-us/createdb/cm_8_des_03_47n7.asphttp://msdn.microsoft.com/library/default.asp?url=/library/en-us/createdb/cm_8_des_03_71d1.asphttp://msdn.microsoft.com/library/default.asp?url=/library/en-us/createdb/cm_8_des_03_47n7.asp
  • 8/13/2019 Best Practices Analyzer Tool for Microsoft SQL Server 2000 Rule Reference

    9/43

    This rule chec#s that data and lo* files are not $laced on the same lo*ical drive! This is a *eneralrecommendation that hel$s se$arate /' for data $a*es from lo* o$erations!

    This ruleF

    'nly scans databases s$ecified in the "atabase List of a re*istered SQL Server instance! "oes not chec# databases that are not online!

    *arameters

    &one

    Additional 'nformation

    Rule( Database !"# Options

    Category

    "atabase Administration

    Description

    This rule chec#s that the database SQL '$tions are confi*ured $ro$erly! SQL '$tions control A&S/com$liance o$tions!

    The follo,in* database SQL '$tions should be '&F

    A&S/(&+LLS A&S/(PA""/&) A&S/(=AR&/&)S AR/T>AB'RT '&AT(&+LL(;/-L"S(&+LL Q+'T-"(/"-&T/%/-R

    The follo,in* should be '%%F

    &+M-R/(R'+&"AB'+T

    "atabase SQL '$tions should be confi*ured as recommended to remove de$recated behaviors beA&S/ com$liant and be able to levera*e the full feature set ?inde.ed vie,s and inde.es oncom$uted columns@!

    This ruleF

    'nly scans databases s$ecified in the "atabase List of a re*istered SQL Server instance! "oes not chec# databases that are not online!

    *arameters

    &one

    Additional 'nformation

  • 8/13/2019 Best Practices Analyzer Tool for Microsoft SQL Server 2000 Rule Reference

    10/43

    Settin* "atabase '$tions ?reatin* and Maintainin* "atabases ?SQL Server@@

    Rule( Defaults and Rules

    Category

    "e$recation

    Description

    This rule chec#s stored $rocedures functions vie,s and tri**ers for e.istence of defaults andrules!

    These ob3ects have been de$recated in favor of >- constraints and ,ill not be su$$orted in afuture release of SQL Server!

    This ruleF

    'nly scans databases s$ecified in the "atabase List of a re*istered SQL Server instance! "oes not chec# databases that are not online!

    *arameters

    &one

    Additional 'nformation

    R-AT- "-%A+LT statement

    R-AT- R+L- statement

    Rule( Deprecated Builtin Functions

    Category

    "e$recation

    Description

    This rule chec#s stored $rocedures functions vie,s and tri**ers for use of builtin functions thathave been de$recated from SQL Server!

    A future release of SQL Server ,ill not su$$ort these functionsF

    "ATABAS-PR'P-RT; S+S-R(/" S+S-R(&AM-

    http://msdn.microsoft.com/library/default.asp?url=/library/en-us/createdb/cm_8_des_03_6ohf.asphttp://msdn.microsoft.com/library/en-us/tsqlref/ts_create_3x4k.asp?frame=truehttp://msdn.microsoft.com/library/en-us/tsqlref/ts_create2_1lnp.asp?frame=truehttp://msdn.microsoft.com/library/default.asp?url=/library/en-us/createdb/cm_8_des_03_6ohf.asphttp://msdn.microsoft.com/library/en-us/tsqlref/ts_create_3x4k.asp?frame=truehttp://msdn.microsoft.com/library/en-us/tsqlref/ts_create2_1lnp.asp?frame=true
  • 8/13/2019 Best Practices Analyzer Tool for Microsoft SQL Server 2000 Rule Reference

    11/43

    This ruleF

    'nly scans databases s$ecified in the "atabase List of a re*istered SQL Server instance! Scans trace files associated ,ith a re*istered SQL Server instance! "oes not chec# databases that are not online!

    *arameters

    &one

    Additional 'nformation

    Rule( Duplicate Full-Text *redicates

    Category

    %ull5Te.t

    Description

    This rule chec#s stored $rocedures tri**ers vie,s and functions for use of du$licate full te.t$redicates ?CO/TA'/!or FRT2T@ o$eratin* on the same column in the same 1uery!

    As an e.am$le the follo,in* 1ueryF

    S-L-T col %R'M dbo!tab =>-R- '&TA/&S?ft(col 9merry9@ or '&TA/&S ?ft(col 9christmas9@

    should be re,ritten asF

    S-L-T col %R'M dbo!tab =>-R- '&TA/&S?ft(col 9merry 'R christmas9@

    The former 1uery $erforms t,o se$arate scans of the full5te.t catalo* ,hile the latter does asin*le $ass! Si*nificant $erformance im$rovements can be obtained by consolidatin* full5te.t$redicates!

    &oteF This rule $erforms only syntactic analysis! %or this reason it may re$ort false $ositives byconsiderin* t,o full5te.t $redicates o$eratin* on the same column ,hen the actual case may bethat the $redicates o$erate on t,o different columns from different tables that ha$$en to have

    the same name!

    This ruleF

    'nly scans databases s$ecified in the "atabase List of a re*istered SQL Server instance! Scans trace files associated ,ith a re*istered SQL Server instance! "oes not chec# databases that are not online!

    *arameters

    &one

    Additional 'nformation

    %ull5Te.t Search Recommendations

    http://msdn.microsoft.com/library/default.asp?url=/library/en-us/trblsql/tr_faq_6mer.asphttp://msdn.microsoft.com/library/default.asp?url=/library/en-us/trblsql/tr_faq_6mer.asp
  • 8/13/2019 Best Practices Analyzer Tool for Microsoft SQL Server 2000 Rule Reference

    12/43

    Rule( rror #og !i1e

    Category

    )eneral Administration

    Description

    This rule chec#s if the error lo* size is too bi* i!e! *reater than J00 MB! The error lo* in SQL Server2000 $rovides com$lete information about events in SQL Server! A ne, error lo* is created eachtime an instance of SQL Server is started and can sometimes *et very lar*e! /n such cases it isrecommended that the sp3cycle3errorlogsystem stored $rocedure be used to cycle the error lo*files ,ithout havin* to restart the instance of SQL Server!

    *arameters

    &one

    Additional 'nformation

    s$(cycle(errorlo* ?Transact5SQL Reference ?SQL Server@@

    Rule( xplicit 'ndex Creation

    Category

    TSQL

    Description

    This rule chec#s that creation of inde.es is done ,ith e.$licit s$ecification of inde. ty$e!

    Synta. for creatin* an inde. is as follo,sF

    R-AT- +&/Q+- N L+ST-R-" O &'&L+ST-R-" N /&"-G index_nameN '& tableview 4 column AS O "-S N !!!n N 5

    =/T> inde.(o$tion !!!nN N '&filegroup N

    inde.(o$tion FF 7 PA"(/&"-G O

    %/LL%AT'R 6fillfactor O/)&'R-("+P(-; O"R'P(-G/ST/&) O

    STAT/ST/S(&'R-'MP+T- OS'RT(/&(T-MP"B

    /t is recommended that the L+ST-R-" or &'&L+ST-R-" s$ecifications be used ?as a$$ro$riate@,hen creatin* an inde.!

    This ruleF

    http://msdn.microsoft.com/library/default.asp?url=/library/en-us/tsqlref/ts_sp_ca-cz_5ztz.asphttp://msdn.microsoft.com/library/default.asp?url=/library/en-us/tsqlref/ts_sp_ca-cz_5ztz.asp
  • 8/13/2019 Best Practices Analyzer Tool for Microsoft SQL Server 2000 Rule Reference

    13/43

    'nly scans databases s$ecified in the "atabase List of a re*istered SQL Server instance! Scans trace files associated ,ith a re*istered SQL Server instance! "oes not chec# databases that are not online!

    *arameters

    &one

    Additional 'nformation

    R-AT- /&"-G ?Transact5SQL Reference ?SQL Server@@

    Rule( Failed Backups

    Category

    Bac#u$ and Recovery

    Description

    This rule chec#s the &T -vent Lo* for failed bac#u$ o$erations ,ithin the last G number of days ?H0days by default@!

    %ailed bac#u$s should be investi*ated! There may be increased ris# of losin* critical data incase offailure if bac#u$ information is not available at restore time!

    *arameters

    /umber of DaysF a $ositive inte*er value re$resentin* the number of days to scan for failedbac#u$s! "efaultF H0 days!

    Additional 'nformation

    Bac#in* +$ and Restorin* "atabases ?Administerin* SQL Server ?SQL Server@@

    Rule( Fiber mode

    Category

    onfi*uration '$tions

    Description

    This rule chec#s if Li*ht,ei*ht Poolin* is confi*ured in such a ,ay that fibers are turned on! /nmost cases the lig0t+eig0t poolingconfi*uration o$tion $rovides best $erformance ,hen set to 0?default@!

    SQL Server li*ht,ei*ht $oolin* is a s$ecialized o$eration it is recommended that it is used only,hen strictly necessary! /n most cases default value ?0@ $rovides the best results!

    *arameters

    http://msdn.microsoft.com/library/default.asp?url=/library/en-us/tsqlref/ts_create_64l4.asphttp://msdn.microsoft.com/library/default.asp?url=/library/en-us/adminsql/ad_bkprst_9zcj.asphttp://msdn.microsoft.com/library/default.asp?url=/library/en-us/tsqlref/ts_create_64l4.asphttp://msdn.microsoft.com/library/default.asp?url=/library/en-us/adminsql/ad_bkprst_9zcj.asp
  • 8/13/2019 Best Practices Analyzer Tool for Microsoft SQL Server 2000 Rule Reference

    14/43

    &one

    Additional 'nformation

    Li*ht,ei*ht Poolin* '$tion ?Administerin* SQL Server ?SQL Server@@

    +sin* the li*ht,ei*ht $oolin* '$tion

    Rule( Full-Text Background !ervices Optimi1ed

    Category

    %ull5Te.t

    Description

    This rule chec#s that the server is o$timized for bac#*round a$$lications to facilitate $erformance

    of full5te.t services!

    Processin* time for the full5te.t search service can be im$roved by settin* u$ the server to runfore*round and bac#*round a$$lications ,ith e1ual $riority! SQL Server ,hich runs as abac#*round a$$lication then runs at e1ual $riority to other a$$lications runnin* in the fore*round!

    This rule is a$$licable only for servers ,ith full5te.t enabled for one or more databases!

    *arameters

    &one

    Additional 'nformation

    onfi*urin* Server Tas#in* ?'$timizin* "atabase Performance ?SQL Server@@

    %ull5Te.t Search Recommendations ?Troubleshootin* ?SQL Server@@

    Rule( Full Text B#OB xtension Type

    Category

    %ull5Te.t

    Description

    This rule chec#s that the BL'B e.tension column should not be of ty$e c0aror nc0arfor tables,ith full5te.t enabled on a BL'B column ?i!e! ima*e data ty$e@! /t is recommended that the ty$efor the BL'B e.tension column be varc0aror nvarc0arto facilitate full5te.t search!

    The BL'B e.tension column is the column that contains the document ty$e of the BL'B columnand is s$ecified usin* sp3fulltext3columnsystem stored $rocedure!

    This ruleF

    http://msdn.microsoft.com/library/default.asp?url=/library/en-us/adminsql/ad_config_0r1j.asphttp://msdn.microsoft.com/library/default.asp?url=/library/en-us/architec/8_ar_sa_6jqf.asphttp://msdn.microsoft.com/library/default.asp?url=/library/en-us/optimsql/odp_tun_1a_2syz.asphttp://msdn.microsoft.com/library/default.asp?url=/library/en-us/trblsql/tr_faq_6mer.asphttp://msdn.microsoft.com/library/default.asp?url=/library/en-us/adminsql/ad_config_0r1j.asphttp://msdn.microsoft.com/library/default.asp?url=/library/en-us/architec/8_ar_sa_6jqf.asphttp://msdn.microsoft.com/library/default.asp?url=/library/en-us/optimsql/odp_tun_1a_2syz.asphttp://msdn.microsoft.com/library/default.asp?url=/library/en-us/trblsql/tr_faq_6mer.asp
  • 8/13/2019 Best Practices Analyzer Tool for Microsoft SQL Server 2000 Rule Reference

    15/43

    'nly scans databases s$ecified in the "atabase List of a re*istered SQL Server instance! 'nly scans databases that are full5te.t enabled! "oes not chec# databases that are not online!

    *arameters

    &one

    Additional 'nformation

    Buildin* Search A$$lications for the =eb +sin* Microsoft SQL Server 2000 %ull5Te.t Search

    s$(fullte.t(column ?Transact5SQL Reference ?SQL Server@@

    Rule( Full Text Catalog Count

    Category

    %ull5Te.t

    Description

    This rule chec#s if the server instance has more than 20 catalo*s and ,arns user that there are toomany catalo*s! %or o$timal full5te.t $erformance it is recommended that the catalo* count be#e$t lo,! A ma.imum of 2J full5te.t catalo*s can be created on each server!

    This ruleF

    'nly scans databases s$ecified in the "atabase List of a re*istered SQL Server instance! 'nly scans databases that are full5te.t enabled! "oes not chec# databases that are not online!

    *arameters

    &one

    Additional 'nformation

    %ull5Te.t /nde.es ?reatin* and Maintainin* "atabases ?SQL Server@@

    %ull5Te.t Search Recommendations ?Troubleshootin* ?SQL Server@@

    Rule( Full Text Catalog *lacement

    Category

    %ull5Te.t

    Description

    http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dnsql2k/html/sql_fulltextsearch.asphttp://msdn.microsoft.com/library/default.asp?url=/library/en-us/tsqlref/ts_sp_fa-fz_8sz2.asphttp://msdn.microsoft.com/library/default.asp?url=/library/en-us/createdb/cm_fullad_3bs2.asphttp://msdn.microsoft.com/library/default.asp?url=/library/en-us/trblsql/tr_faq_6mer.asphttp://msdn.microsoft.com/library/default.asp?url=/library/en-us/dnsql2k/html/sql_fulltextsearch.asphttp://msdn.microsoft.com/library/default.asp?url=/library/en-us/tsqlref/ts_sp_fa-fz_8sz2.asphttp://msdn.microsoft.com/library/default.asp?url=/library/en-us/createdb/cm_fullad_3bs2.asphttp://msdn.microsoft.com/library/default.asp?url=/library/en-us/trblsql/tr_faq_6mer.asp
  • 8/13/2019 Best Practices Analyzer Tool for Microsoft SQL Server 2000 Rule Reference

    16/43

    This rule chec#s that full5te.t catalo*s are not $laced on the same drive as the data! As a best$ractice %ull5Te.t catalo*s should be created on their o,n $hysical drive ?or drives@ if $ossible!)iven the $rocess of buildin* a %ull5Te.t inde. is relatively /

  • 8/13/2019 Best Practices Analyzer Tool for Microsoft SQL Server 2000 Rule Reference

    17/43

    Description

    This rule chec#s that the $ro$erty store files ?:!$s and :!$s2@ for MS Search are not lar*er than2JMB! Performance can be im$roved by increasin* the ma.imum size of the $ro$erty store incases ,here files have e.ceeded the confi*ured limit!

    This ruleF

    'nly scans databases s$ecified in the "atabase List of a re*istered SQL Server instance! "oes not chec# databases that are not online!

    *arameters

    &one

    Additional 'nformation

    %ull5Te.t Search "e$loyment

    Rule( 'ndex Fragmentation

    Category

    "atabase Administration

    Description

    This rule chec#s ,hether inde. fra*mentation is too hi*h ?over a s$ecified $ercenta*e default is20K@ for inde.es ,ith more than 0000 $a*es ?default value@!

    As Microsoft SQL Server 2000 maintains inde.es to reflect u$dates to their underlyin* tables theseinde.es can become fra*mented! "e$endin* on ,or#load characteristics this fra*mentation canadversely affect ,or#load $erformance! "e$endin* on de$loyment environment defra*mentationof inde.es can benefit ,or#load $erformance!

    This ruleF

    'nly scans databases s$ecified in the "atabase List of a re*istered SQL Server instance! "oes not chec# databases that are not online!

    *arameters

    /umber of *agesF an inte*er indicatin* the minimum number of $a*es that an inde. musthave to be included in the scan! "efaultF 0000 $a*es!

    )ax FragmentationF a number bet,een 0 and 00 indicatin* the ma.imum acce$tablefra*mentation $ercenta*e for an inde.! "efaultF 20!

    Additional 'nformation

    Microsoft SQL Server 2000 /nde. "efra*mentation Best Practices

    "B S>'='&T/) Statement

    http://support.microsoft.com/default.aspx?scid=/support/sql/content/2000papers/fts_white%20paper.asphttp://www.microsoft.com/technet/treeview/default.asp?url=/technet/prodtechnol/sql/maintain/Optimize/SS2KIDBP.asphttp://msdn.microsoft.com/library/default.asp?url=/library/en-us/tsqlref/ts_dbcc_46cn.asphttp://support.microsoft.com/default.aspx?scid=/support/sql/content/2000papers/fts_white%20paper.asphttp://www.microsoft.com/technet/treeview/default.asp?url=/technet/prodtechnol/sql/maintain/Optimize/SS2KIDBP.asphttp://msdn.microsoft.com/library/default.asp?url=/library/en-us/tsqlref/ts_dbcc_46cn.asp
  • 8/13/2019 Best Practices Analyzer Tool for Microsoft SQL Server 2000 Rule Reference

    18/43

    "B /&"-G"-%RA) Statement

    Rule( '/!RT Column #ist

    Category

    T5SQL

    Description

    This rule chec#s ob3ects for use of /&S-RT statements ,ithout e.$licit s$ecification of tar*etcolumn list!

    =hen insertin* into a table or vie, it is recommended that the tar*et column_listbe e.$licitlys$ecified! This results in more maintainable code!

    This ruleF

    'nly scans databases s$ecified in the "atabase List of a re*istered SQL Server instance! Scans trace files associated ,ith a re*istered SQL Server instance! "oes not chec# databases that are not online!

    *arameters

    &one

    Additional 'nformation

    /&S-RT ?Transact5SQL Reference ?SQL Server@@

    Rule( 'nvalid ,ser Tables

    Category

    SQL Server 200J Readiness

    Description

    This rule chec#s that user tables ?.ty$e79+9@ named dbo!sys$ro$erties and dbo!sysfullte.tnotify donot e.ist in s$ecified databases!

    SQL Server 200J has chan*ed the ,ay that these system tables are used! /n order to avoid dataloss u$*rade of a database containin* either of these invalid user tables ,ill be aborted! Systemtables ?.ty$e79S9@ of the same name ,ill not cause any $roblems! /f a database contains either ofthese user tables they should be renamed or removed $rior to u$*radin*!

    This ruleF

    'nly scans databases s$ecified in the "atabase List of a re*istered SQL Server instance! "oes not chec# databases that are not online!

    *arameters

    http://msdn.microsoft.com/library/default.asp?url=/library/en-us/tsqlref/ts_dbcc_30o9.asphttp://msdn.microsoft.com/library/default.asp?url=/library/en-us/tsqlref/ts_ia-iz_5cl0.asphttp://msdn.microsoft.com/library/default.asp?url=/library/en-us/tsqlref/ts_dbcc_30o9.asphttp://msdn.microsoft.com/library/default.asp?url=/library/en-us/tsqlref/ts_ia-iz_5cl0.asp
  • 8/13/2019 Best Practices Analyzer Tool for Microsoft SQL Server 2000 Rule Reference

    19/43

    &one

    Additional 'nformation

    Rule( #og File ro+t0

    Category

    "atabase Administration

    Description

    This rule chec#s to see ,hether *ro,th $olicy for lo* file is ade1uate! An ade1uate *ro,th $olicy,ill reduce the number of lo* file *ro,th o$erations minimizin* the number of virtual lo* filescreated! /t is recommended that lo* file *ro,th be set as a $ercenta*e or accordin* to thefollo,in* limitsF

    =hen lo* file is confi*ured for fi.ed *ro,th it should be set to *ro, by at least JK of the currentsize of the file or a UMB increment!

    This ruleF

    'nly scans databases s$ecified in the "atabase List of a re*istered SQL Server instance! "oes not chec# databases that are not online!

    *arameters

    &one

    Additional 'nformation

    Physical "atabase %iles and %ile*rou$s ?SQL Server Architecture ?SQL Server@@

    Rule( )aster and )!DB Backup

    Category

    Bac#u$ and Recovery

    Description

    This rule chec#s that the Master and MS"B databases have been bac#ed u$ in the last G number ofdays ?H0 days by default@! The Master and MS"B databases contain critical system information andshould be bac#ed u$ often!

    *arameters

    /umber of DaysF an inte*er value re$resentin* the number of days to scan for databasebac#u$s! "efaultF H0 days!

    Additional 'nformation

    http://msdn.microsoft.com/library/default.asp?url=/library/en-us/architec/8_ar_da2_9sab.asphttp://msdn.microsoft.com/library/default.asp?url=/library/en-us/architec/8_ar_da2_9sab.asp
  • 8/13/2019 Best Practices Analyzer Tool for Microsoft SQL Server 2000 Rule Reference

    20/43

    System "atabases and "ata ?SQL Server Architecture ?SQL Server@@

    Bac#in* +$ and Restorin* "atabases ?Administerin* SQL Server ?SQL Server@@

    Rule( )ax !erver )emory

    Category

    onfi*uration '$tions

    Description

    This rule chec#s that the max server memoryo$tion has been set to default ?2UIUVHUI MB@unlessF

    A7 is enabledF /nstances of SQL Server 2000 do not dynamically mana*e the size of theaddress s$ace ,hen A=- memory is enabled! SQL Server ,ill reserve and loc# almost all

    available memory ?or the value of max server memoryif the o$tion has been set@ ,hen theserver is started!

    Full-Text !earc0 is enabledF /f full5te.t search is enabled confi*ure the SQL Server maxserver memoryo$tion such that there is sufficient virtual memory left to satisfy this %ull5Te.t Search memory re1uirement!

    &oteF There may still be other cases ,here settin* ma. server memory may be re1uired such as,hen there are multi$le instances of SQL Server or the server is hostin* other a$$lications!

    *arameters

    &one

    Additional 'nformation

    Server Memory '$tions ?Administerin* SQL Server ?SQL Server@@

    Mana*in* A=- Memory ?Administerin* SQL Server ?SQL Server@@

    -ffects of min and ma. server memory ?SQL Server Architecture ?SQL Server@@

    Rule( )!!earc0 !ervice Account

    Category

    %ull5Te.t

    Description

    This rule chec#s that the MSSearch service is runnin* as Local System!

    This rule is a$$licable only for servers ,ith full5te.t enabled for one or more databases!

    *arameters

    http://msdn.microsoft.com/library/default.asp?url=/library/en-us/architec/8_ar_da2_1lcx.asphttp://msdn.microsoft.com/library/default.asp?url=/library/en-us/adminsql/ad_bkprst_9zcj.asphttp://msdn.microsoft.com/library/default.asp?url=/library/en-us/adminsql/ad_config_9zfy.asphttp://msdn.microsoft.com/library/default.asp?url=/library/en-us/adminsql/ad_1_server_1fnd.asphttp://msdn.microsoft.com/library/default.asp?url=/library/en-us/architec/8_ar_sa_40vt.asphttp://msdn.microsoft.com/library/default.asp?url=/library/en-us/architec/8_ar_da2_1lcx.asphttp://msdn.microsoft.com/library/default.asp?url=/library/en-us/adminsql/ad_bkprst_9zcj.asphttp://msdn.microsoft.com/library/default.asp?url=/library/en-us/adminsql/ad_config_9zfy.asphttp://msdn.microsoft.com/library/default.asp?url=/library/en-us/adminsql/ad_1_server_1fnd.asphttp://msdn.microsoft.com/library/default.asp?url=/library/en-us/architec/8_ar_sa_40vt.asp
  • 8/13/2019 Best Practices Analyzer Tool for Microsoft SQL Server 2000 Rule Reference

    21/43

    &one

    Additional 'nformation

    Rule( /ested Triggers Configuration

    Category

    TSQL

    Description

    This rule chec#s for tri**ers that may not be firin* due to 9nested tri**ers9 confi*uration o$tionsettin*!

    =hen 9nested tri**ers9 confi*uration o$tion is set to 0 any A%T-R tri**er defined on tables

  • 8/13/2019 Best Practices Analyzer Tool for Microsoft SQL Server 2000 Rule Reference

    22/43

    BA+P o$erations ,ith &'(L') are discoura*ed!

    *arameters

    /umber of DaysF a $ositive inte*er value re$resentin* the number of days to scan forbac#u$s ,ith &'(L')! "efaultF H0 "ays!

    Additional 'nformation

    Truncatin* the Transaction Lo* ?SQL Server Architecture ?SQL Server@@

    Rule( /OCO,/T Option in Triggers

    Category

    TSQL

    Description

    This rule scans tri**ers to ensure they S-T &''+&T to '& at the be*innin*!

    SQL Server sends 9done9 to#en information for each statement that com$letes e.ecution! -.trato#ens may cause une.$ected results in a$$lication code e.ecutin* o$erations that caused thetri**er to fire! /t is *eneral *ood desi*n to have &''+&T set to '& ,ithin a tri**er!

    This ruleF

    'nly scans databases s$ecified in the "atabase List of a re*istered SQL Server instance! "oes not chec# databases that are not online!

    *arameters

    &one

    Additional 'nformation

    Rule( /on-A/!' Outer 8oinsCategory

    "e$recation

    Description

    This rule chec#s for the use of non5A&S/ outer 3oins! ?:7 and 7: synta.@

    6oins are s$ecified in the %R'M clause in "-L-T- S-L-T and +P"AT- statements! Synta. is asfollo,sF

    %R'M table(source 9!!!nN N

    http://msdn.microsoft.com/library/default.asp?url=/library/en-us/architec/8_ar_da2_7vaf.asphttp://msdn.microsoft.com/library/default.asp?url=/library/en-us/architec/8_ar_da2_7vaf.asp
  • 8/13/2019 Best Practices Analyzer Tool for Microsoft SQL Server 2000 Rule Reference

    23/43

    table(source FF7table_name AS N table_alias N =/T> 4 table(hint 9!!!nN 5 NO view_name AS N table_aliasN =/T> 4 vie,(hint 9!!!nN 5NO rowset_function AS N table_aliasNO user_defined_function AS N table_aliasN

    O derived_table AS N table_alias ? column_alias 9!!!nN @ NO 3oined(table

    3oined(table FF7 table(source 3oin(ty$e table(source '& search(condition O table(source R'SS 6'/& table(source O ? N 3oined(table @ N

    3oin(ty$e FF7 /&&-R O L-%T O R/)>T O %+LL '+T-RN N

    3oin(hint N6'/&

    /t is recommended that outer 3oins use the A&S/ s$ecified synta. for e.am$leF

    S-L-T : %R'M tab L-%T '+T-R 6'/& tab2 '& tab!cH 7 tab2!cH R/)>T '+T-R 6'/& tabH L-%T '+T-R 6'/& tabU '& tabH!c 7 tabU!c '& tab2!cH 7 tabU!cH

    This ruleF

    'nly scans databases s$ecified in the "atabase List of a re*istered SQL Server instance!

    Scans trace files associated ,ith a re*istered SQL Server instance! "oes not chec# databases that are not online!

    *arameters

    &one

    Additional 'nformation

    %R'M ?Transact5SQL Reference ?SQL Server@@

    Rule( /,## ::servername

    Category

    )eneral Administration

    Description

    This rule chec#s that ::!R.R/A)does not return &+LL! /n some cases 88S-R4-R&AM-becomes &+LL and can cause $roblems!

    *arameters

    http://msdn.microsoft.com/library/default.asp?url=/library/en-us/tsqlref/ts_fa-fz_4ox9.asphttp://msdn.microsoft.com/library/default.asp?url=/library/en-us/tsqlref/ts_fa-fz_4ox9.asp
  • 8/13/2019 Best Practices Analyzer Tool for Microsoft SQL Server 2000 Rule Reference

    24/43

    &one

    Additional 'nformation

    88S-R4-R&AM- ?Transact5SQL Reference ?SQL Server@@

    Rule( /,## ComparisonsCategory

    TSQL

    Description

    This rule scans stored $rocedures vie,s functions and tri**ers to fla* use of e1uality andine1uality com$arisons involvin* a &+LL constant! These com$arisons are undefined ,henA&S/(&+LLS o$tion is set to '&!

    /t is recommended to set A&S/(&+LLS to '& and use the /S #ey,ord to com$are a*ainst &+LLconstants!

    This ruleF

    'nly scans databases s$ecified in the "atabase List of a re*istered SQL Server instance! Scans trace files associated ,ith a re*istered SQL Server instance! "oes not chec# databases that are not online!

    *arameters

    &one

    Additional 'nformation

    &ull om$arison Search onditions

    Rule( Ob;ect *refixes

    Category

    )eneric

    Description

    This rule chec#s that all ob3ects of ty$eXare $refi.ed ,ith strin* Yon a s$ecified list ofdatabases! The rule re$orts all ob3ects of ty$eXin the s$ecified databases that do nothave the$refi. Yin their names!

    This rule is a *eneric rule to create best $ractices a$$licable to individual $roduction environmentsand enforce custom *uidelines!

    This ruleF

    http://msdn.microsoft.com/library/default.asp?url=/library/en-us/tsqlref/ts_globals_64v9.asphttp://msdn.microsoft.com/library/en-us/acdata/ac_8_qd_06_7xir.asp?frame=truehttp://msdn.microsoft.com/library/default.asp?url=/library/en-us/tsqlref/ts_globals_64v9.asphttp://msdn.microsoft.com/library/en-us/acdata/ac_8_qd_06_7xir.asp?frame=true
  • 8/13/2019 Best Practices Analyzer Tool for Microsoft SQL Server 2000 Rule Reference

    25/43

    'nly scans databases s$ecified in the "atabase List of a re*istered SQL Server instance! "oes not chec# databases that are not online!

    *arameters

    Ob;ect Type to !can 4mandatory5F A strin* re$resentin* an ob3ect ty$e to scan! +se anyone of the follo,in* ob3ect ty$esF

    C7 >- constraintD7 "efault or "-%A+LT constraintF7 %'R-/)& -; constraintF/7 Scalar function'F7 /nlined table5function#7 Lo**7 Stored $rocedure*

  • 8/13/2019 Best Practices Analyzer Tool for Microsoft SQL Server 2000 Rule Reference

    26/43

    "oes not chec# databases that are not online!

    *arameters

    Ob;ect Type to !can 4mandatory5F A strin* re$resentin* an ob3ect ty$e to scan! +se anyone of the follo,in* ob3ect ty$esF

    C7 >- constraint

    D7 "efault or "-%A+LT constraintF7 %'R-/)& -; constraintF/7 Scalar function'F7 /nlined table5function

  • 8/13/2019 Best Practices Analyzer Tool for Microsoft SQL Server 2000 Rule Reference

    27/43

    "B T-GTALL' "B +&P/&TABL-

    This ruleF

    'nly scans databases s$ecified in the "atabase List of a re*istered SQL Server instance! Scans trace files associated ,ith a re*istered SQL Server instance! "oes not chec# databases that are not online!

    *arameters

    &one

    Additional 'nformation

    Rule( Obsolete sp3configure Commands

    Category

    SQL Server 200J Readiness

    Description

    This rule chec#s for the use of s$(confi*ure commands that have been de$recated from SQLServer!

    A future release of SQL Server ,ill not su$$ort these s$(confi*ure commandsF

    s$(confi*ure 9allo, u$dates9 s$(confi*ure 9o$en ob3ects9 s$(confi*ure 9set ,or#in* set size9

    This ruleF

    'nly scans databases s$ecified in the "atabase List of a re*istered SQL Server instance! Scans trace files associated ,ith a re*istered SQL Server instance! "oes not chec# databases that are not online!

    *arameters

    &one

    Additional 'nformation

    Rule( Obsolete !tored *rocedures

    Category

    SQL Server 200J Readiness

    Description

  • 8/13/2019 Best Practices Analyzer Tool for Microsoft SQL Server 2000 Rule Reference

    28/43

    This rule chec#s for the use of stored $rocedures that are obsolete in SQL Server 200J!

    A future release of SQL Server ,ill not su$$ort these stored $roceduresF

    s$(articlesynctran$rocs s$(dis#default s$(hel$lo* s$(hel$s1l

    s$(scri$tdynamicu$d$roc

    This ruleF

    'nly scans databases s$ecified in the "atabase List of a re*istered SQL Server instance! Scans trace files associated ,ith a re*istered SQL Server instance! "oes not chec# databases that are not online!

    *arameters

    &one

    Additional 'nformation

    Rule( Obsolete !ystem Tables

    Category

    SQL Server 200J Readiness

    Description

    This rule chec#s for the use of system tables that have been de$recated from SQL Server!

    A future release of SQL Server ,ill not su$$ort these system tablesF

    sysloc#s sys$ro$erties sys.lo*ins

    This ruleF

    'nly scans databases s$ecified in the "atabase List of a re*istered SQL Server instance! Scans trace files associated ,ith a re*istered SQL Server instance! "oes not chec# databases that are not online!

    *arameters

    &one

    Additional 'nformation

    Rule( ORDR B= +it0 constants

  • 8/13/2019 Best Practices Analyzer Tool for Microsoft SQL Server 2000 Rule Reference

    29/43

    Category

    SQL Server 200J Readiness

    Description

    This rule chec#s stored $rocedures functions vie,s and tri**ers for use of 'R"-R B; clauses$ecifyin* constants as sort columns! /nte*ers are not re$orted! Su$$ort for this synta. has been

    de$recated and ,ill not be su$$orted in SQL Server 200J under 0 com$atibility level!

    As an e.am$le the follo,in* synta. is not recommendedF

    S-L-T au(id %R'M dbo!authors 'R"-R B; 9a9 null

    This ruleF

    'nly scans databases s$ecified in the "atabase List of a re*istered SQL Server instance! Scans trace files associated ,ith a re*istered SQL Server instance!

    "oes not chec# databases that are not online!

    *arameters

    &one

    Additional 'nformation

    Rule( *riority Boost nabled

    Category

    onfi*uration '$tions

    Description

    This rule chec#s that the priority boosto$tion is not enabled!

    The priority boosto$tion is used to s$ecify ,hether MicrosoftC SQL ServerD should run at a hi*herschedulin* $riority than other $rocesses on the same com$uter!

    /t is recommended that priority boosto$tion is not enabled! priority boostshould be used only ona com$uter dedicated to SQL Server and ,ith a symmetric multi$rocessor ?SMP@ confi*uration!

    *arameters

    &one

    Additional 'nformation

    $riority boost '$tion ?Administerin* SQL Server ?SQL Server@@

    Rule( Recovery 'nterval

    http://msdn.microsoft.com/library/default.asp?url=/library/en-us/adminsql/ad_config_5uwe.asphttp://msdn.microsoft.com/library/default.asp?url=/library/en-us/adminsql/ad_config_5uwe.asp
  • 8/13/2019 Best Practices Analyzer Tool for Microsoft SQL Server 2000 Rule Reference

    30/43

    Category

    onfi*uration '$tions

    Description

    This rule chec#s to see if recovery interval is set too hi*h! Too hi*h a recovery interval can lead tolon* server startu$ times! Recovery interval of 0 or is acce$table!

    The recovery intervalo$tion is used to set the ma.imum number of minutes $er database thatMicrosoftC SQL ServerD needs to recover databases! This confi*uration o$tion sets an u$$er limiton the time it should ta#e to recover each database! The default is 0 indicatin* automaticconfi*uration by SQL Server!

    /t is recommended that recovery interval is set to 0 ?self5confi*urin*@ unless fre1uent chec#$ointsare noticeably im$airin* $erformance! /n such a case increase the value of recovery interval insmall increments!

    *arameters

    &one

    Additional 'nformation

    recovery interval '$tion ?Administerin* SQL Server ?SQL Server@@

    Rule( Recovery )odel ,sage

    Category

    Bac#u$ and Recovery

    Description

    This rule chec#s each database and ,arns if recovery mode is full or bul#5lo**ed and thetransaction lo* has not been bac#ed u$ ,ithin the last G number of days ?default is H0@!

    /t is recommended that the transaction lo* for databases usin* full or bul#5lo**ed recovery modelsshould be bac#ed u$ to minimize critical data loss incase of any system or server failures!

    This ruleF

    'nly scans databases s$ecified in the "atabase List of a re*istered SQL Server instance! "oes not chec# databases that are not online! "oes not chec# read5only databases!

    *arameters

    /umber of DaysF a $ositive inte*er value re$resentin* the number of days to scan for lo*bac#u$s! "efaultF H0 "ays!

    Additional 'nformation

    http://msdn.microsoft.com/library/default.asp?url=/library/en-us/adminsql/ad_config_70ry.asphttp://msdn.microsoft.com/library/default.asp?url=/library/en-us/adminsql/ad_config_70ry.asp
  • 8/13/2019 Best Practices Analyzer Tool for Microsoft SQL Server 2000 Rule Reference

    31/43

    Bac#in* +$ and Restorin* "atabases ?Administerin* SQL Server ?SQL Server@@

    +sin* Recovery Models ?Administerin* SQL Server ?SQL Server@@

    Selectin* a Recovery Model ?Administerin* SQL Server ?SQL Server@@

    Rule( Results in TriggersCategory

    TSQL

    Description

    This rule scans tri**ers to ensure they do not send data bac# to the caller!

    A$$lications that modify tables or vie,s ,ith tri**ers do not necessarily e.$ect results to be

    returned as $art of the modification o$eration! %or this reason it is not recommended to returnresults from ,ithin tri**ers! This rule fla*s as not recommended the use of the follo,in*statements ,ithin a tri**erF

    PR/&T statement S-L-T ?,ithout assi*nment or /&T' clause@ %-T> ?,ithout assi*nment@

    This ruleF

    'nly scans databases s$ecified in the "atabase List of a re*istered SQL Server instance! "oes not chec# databases that are not online!

    *arameters

    &one

    Additional 'nformation

    Rule( Reuse of Backup FileCategory

    Bac#u$ and Recovery

    Description

    This rule chec#s ,hether the last three bac#u$ o$erations on a database have been $erformed tothe same file s$ecifyin* that e.istin* media should be over,ritten ?/&/T@! /f so ,arns that theremay be $otential ris# of data loss if bac#u$ files are not bein* co$ied bet,een bac#u$s!

    This ruleF

    'nly scans databases s$ecified in the "atabase List of a re*istered SQL Server instance! "oes not chec# databases that are not online!

    http://msdn.microsoft.com/library/default.asp?url=/library/en-us/adminsql/ad_bkprst_9zcj.asphttp://msdn.microsoft.com/library/default.asp?url=/library/en-us/adminsql/ad_bkprst_6rqr.asphttp://msdn.microsoft.com/library/default.asp?url=/library/en-us/adminsql/ad_bkprst_4l83.asphttp://msdn.microsoft.com/library/default.asp?url=/library/en-us/adminsql/ad_bkprst_9zcj.asphttp://msdn.microsoft.com/library/default.asp?url=/library/en-us/adminsql/ad_bkprst_6rqr.asphttp://msdn.microsoft.com/library/default.asp?url=/library/en-us/adminsql/ad_bkprst_4l83.asp
  • 8/13/2019 Best Practices Analyzer Tool for Microsoft SQL Server 2000 Rule Reference

    32/43

    'nly re$orts non com$liance on bac#u$ o$erations $erformed to dis# files!

    *arameters

    &one

    Additional 'nformation

    Bac#in* +$ and Restorin* "atabases ?Administerin* SQL Server ?SQL Server@@

    Rule( !coping of Transactions

    Category

    T5SQL

    Description

    This rule chec#s stored $rocedures and tri**ers for a$$ro$riate sco$in* of transactions! /t is*enerally recommended to have transactions start and end ,ithin the same T5SQL frame!

    As an e.am$le if a stored $rocedure does some ,or# and then calls 'MM/T TRA& callers of such$rocedure need to be intimate to the transaction semantics of the $rocedure! A caller una,are ofthe contract may *et s$urious error or incorrect isolation semantics!

    This ruleF

    'nly scans databases s$ecified in the "atabase List of a re*istered SQL Server instance! "oes not chec# databases that are not online!

    *arameters

    &one

    Additional 'nformation

    Rule( !#CT >Category

    T5SQL

    Description

    This rule chec#s stored $rocedures functions vie,s and tri**ers for use of ?>?in column lists ofS-L-T statements! Thou*h use of 9:9 is convenient it may lead to less maintainable a$$lications!

    han*es to table or vie, definitions may cause errors or chan*es in $erformance!

    As an e.am$le the follo,in* synta. is not recommendedF

    S-L-T : %R'M dbo!authors

    http://msdn.microsoft.com/library/default.asp?url=/library/en-us/adminsql/ad_bkprst_9zcj.asphttp://msdn.microsoft.com/library/default.asp?url=/library/en-us/adminsql/ad_bkprst_9zcj.asp
  • 8/13/2019 Best Practices Analyzer Tool for Microsoft SQL Server 2000 Rule Reference

    33/43

    /t is recommended to have an e.$licit list ,henever the column to retrieve are #no,n to thea$$lication!

    S-L-T a!au(id a!au(lname %R'M dbo!authors a

    This ruleF

    'nly scans databases s$ecified in the "atabase List of a re*istered SQL Server instance! Scans trace files associated ,ith a re*istered SQL Server instance! "oes not chec# databases that are not online! "oes not scan usa*e of 9:9 in sub1ueries! ?e!*! -G/STS clause@ "oes not scan usa*e of 9:9 in a**re*ate functions '+&T?:@ '+&T(B/)?:@! "oes not scan usa*e of 9:9 in B/&AR;(>-S+M intrinsic function!

    &oteF BPA does not detect usa*e of 9:9 inside inline table5valued functions ho,ever it is still adiscoura*ed use of 9:9!

    *arameters

    &one

    Additional 'nformation

    Rule( !T Options

    Category

    T5SQL

    Description

    This rule chec#s stored $rocedures and tri**ers for use of S-T statements settin* the follo,in* seto$tionsF

    The follo,in* o$tions are recommended to be '&F

    A&S/(&+LLS A&S/(PA""/&) A&S/(=AR&/&)S AR/T>AB'RT '&AT(&+LL(;/-L"S(&+LL Q+'T-"(/"-&T/%/-R

    The follo,in* is recommended to be '%%F

    &+M-R/(R'+&"AB'+T

    A S-T statement that sets one of the above o$tions to a not recommended value is fla**ed by thisrule!

    This ruleF

  • 8/13/2019 Best Practices Analyzer Tool for Microsoft SQL Server 2000 Rule Reference

    34/43

    'nly scans databases s$ecified in the "atabase List of a re*istered SQL Server instance! Scans trace files associated ,ith a re*istered SQL Server instance! "oes not chec# databases that are not online! "oes not re$ort settin* of Q+'T-"(/"-&T/%/-R ,ithin a stored $rocedure since such a

    command is i*nored by SQL Server ,hen e.ecutin* the stored $rocedure!

    *arameters

    &one

    Additional 'nformation

    Rule( !et +orking set si1e Disabled

    Category

    onfi*uration '$tions

    Description

    This rule chec#s that the set +orking set si1eo$tion is not enabled if SQL Server is allo,ed to usememory dynamically!

    The set +orking set si1eo$tion is used to reserve $hysical memory s$ace for MicrosoftC SQLServerD that is e1ual to the server memory settin*! The server memory settin* is confi*uredautomatically by SQL Server based on ,or#load and available resources! /t ,ill vary dynamicallybet,een min server memoryand max server memory! Settin* set +orking set si1e$revents the

    o$eratin* system from s,a$$in* out SQL Server $a*es thou*h they could be used by another$rocess ,hen SQL Server is idle!

    /t is recommended that the set +orking set si1eis not set if SQL Server is confi*ured to usememory dynamically!

    *arameters

    &one

    Additional 'nformation

    set ,or#in* set size '$tion ?Administerin* SQL Server ?SQL Server@@

    Server Memory '$tions ?Administerin* SQL Server ?SQL Server@@

    Rule( !T,!R usage

    Category

    "e$recation

    Description

    http://msdn.microsoft.com/library/default.asp?url=/library/en-us/adminsql/ad_config_4lda.asphttp://msdn.microsoft.com/library/default.asp?url=/library/en-us/adminsql/ad_config_9zfy.asphttp://msdn.microsoft.com/library/default.asp?url=/library/en-us/adminsql/ad_config_4lda.asphttp://msdn.microsoft.com/library/default.asp?url=/library/en-us/adminsql/ad_config_9zfy.asp
  • 8/13/2019 Best Practices Analyzer Tool for Microsoft SQL Server 2000 Rule Reference

    35/43

    This rule chec#s stored $rocedures functions vie,s and tri**ers for use of S-T+S-R statement! /n*eneral S-T+S-R is not recommended! Su$$ort for this statement has been de$recated and ,illnot be su$$orted in a future release of SQL Server!

    This ruleF

    'nly scans databases s$ecified in the "atabase List of a re*istered SQL Server instance! Scans trace files associated ,ith a re*istered SQL Server instance! "oes not chec# databases that are not online!

    *arameters

    &one

    Additional 'nformation

    S-T+S-R statement

    Rule( !tring 6 xpression Aliasing

    Category

    "e$recation

    Description

    This rule chec#s stored $rocedures functions vie,s and tri**ers for use of column aliasin* ,herethe name of the e.$ression uses a strin* value! /t is recommended to use 1uoted identifiersinstead! Strin* aliases ,ill not be su$$orted in a future release of SQL Server!

    As an e.am$le the follo,in* synta. is not recommendedF

    S-L-T 9alias(for(col97au(idWau(id %R'M dbo!authors

    Recommended alternatives areF

    S-L-T au(idWau(id as Ealias(for(colE %R'M dbo!authors

    S-L-T au(idWau(id as alias(for(col %R'M dbo!authors

    S-L-T au(idWau(id as alias(for(colN %R'M dbo!authors

    This ruleF

    'nly scans databases s$ecified in the "atabase List of a re*istered SQL Server instance! Scans trace files associated ,ith a re*istered SQL Server instance! "oes not chec# databases that are not online!

    *arameters

    http://msdn.microsoft.com/library/default.asp?url=/library/en-us/tsqlref/ts_setu-sus_4l6a.asphttp://msdn.microsoft.com/library/default.asp?url=/library/en-us/tsqlref/ts_setu-sus_4l6a.asp
  • 8/13/2019 Best Practices Analyzer Tool for Microsoft SQL Server 2000 Rule Reference

    36/43

    &one

    Additional 'nformation

    Rule( ?!ys? ,ser !c0ema

    Category

    SQL Server 200J Readiness

    Description

    This rule chec#s that a schema called 9sys9 has not been defined!

    SQL Server 200J has rearchitected its system catalo* to be better or*anized and to e.$osemetadata information in a consistent ,ay ,ithout forcin* users to see and understandim$lementation details of the catalo* itself! As $art of this effort all system ob3ects have been

    moved to a ne,ly reserved 9sys9 schema! As such e.istin* databases ,ith 9sys9 schema defined inthem ,ill not be able to u$*rade to SQL Server 200J ,ithout first renamin* such schema!

    This ruleF

    'nly scans databases s$ecified in the "atabase List of a re*istered SQL Server instance! "oes not chec# databases that are not online!

    *arameters

    &one

    Additional 'nformation

    Rule( Tables +it0out *rimary

  • 8/13/2019 Best Practices Analyzer Tool for Microsoft SQL Server 2000 Rule Reference

    37/43

    Additional 'nformation

    PR/MAR; -; onstraints ?reatin* and Maintainin* "atabases ?SQL Server@@

    reatin* and Modifyin* PR/MAR; -; onstraints ?reatin* and Maintainin* "atabases ?SQL Server@@

    Rule( Temp Table ,sageCategory

    T5SQL

    Description

    This rule chec#s stored $rocedures and tri**ers for usa*es of tem$orary tables that may bere$laced by use of table variables!

    This rule ,ill re$ort $rocedures ,here a tem$orary table is created no R-AT- /&"-G is issued onit and it is dro$$ed all in the same $rocedure! These cases may consider usin* table variablesinstead and $otentially observe fe,er recom$ilations!

    &ote that if lar*e data volumes ,ill be inserted in the tem$orary table it may still be $referred touse tem$orary tables due to $arallel e.ecution restrictions and statistics maintenance!

    This ruleF

    'nly scans databases s$ecified in the "atabase List of a re*istered SQL Server instance!

    Scans trace files associated ,ith a re*istered SQL Server instance! "oes not chec# databases that are not online!

    *arameters

    &one

    Additional 'nformation

    %re1uently As#ed Questions 5 SQL Server 2000 5 Table 4ariables

    Rule( ?tempdb? Current !i1e

    Category

    )eneral Administration

    Description

    This rule chec#s that 9tem$db9 is not currently si*nificantly ?0. times by default@ lar*er than theset default size!

    /f 9tem$db9 is usually si*nificantly lar*er than the default size then the default size should beincreased so that 9tem$db9 doesn9t have to *ro, at runtime every time the server is restarted!

    http://msdn.microsoft.com/library/default.asp?url=/library/en-us/createdb/cm_8_des_04_888k.asphttp://msdn.microsoft.com/library/default.asp?url=/library/en-us/createdb/cm_8_des_04_0wab.asphttp://support.microsoft.com/default.aspx?scid=kb;en-us;305977http://msdn.microsoft.com/library/default.asp?url=/library/en-us/createdb/cm_8_des_04_888k.asphttp://msdn.microsoft.com/library/default.asp?url=/library/en-us/createdb/cm_8_des_04_0wab.asphttp://support.microsoft.com/default.aspx?scid=kb;en-us;305977
  • 8/13/2019 Best Practices Analyzer Tool for Microsoft SQL Server 2000 Rule Reference

    38/43

    *arameters

    Acceptable !i1e RatioF an inte*er value re$resentin* the acce$table ratio of current toori*inal size that should be chec#ed! "efaultF 0!

    Additional 'nformation

    Rule( Timestamp Column for Full-Text

    Category

    %ull5Te.t

    Description

    This rule chec#s that each full5te.t inde.ed table should have a timestam$ column to allo, forincremental $o$ulation!

    /ncremental $o$ulation only ad3usts inde. entries for ro,s added deleted or modified after thelast $o$ulation! This feature re1uires that the inde.ed table have a column of the timestam$ dataty$e! Re1uests for incremental $o$ulations on tables ,ithout timestam$ columns result in a full$o$ulation o$eration!

    This ruleF

    'nly scans databases s$ecified in the "atabase List of a re*istered SQL Server instance! "oes not chec# databases that are not online!

    *arameters

    &one

    Additional 'nformation

    %ull5Te.t /nde.in* Su$$ort ?SQL Server Architecture ?SQL Server@@

    Rule( TO* +it0out ORDR B=Category

    T5SQL

    Description

    This rule chec#s stored $rocedures functions vie,s and tri**ers for usa*es of T'P in 1ueries,ithout an 'R"-R B; clause!

    This rule ,ill re$ort use of 1ueries ,here the T'P clause is s$ecified ,ithout an 'R"-R B; clausein the 1uery! /t is *enerally recommended to s$ecify sort criteria ,hen usin* T'P clause!'ther,ise the results $roduced ,ill be $lan de$endent and may lead to undesired behavior!

    http://msdn.microsoft.com/library/default.asp?url=/library/en-us/architec/8_ar_sa2_5dro.asphttp://msdn.microsoft.com/library/default.asp?url=/library/en-us/architec/8_ar_sa2_5dro.asp
  • 8/13/2019 Best Practices Analyzer Tool for Microsoft SQL Server 2000 Rule Reference

    39/43

    This ruleF

    'nly scans databases s$ecified in the "atabase List of a re*istered SQL Server instance! Scans trace files associated ,ith a re*istered SQL Server instance! "oes not chec# databases that are not online!

    *arameters

    &one

    Additional 'nformation

    Limitin* Result Sets +sin* T'P and P-R-&T

    Rule( ,nexpected !0utdo+ns

    Category

    )eneral Administration

    Description

    This rule chec#s the &T -vent Lo* and fla*s any une.$ected shutdo,ns that mi*ht have occurred,ithin the last G number of days ?H0 days by default@!

    A $ossible une.$ected shutdo,n is re$orted if a server start indicated by the follo,in* messa*eF

    I2F SQL Server is startin* at $riority class!!!

    is not $receded by a valid server sto$ messa*eF

    IUVF SQL Server is terminatin* due to 9sto$9 re1uest from Service ontrol Mana*er!

    IUIF SQL Server terminatin* because of system shutdo,n!

    *arameters

    /umber of DaysF an inte*er value re$resentin* the number of days to scan for une.$ectedshutdo,ns! "efaultF H0 "ays!

    Additional 'nformation

    Rule( ,se of !c0ema "ualified Tables.ie+s

    Category

    T5SQL

    Description

    http://msdn.microsoft.com/library/default.asp?url=/library/en-us/acdata/ac_8_qd_04_13ec.asphttp://msdn.microsoft.com/library/default.asp?url=/library/en-us/acdata/ac_8_qd_04_13ec.asp
  • 8/13/2019 Best Practices Analyzer Tool for Microsoft SQL Server 2000 Rule Reference

    40/43

    This rule chec#s stored $rocedures functions vie,s and tri**ers for use of schema 1ualified names,hen referencin* tables and vie,s!

    +nless s$ecified other,ise all Transact5SQL references to the name of a database ob3ect can be afour5$art name in the formF

    server_name!database_nameN!schema_nameN!

    O database_name!schema_nameN! O schema_name! N N

    =hen referencin* a s$ecific ob3ect it is not re1uired to s$ecify the server database and o,ner?schema@ for SQL Server to identify the ob3ect! >o,ever it is recommended that schema name bes$ecified to identify a table or vie, inside a stored $rocedure function vie, or tri**er!

    =hen SQL Server loo#s u$ a table

  • 8/13/2019 Best Practices Analyzer Tool for Microsoft SQL Server 2000 Rule Reference

    41/43

    This rule chec#s stored $rocedures functions vie,s and tri**ers for use of s$(dbo$tion $rocedure!

    This stored $rocedure has been de$recated in favor of ALT-R "ATABAS- statement and ,ill not besu$$orted in a future release of SQL Server!

    This ruleF

    'nly scans databases s$ecified in the "atabase List of a re*istered SQL Server instance! Scans trace files associated ,ith a re*istered SQL Server instance! "oes not chec# databases that are not online!

    *arameters

    &one

    Additional 'nformation

    s$(dbo$tion ?Transact5SQL Reference ?SQL Server@@

    Rule( ,ser Ob;ect /aming

    Category

    "atabase "esi*n

    Description

    This rule chec#s for user ob3ects ,ith any of the follo,in* $refi.esF sp3 xp3 or fn3! Thou*h this$ractice is su$$orted it is recommended that the $refi.es not be used to avoid name clashes ,ithMicrosoft shi$$ed ob3ectsF

    sp3F this $refi. should not be used for user defined stored $rocedures xp3F this $refi. should not be used for user defined e.tended stored $rocedures fn3F this $refi. should not be used for user defined scalar functions

    This ruleF

    'nly scans databases s$ecified in the "atabase List of a re*istered SQL Server instance inaddition to 9master9 database!

    "oes not chec# databases that are not online!

    *arameters

    &one

    Additional 'nformation

    System "atabases and "ata ?SQL Server Architecture ?SQL Server@@

    Rule( ,ser Ob;ects in )aster

    http://msdn.microsoft.com/library/en-us/tsqlref/ts_sp_da-di_8c32.asp?frame=truehttp://msdn.microsoft.com/library/default.asp?url=/library/en-us/architec/8_ar_da2_1lcx.asphttp://msdn.microsoft.com/library/en-us/tsqlref/ts_sp_da-di_8c32.asp?frame=truehttp://msdn.microsoft.com/library/default.asp?url=/library/en-us/architec/8_ar_da2_1lcx.asp
  • 8/13/2019 Best Practices Analyzer Tool for Microsoft SQL Server 2000 Rule Reference

    42/43

    Category

    )eneral Administration

    Description

    This rule chec#s to see if there are any user ob3ects in masterdatabase! The masterdatabase isreserved for SQL Server internal use and it is recommended that user ob3ects not be created in

    master database!

    This rule does not re$ort e.tended stored $rocedures or startu$ $rocedures *iven that master isthe only database ,here they can be created!

    *arameters

    &one

    Additional 'nformation

    Rule( .irtual #og File Count

    Category

    "atabase Administration

    Description

    This rule chec#s to see if there are too many virtual lo* files for each database on the server!

    -ach transaction lo* file is divided lo*ically into smaller se*ments called virtual lo* files! 4irtuallo* files are the unit of truncation for the transaction lo*! Too many virtual lo* files can slo, do,nbac#u$

  • 8/13/2019 Best Practices Analyzer Tool for Microsoft SQL Server 2000 Rule Reference

    43/43

    Category

    SQL Server 200J Readiness

    Description

    This rule chec#s stored $rocedures tri**ers vie,s and functions for use of table hints ,ithout the7'T#ey,ord!

    /t is recommended that hints be s$ecified usin* the 7'T#ey,ord!

    SQL Server 200J ,ill not su$$ort the use of more than one hints in a T5SQL statement unless the7'T#ey,ord is s$ecified!

    As an e.am$le the follo,in* synta. is not su$$orted in SQL Server 200JF

    S-L-T au(id %R'M dbo!authors ?+P"L' PA)L'@

    The recommended a$$roach is to useF

    S-L-T au(id %R'M dbo!authors 7'T?+P"L' PA)L'@

    Queries s$ecifyin* a sin*le hint ,ill ,or# in SQL Server 200J thou*h it is still recommended to usethe =/T> #ey,ord!

    This ruleF

    'nly scans databases s$ecified in the "atabase List of a re*istered SQL Server instance! Scans trace files associated ,ith a re*istered SQL Server instance!

    "oes not chec# databases that are not online!

    *arameters

    &one

    Additional 'nformation

    >ints ?Accessin* and han*in* Relational "ata ?SQL Server@@

    o$yri*ht Y 200U Microsoft or$oration! All ri*hts reserved!

    http://msdn.microsoft.com/library/default.asp?url=/library/en-us/acdata/ac_8_qd_03_8upf.asphttp://msdn.microsoft.com/library/default.asp?url=/library/en-us/acdata/ac_8_qd_03_8upf.asp