Showing posts with label entire. Show all posts
Showing posts with label entire. Show all posts

Sunday, February 19, 2012

Backup/Restore Script

am new at this and I am stuck...
I am trying to backup an entire database and restore it on the same SQL
server with a different name.
I have this in the Query Analyzer
BACKUP DATABASE merchant
TO DISK = 'c:\merchant.bak'
RESTORE FILELISTONLY
FROM DISK = 'c:\merchant.bak'
RESTORE DATABASE TestDB
FROM DISK = 'c:\merchant.bak'
WITH MOVE 'merchant' TO 'c:\testdb.mdf',
MOVE 'merchant_log' TO 'c:\testdb.ldf'
GO
I get the following error
Processed 2304 pages for database 'merchant', file 'Struky3_Data' on file
13.
Processed 1 pages for database 'merchant', file 'Struky3_Log' on file 13.
BACKUP DATABASE successfully processed 2305 pages in 2.539 seconds (7.434
MB/sec).
(2 row(s) affected)
Server: Msg 3234, Level 16, State 2, Line 5
Logical file 'merchant' is not part of database 'TestDB'. Use RESTORE
FILELISTONLY to list the logical file names.
Server: Msg 3013, Level 16, State 1, Line 5
RESTORE DATABASE is terminating abnormally.
Can anyone help with this?
I want to copy the entire database called MERCHANT to another databaseWell that because it looks like your Data files logical name is
'Struky3_Data' and the Log files logical name is really 'Struky3_Log'. So
your restore script needs to specify those for the Logical names.
Andrew J. Kelly SQL MVP
"Brian Branco" <bbranco@.bncconsulting.com> wrote in message
news:OTAtoi5HFHA.3376@.TK2MSFTNGP14.phx.gbl...
> am new at this and I am stuck...
> I am trying to backup an entire database and restore it on the same SQL
> server with a different name.
> I have this in the Query Analyzer
> BACKUP DATABASE merchant
> TO DISK = 'c:\merchant.bak'
> RESTORE FILELISTONLY
> FROM DISK = 'c:\merchant.bak'
> RESTORE DATABASE TestDB
> FROM DISK = 'c:\merchant.bak'
> WITH MOVE 'merchant' TO 'c:\testdb.mdf',
> MOVE 'merchant_log' TO 'c:\testdb.ldf'
> GO
> I get the following error
> Processed 2304 pages for database 'merchant', file 'Struky3_Data' on file
> 13.
> Processed 1 pages for database 'merchant', file 'Struky3_Log' on file 13.
> BACKUP DATABASE successfully processed 2305 pages in 2.539 seconds (7.434
> MB/sec).
> (2 row(s) affected)
> Server: Msg 3234, Level 16, State 2, Line 5
> Logical file 'merchant' is not part of database 'TestDB'. Use RESTORE
> FILELISTONLY to list the logical file names.
> Server: Msg 3013, Level 16, State 1, Line 5
> RESTORE DATABASE is terminating abnormally.
>
> Can anyone help with this?
> I want to copy the entire database called MERCHANT to another database
>
>

Monday, February 13, 2012

Backup With Mirror

Hope this is the right thread,

When you backup with Mirror?

Is that concurrent to those devices and if so, what happens if one fails does the entire backup fail?

Cheers,

Casey

A mirrored backup is basically a read once, write multiple. So, the page is grabbed from the database and then N copies are made within your backup locations. They either all succeed or all fail. So, if you have a failure to one location, you will get a failure on the backup.