You need to specify the Logical file name instead of the physical name when
Brian Branco wrote:
> The logical file name is: STRUCKY3, the physical name is merchant.
>
> Thanks...
>
>
> "Tom Moreau" <tom@dont.spam.me.cips.ca> wrote in message
> news:O$a7tq5HFHA.3612@TK2MSFTNGP09.phx.gbl...
>> When you ran:
>>
>> RESTORE FILELISTONLY
>> FROM DISK = 'c:\merchant.bak'
>>
>> ... what was the output? Failing that, run:
>>
>> merchant.dbo.sp_helpfile
>>
>> It should list the logical file names, as well as the physical names.
>>
>> --
>> Tom
>>
>> ----------------------------------------------------
>> Thomas A. Moreau, BSc, PhD, MCSE, MCDBA
>> SQL Server MVP
>> Columnist, SQL Server Professional
>> Toronto, ON Canada
>>
www.pinnaclepublishing.com >> .
>> "Brian Branco" <bbranco@bncconsulting.com> wrote in message
>> news:OTr7Uh5HFHA.3072@tk2msftngp13.phx.gbl...
>> I 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