Tuesday, March 20, 2012

restore database

I am having problems with using restoring a database. I am implementing the
application at one site, and the user is running the application at another
site. Originally, I created the database at the user's site. Now they have
a problem. I did a backup of the database, and moved the copy of the backup
to the development system. I am having trouble restoring my 'test'
database with the restore I moved from the other system.
How do you recommned doing this, with details.
Thank you.
Hi
You don't give the actual error message that you are getting which makes
this hard to diagnose! At a guess you need to use the MOVE clause when
recoving the database see the Books online topic "How to restore files to a
new location"
John
"Terry" <cooleyt@.woh.rr.com> wrote in message
news:emoqc.31540$sA.1968@.fe2.columbus.rr.com...
> I am having problems with using restoring a database. I am implementing
the
> application at one site, and the user is running the application at
another
> site. Originally, I created the database at the user's site. Now they
have
> a problem. I did a backup of the database, and moved the copy of the
backup
> to the development system. I am having trouble restoring my 'test'
> database with the restore I moved from the other system.
> How do you recommned doing this, with details.
> Thank you.
>
|||Hi,
You will have problem if you dont have the same directory structure if you
the direct RETORE DATABASE command. In that case you have to use the RESTORE
database with Move option
How to identify the Logical MDF and LDF names which needs to be used with
MOVE option:-
RESTORE FILELISTONLY FROM disk='c:\backup\dbname.bak' (Give the exact path
and file name of the backup file)
This will return you the MDF and LDF file infiormation. Name is the logical
name. Execute the below command:-
RESTORE DATABASE <dbname> from disk='c:\backup\dbname.bak'
with move 'logical_mdf_name' to 'new_physical_name_with path_for_mdf',
move 'logical_ldf_name' to 'new_physical_name_with path_for_ldf', stats=10
Note:
Stats=10 will shhow the restore progress in percentage
Thanks
hari
MCDBA
"Terry" <cooleyt@.woh.rr.com> wrote in message
news:emoqc.31540$sA.1968@.fe2.columbus.rr.com...
> I am having problems with using restoring a database. I am implementing
the
> application at one site, and the user is running the application at
another
> site. Originally, I created the database at the user's site. Now they
have
> a problem. I did a backup of the database, and moved the copy of the
backup
> to the development system. I am having trouble restoring my 'test'
> database with the restore I moved from the other system.
> How do you recommned doing this, with details.
> Thank you.
>

No comments:

Post a Comment