Page 1 of 2 12 LastLast
Results 1 to 15 of 22
  1. #1
    Join Date
    Nov 2003
    Location
    London
    Posts
    169

    Unanswered: Restore being annoying

    Hi,

    I am trying to restore a database and call it a different name, but it comes up with the following error:

    Executed as user: sa. Invalid object name 'msdb.dbo.restorestatus'. [SQLSTATE 42S02] (Error 208) Logical file '_datafile' is not part of database 'TMG2'. Use RESTORE FILELISTONLY to list the logical file names. [SQLSTATE 42000] (Error 3234) RESTORE DATABASE is terminating abnormally. [SQLSTATE 42000] (Error 3013). The step failed.

    Please help this is doing my head in.

    The database I am trying to restore from is called TMG and I would like to call the new Database TMG2

  2. #2
    Join Date
    May 2003
    Location
    UK
    Posts
    220
    Howdy

    I suspect you have a filename problem - go to the options tab and make sure the filenames for the mdf & ldf files for TMG2 are unique to the server. Alter them if need be just before starting the restore.

    The logical file names dont have to be unique.

    Cheers,

    SG.

  3. #3
    Join Date
    Nov 2003
    Location
    London
    Posts
    169
    Hi,

    TMG2 is not created as a database yet, I want the restore to create the new database.

  4. #4
    Join Date
    Nov 2003
    Location
    London
    Posts
    169
    Hi again,

    This is my code:

    RESTORE FILELISTONLY
    FROM Dumps_TMG_PM


    RESTORE DATABASE TMG2 from Dumps_TMG_PM with RECOVERY,

    MOVE 'TMG_dat.mdf' TO 'D:\Data\TMG2_data.mdf',
    MOVE 'TMG_log.ldf' TO 'E:\TMG2_log.ldf'

  5. #5
    Join Date
    Nov 2002
    Location
    Jersey
    Posts
    10,322
    What does...


    RESTORE FILIELISTONLY FROM DISK = '<pathname><dbname>.bak'

    Give you?

    Check out BOL for more examples?
    Brett
    8-)

    It's a Great Day for America everybody!

    dbforums Yak CorralRadio 'Rita
    dbForums Member List
    I'm Good Once as I ever was

    The physical order of data in a database has no meaning.

  6. #6
    Join Date
    Nov 2003
    Location
    London
    Posts
    169
    Hi,

    It gives me this:

    Executed as user: sa. Invalid object name 'msdb.dbo.restorestatus'. [SQLSTATE 42S02] (Error 208) Logical file 'tmg_dat.mdf' is not part of database 'TMG2'. Use RESTORE FILELISTONLY to list the logical file names. [SQLSTATE 42000] (Error 3234) RESTORE DATABASE is terminating abnormally. [SQLSTATE 42000] (Error 3013). The step failed.

    Same error basically.

  7. #7
    Join Date
    Nov 2002
    Location
    Jersey
    Posts
    10,322
    That's from the restore...did you highlight an execute the command I gave you only?

    If you just execute, it'll do the whole window...you are in QA, correct?

    What did you type exactly?
    Brett
    8-)

    It's a Great Day for America everybody!

    dbforums Yak CorralRadio 'Rita
    dbForums Member List
    I'm Good Once as I ever was

    The physical order of data in a database has no meaning.

  8. #8
    Join Date
    Jul 2003
    Location
    The Dark Planet
    Posts
    1,401
    Brett .. what exactly does this table do ... 'msdb.dbo.restorestatus'... any idea. Is it created on the run time coz my msdb also does not have this object (table or sp or whatever)
    Get yourself a copy of the The Holy Book

    order has no physical Brett in The meaning of a Kaiser . -database data

  9. #9
    Join Date
    Nov 2003
    Location
    London
    Posts
    169
    TMG_dat I:\Data\tmg_data.mdf D PRIMARY 6815744000 35184372080640
    TMG_log k:\TMG_log.LDF L NULL 1867776000 7340032000

    IN QA this is what it gave me.

  10. #10
    Join Date
    Nov 2002
    Location
    Jersey
    Posts
    10,322
    How about:

    Code:
    RESTORE DATABASE TMG2
       FROM DISK = '<database dump path>\TMG.dmp'
       WITH   MOVE 'TMG_Data' TO 'D:\Data\TMG.MDF' 
            , MOVE 'TMG_Log'  TO 'E:\TMG_Log.LDF'
    	, REPLACE
    And I have no idea about that system table...

    and what version of sql are we talking about?
    Brett
    8-)

    It's a Great Day for America everybody!

    dbforums Yak CorralRadio 'Rita
    dbForums Member List
    I'm Good Once as I ever was

    The physical order of data in a database has no meaning.

  11. #11
    Join Date
    Jul 2003
    Location
    The Dark Planet
    Posts
    1,401
    Originally posted by SQLSlammer
    TMG_dat I:\Data\tmg_data.mdf D PRIMARY 6815744000 35184372080640
    TMG_log k:\TMG_log.LDF L NULL 1867776000 7340032000

    IN QA this is what it gave me.
    try this command :

    restore database TMG2 from disk = '<pathname><dbname>.bak'
    with move 'TMG_dat' to ''<pathname>tmg2_data.mdf',
    move 'TMG_log' to ''<pathname>tmg2_log.ldf'
    Get yourself a copy of the The Holy Book

    order has no physical Brett in The meaning of a Kaiser . -database data

  12. #12
    Join Date
    Jul 2003
    Location
    The Dark Planet
    Posts
    1,401
    Originally posted by SQLSlammer
    TMG_dat I:\Data\tmg_data.mdf D PRIMARY 6815744000 35184372080640
    TMG_log k:\TMG_log.LDF L NULL 1867776000 7340032000

    IN QA this is what it gave me.
    try this command :

    restore database TMG2 from disk = '<pathname><dbname>.bak'
    with move 'TMG_dat' to ''<pathname>tmg2_data.mdf',
    move 'TMG_log' to ''<pathname>tmg2_log.ldf'
    Get yourself a copy of the The Holy Book

    order has no physical Brett in The meaning of a Kaiser . -database data

  13. #13
    Join Date
    Nov 2003
    Location
    London
    Posts
    169
    Sorry chaps still gives me the same error, by the way this database does not exist yet.

    There is already a database called TMG on this server, but it is in warm standby mode as it is being log shipped.

  14. #14
    Join Date
    Nov 2002
    Location
    Jersey
    Posts
    10,322
    It doesn't have to exist...

    my bad btw

    Code:
    RESTORE DATABASE TMG2
       FROM DISK = '<database dump path>\TMG.dmp'
       WITH   MOVE 'TMG_Data' TO 'I:\Data\TMG.MDF' 
            , MOVE 'TMG_Log'  TO '\K:\TMG_Log.LDF'
    	, REPLACE
    Cut and paste that...it should work...
    Brett
    8-)

    It's a Great Day for America everybody!

    dbforums Yak CorralRadio 'Rita
    dbForums Member List
    I'm Good Once as I ever was

    The physical order of data in a database has no meaning.

  15. #15
    Join Date
    Nov 2003
    Location
    London
    Posts
    169
    Hi in QA it came up with this:


    Server: Msg 3234, Level 16, State 2, Line 1
    Logical file 'TMG_Data' is not part of database 'TMG2'. Use RESTORE FILELISTONLY to list the logical file names.
    Server: Msg 3013, Level 16, State 1, Line 1
    RESTORE DATABASE is terminating abnormally.



    Same thing..........this is doing my head in!

    Thanks for all your help so far chaps

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •