Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

SQLServer 2008

Posted on 2011-03-17
5
Medium Priority
?
276 Views
Last Modified: 2012-05-11
Hello, I move a database from a SQL server 2005 to a SQL Server 2008 by doing a backup and restore.
I would like to know if the indexes must be rebuild on the database in the SQL Server 2008 and if so how do I do this.

Thanks
0
Comment
Question by:vera2006
  • 2
  • 2
5 Comments
 
LVL 4

Assisted Solution

by:LeDaouk
LeDaouk earned 800 total points
ID: 35155034
no you don't have to rebuild them
0
 
LVL 4

Assisted Solution

by:LeDaouk
LeDaouk earned 800 total points
ID: 35155044
also you can do it by de-attach database from sql 2005 and re-attach the database in sql 2008 it is fater if you have huge databases. but make bake to be on the safe side
0
 
LVL 4

Assisted Solution

by:qasim_md
qasim_md earned 400 total points
ID: 35155045
In case you want to rebuild indexes anytime the syntax is

dbcc dbreindex(table_name)
0
 
LVL 14

Accepted Solution

by:
Daniel_PL earned 800 total points
ID: 35155049
No, indexes are in the backup. So after restore you'll retain indexes at the same state.
For reindexing you have DBCC DBREINDEX
http://msdn.microsoft.com/en-us/library/ms181671.aspx
0
 
LVL 14

Assisted Solution

by:Daniel_PL
Daniel_PL earned 800 total points
ID: 35155072
If you are interested I can recommend to you great scripts for reindex, statistics update and backup scripts from Ola Hallegren:
http://ola.hallengren.com/

Take care,
Daniel
0

Featured Post

NFR key for Veeam Agent for Linux

Veeam is happy to provide a free NFR license for one year.  It allows for the non‑production use and valid for five workstations and two servers. Veeam Agent for Linux is a simple backup tool for your Linux installations, both on‑premises and in the public cloud.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Long way back, we had to take help from third party tools in order to encrypt and decrypt data.  Gradually Microsoft understood the need for this feature and started to implement it by building functionality into SQL Server. Finally, with SQL 2008, …
Hi all, It is important and often overlooked to understand “Database properties”. Often we see questions about "log files" or "where is the database" and one of the easiest ways to get general information about your database is to use “Database p…
Is your data getting by on basic protection measures? In today’s climate of debilitating malware and ransomware—like WannaCry—that may not be enough. You need to establish more than basics, like a recovery plan that protects both data and endpoints.…
This lesson discusses how to use a Mainform + Subforms in Microsoft Access to find and enter data for payments on orders. The sample data comes from a custom shop that builds and sells movable storage structures that are delivered to your property. …

824 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question