Showing posts with label lbtsql. Show all posts
Showing posts with label lbtsql. Show all posts

Wednesday, March 21, 2012

Restoring SQL 2000 database to another SQL Server

I get all sorts of errors using this:
RESTORE DATABASE TMW_LIVE FROM disk
= '\\lbtsql\sqlbackup\backup\tmw_live_db_200307010100.bak'
WITH MOVE 'psmaster52data' TO 'c:\program files\ms sql
server\mssql\data\tmw_live.mdf',
MOVE 'psmaster52log' to 'c:\program files\ms sql
server\mssql\data\tmw_live.ldf',
REPLACE
go
Couple of questions: my database's name is TMW_LIVE and
the logical name is psmaster52data - am I using them in
the correct spot? I get an error saying that the physical
name tmw_live.mdf may be incorrect - that is where I want
to restore to, how can it be incorrect? I've tried it
with a database named this and then deleted it. I also
get an error saying: "File 'psmaster52Data' cannot be
restored to 'c:\program ..." use MOVE instead. I was
using move. All I'm trying to do is to take a backup on
one SQL Server and restore to another (that doesn't have
the same drives), can anyone help me out on this?Larry,
Make sure that there's no files with the same name in that directory where
you're trying to restore the database. This is usually the cause of the
"File 'psmaster52Data' cannot be restored to 'c:\program ...' use MOVE
instead" error.
--
Carlos E. Rojas
SQL Server MVP
Co-Author SQL Server 2000 Programming by Example
"Larry Shulan" <lshulan@.lindencompanies.com> wrote in message
news:060b01c33fdc$d4df12d0$a001280a@.phx.gbl...
> I get all sorts of errors using this:
> RESTORE DATABASE TMW_LIVE FROM disk
> = '\\lbtsql\sqlbackup\backup\tmw_live_db_200307010100.bak'
> WITH MOVE 'psmaster52data' TO 'c:\program files\ms sql
> server\mssql\data\tmw_live.mdf',
> MOVE 'psmaster52log' to 'c:\program files\ms sql
> server\mssql\data\tmw_live.ldf',
> REPLACE
> go
> Couple of questions: my database's name is TMW_LIVE and
> the logical name is psmaster52data - am I using them in
> the correct spot? I get an error saying that the physical
> name tmw_live.mdf may be incorrect - that is where I want
> to restore to, how can it be incorrect? I've tried it
> with a database named this and then deleted it. I also
> get an error saying: "File 'psmaster52Data' cannot be
> restored to 'c:\program ..." use MOVE instead. I was
> using move. All I'm trying to do is to take a backup on
> one SQL Server and restore to another (that doesn't have
> the same drives), can anyone help me out on this?