Step 1:
Detach the database files from SQL Server 2005 and attach to SQL Server 2008 Server
Step 2:
Execute the below command to update the index and table Statistics in the newly attached database
SP_UPDATESTATS
It is recommended to execute update statistics separately for each table with full scan as given below
UPDATE STATISTICS
Step 3:
Execute the below command to rest all the counters DBCC UPDATEUSAGE('
Step 4:
Change the Database Compatibility Level as specified
Go to Database Properties à Options à Compatibility Level to à SQL Server 2008(100)