I have a huge database and it takes ages to restore. If
it restores on top of an existing database is it faster
than no database? Is there any mileage in creating a big
blank database before restoring?
TIA,
JBIf the database doesn't exists, then SQL Server basically performs CREATE DA
TABASE, then RESTORE.
For the first part, SQL Server need to initialize the pages.
If the database exists, and have the same file structure as the one you took
backup of (the last
part is very important), then SQL Server can skip the CREATE DATABASE part.
It will just add back
the pages to the same location as they had when you performed the backup. (I
t is allowed for a file
to be bigger than it was when you performed the backup.)
If the database exists, but the file layout isn't the same, you'll get an er
ror from RESTORE. This
is because SQL server does a check first, if the file layout isn't the same,
then SQL Server will
not be able to put back all pages in the same file and page address as they
had when the backup was
performed. In this case, you can use the REPLACE option, which essentially m
eans that SQL Server
executes DROP DATABASE, CREATE DATABASE and then RESTORE.
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
http://www.solidqualitylearning.com/
"JB" <anonymous@.discussions.microsoft.com> wrote in message
news:297601c51359$c7b48200$a401280a@.phx.gbl...
>I have a huge database and it takes ages to restore. If
> it restores on top of an existing database is it faster
> than no database? Is there any mileage in creating a big
> blank database before restoring?
> TIA,
> JB
No comments:
Post a Comment