July 14, 2009 at 10:01 pm
Hi there
If i restore a .bak file in sql 2005 will it also create all the indexes? or do i need to do something seperate to create all the indexes?
and also if i use sp_spaceused will it show the database size including indexes?
Cheers
July 14, 2009 at 10:57 pm
Creation of index is part of the backup and also part of the restore, so you don’t have to recreate indexes when you restore a database.
When you run sp_spaceused it shows you the space that is used by the indexes and the space that used without indexes (and more data also).
Adi
--------------------------------------------------------------
To know how to ask questions and increase the chances of getting asnwers:
http://www.sqlservercentral.com/articles/Best+Practices/61537/
For better answers on performance questions, click on the following...
http://www.sqlservercentral.com/articles/SQLServerCentral/66909/
July 14, 2009 at 11:21 pm
.bak is like a snapshot of your current database whatever is there in your current database it will restore the same way.
Refer following link for more detail on sp_spaceused:
ms-help://MS.SQLCC.v10/MS.SQLSVR.v10.en/s10de_6tsql/html/c6253b48-29f5-4371-bfcd-3ef404060621.htm
---------------------------------------------------
"Thare are only 10 types of people in the world:
Those who understand binary, and those who don't."
July 16, 2009 at 10:23 am
Absolutely it will. It will restore the tables, data, indexes and all other db objects.
Amol
Amol Naik
Viewing 4 posts - 1 through 3 (of 3 total)
You must be logged in to reply to this topic. Login to reply