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.