You can use the sp_MSforeachtable
undocumented stored procedure to rebuild all indexes in your database. The command iterates through all the tables in a database. It's best to schedule this so it executes only during CPU idle time and at slow production periods:
sp_MSforeachtable @command1="print '?' DBCC DBREINDEX ('?')"