problem while restoreing database with query

  • hi

    here i am trying to restore the database through query

    while i am restoring the database i executed the below code

    RESTORE database

    WI_ETL_sample FROM DISK = 'C:\sample\WI_ETL_sample.BAK'

    with

    MOVE 'WI_ETL_sample.mdf' TO 'D:\restoreDB_K\WI_ETL_sample.mdf',

    MOVE 'WI_ETL_sample.ldf' TO 'D:\restoreDB_K\WI_ETL_sample.ldf'

    i got error

    Msg 3234, Level 16, State 2, Line 1

    Logical file 'WI_ETL_sample.mdf' is not part of database 'WI_ETL_sample'. Use RESTORE FILELISTONLY to list the logical file names.

    Msg 3013, Level 16, State 1, Line 1

    RESTORE DATABASE is terminating abnormally.

    i tried for the code

    RESTORE database

    WI_ETL_sample FROM DISK = 'C:\sample\WI_ETL_sample.BAK'

    with

    MOVE 'WI_ETL_sample_data' TO 'D:\restoreDB_K\WI_ETL_sample.mdf',

    MOVE 'WI_ETL_sample_log' TO 'D:\restoreDB_K\WI_ETL_sample.ldf'

    Msg 3234, Level 16, State 2, Line 1

    Logical file 'WI_ETL_sample.mdf' is not part of database 'WI_ETL_sample'. Use RESTORE FILELISTONLY to list the logical file names.

    Msg 3013, Level 16, State 1, Line 1

    RESTORE DATABASE is terminating abnormally.

    i got the same

    what is FILELISTONLY exactly

    best regards

    Nagaraj palle

  • Have you looked in Books Online?

    Gail Shaw
    Microsoft Certified Master: SQL Server, MVP, M.Sc (Comp Sci)
    SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability

    We walk in the dark places no others will enter
    We stand on the bridge and no one may pass
  • thanks for reply

    i saw google the keywork FILELISTONLY but i cant find the solutions

    best regards

    Nagaraj palle

  • Before running the RESTORE you can verify the correct logical/physical names of the database files inside the backup file. For this purpose you use RESTORE FILELISTONLY command.

    e.g. RESTORE FILELISTONLY FROM DISK='C:\BACKUPFILE.bak'

    Please refer this to know more about the RESTORE command.

    Pradeep Adiga
    Blog: sqldbadiaries.com
    Twitter: @pradeepadiga

  • Issue resolved

    thanks a lot Adiga ...

  • i got the same problem, you :-Dsolved my problem too. thanks Adiga

Viewing 6 posts - 1 through 5 (of 5 total)

You must be logged in to reply to this topic. Login to reply