469,889 Members | 1,241 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,889 developers. It's quick & easy.

database optimization

Hi
We use Sql 2000.
When defining a database maintenance plan one of the options is to
optimize the database, reorganize data and index pages, remove unused
pages etc.
Is there a command to do this manualy (or in a job) and not by usung a
DBM plan ?
Dec 31 '07 #1
3 1787
"David Greenberg" <da*****@iba.org.ilwrote in message
news:fl**********@news2.netvision.net.il...
Hi
We use Sql 2000.
When defining a database maintenance plan one of the options is to
optimize the database, reorganize data and index pages, remove unused
pages etc.
Is there a command to do this manualy (or in a job) and not by usung a DBM
plan ?
Yes. ALL of the features of Maintenance Plans are T-SQL commands.

http://msdn2.microsoft.com/en-us/lib...8(SQL.80).aspx

--
David Portas
Dec 31 '07 #2
David Portas wrote:
"David Greenberg" <da*****@iba.org.ilwrote in message
news:fl**********@news2.netvision.net.il...
>>Hi
We use Sql 2000.
When defining a database maintenance plan one of the options is to
optimize the database, reorganize data and index pages, remove unused
pages etc.
Is there a command to do this manualy (or in a job) and not by usung a DBM
plan ?


Yes. ALL of the features of Maintenance Plans are T-SQL commands.

http://msdn2.microsoft.com/en-us/lib...8(SQL.80).aspx
Thanks for the link. Problem is that the "dbcc reindex" works on a
single table , meaning that I have to write a command per table and have
to remember to add a new line for new tables when I add them.
Isn't there a single command that will take care of the whole database
in one go ?
Jan 1 '08 #3
Check SQL Books Online and search DBCC SHOWCONTIG - there is a script in
there which is useful and deals
with all the tables

--

Jack Vamvas
___________________________________
Search IT jobs from multiple sources- http://www.ITjobfeed.com


"David Greenberg" <da*****@iba.org.ilwrote in message
news:fl**********@news2.netvision.net.il...
Hi
We use Sql 2000.
When defining a database maintenance plan one of the options is to
optimize the database, reorganize data and index pages, remove unused
pages etc.
Is there a command to do this manualy (or in a job) and not by usung a DBM
plan ?

Jan 11 '08 #4

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

9 posts views Thread by Rune | last post: by
19 posts views Thread by nospammmer | last post: by
5 posts views Thread by wkaras | last post: by
2 posts views Thread by webcm123 | last post: by
30 posts views Thread by Neil | last post: by
20 posts views Thread by Ravikiran | last post: by
reply views Thread by Salome Sato | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.