locked
after migration steps.... RRS feed

  • Question

  •  

    I am migrating the SQL Server 2K instance from Windows 2000 server to Windows 2003 Server on a new box.

    After restoring the database is there any tasks to be done to make sure the performance is not compromised.

    For example...  updating the statistics.....

    Likewise are there any tasks that I need to run after the successful migration.

    Thank you,

    Gish

    Thursday, May 22, 2008 9:27 PM

Answers

  • You can run DBCC Checkdb to check the integrity of your database and also you can rebuild the indexes using DBCC Dbreindex command, refer http://msdn.microsoft.com/en-us/library/aa258828(SQL.80).aspx rebuilding the indexes will automatically update the statistics as well.

    - Deepak
    Friday, May 23, 2008 1:11 AM
  • I generally run the following commands after upgrading a database which rebuilds all of the indexes in a database.

     

    Code Snippet

     

    EXECUTE SP_MSFOREACHTABLE 'ALTER INDEX ALL ON ? REBUILD'

    EXECUTE SP_MSFOREACHTABLE 'UPDATE STATISTICS ? WITH FULLSCAN'

     

     

    I do the fullscan stats update just to be sure I didn't get an inappropriate sampling in my stats.
    Friday, May 23, 2008 1:52 PM

All replies

  • You can run DBCC Checkdb to check the integrity of your database and also you can rebuild the indexes using DBCC Dbreindex command, refer http://msdn.microsoft.com/en-us/library/aa258828(SQL.80).aspx rebuilding the indexes will automatically update the statistics as well.

    - Deepak
    Friday, May 23, 2008 1:11 AM
  • I generally run the following commands after upgrading a database which rebuilds all of the indexes in a database.

     

    Code Snippet

     

    EXECUTE SP_MSFOREACHTABLE 'ALTER INDEX ALL ON ? REBUILD'

    EXECUTE SP_MSFOREACHTABLE 'UPDATE STATISTICS ? WITH FULLSCAN'

     

     

    I do the fullscan stats update just to be sure I didn't get an inappropriate sampling in my stats.
    Friday, May 23, 2008 1:52 PM