Friday, May 18, 2012
 

Sentra Support
Minimize




Save as PDF!
Sentra Knowledge Base - Detail
Minimize
Two command line maintenance tasks for SQL 2K/2K5

 


Issue ID : 4171

Priority : Medium

Version : v6.2

These commands could come in handy for smaller databases for demos etc.

They could be set to run as Scheduled Tasks if you are using SQL Express.

The first updates stats for any given database - with a sample of 10%.

You'll need to find the correct path for sqlmaint.exe.

C:\Program Files\Microsoft SQL Server\MSSQL\Binn>sqlmaint -S sql2ktest -D Northwind -UpdOptiStats 10

The second rebuilds all table indexes with 20% free space.

C:\Program Files\Microsoft SQL Server\MSSQL\Binn>sqlmaint -S sql2ktest -D Northwind -RebldIdx 20

The commands are case sensitive - also they use Windows Authentication so will need admin rights.

Alternatively use the -U username -P password switches.

They have been tested on SQL 2K and 2K5.

print






Fast Link >>
Minimize
Sentra Knowledge Base Search
Minimize



 

Follow Insider Technologies Limited Twitter Account TweetsInsider Technologies Limited Spinnaker Court Chandlers Point 37 Broadway Salford Quays Greater Manchester M50 2YR LinkedIn Company GroupJoin the Insider Technologies Limited Group on FacebookHome   |    Markets   |   Solutions   |   Products   |   Services   |   News & Events   |   Support   |   About Us   |   Location   |   Contact Us   |   Site Map   |   LinkedIn
Sentra for LAPS by Logica   |   Thales e-Security Support   |   Sentra for STAR by Software Integrators
   |   RTLX Reactor for BASE24 & eps by ACI Worldwide
RTLX Reactor is a registered trademark of Insider Technologies Limited

Privacy Statement  |  Terms Of Use
Copyright 2012 : Insider Technologies Limited, Manchester. M50 2YR (Near MediaCity UK BBC North ITV)