Odeslat dotazOdeslat dotaz
 

DotazRestore of backuped database fails, if database name include spaces (MAP 5.0)

  • 20. listopadu 2009 10:10tjacobs42 Uživatelské medaileUživatelské medaileUživatelské medaileUživatelské medaileUživatelské medaile
     
    I was not able to restore a database with about the following name "company - laptops". The commandline options of "RestoreCustomerDatabase.cmd" do not allow to use spaces (at least not in combination with minusses) and renaming the backup file does not help as the original name is stored inside the file.

    Also, my backups are named with different ending databasename.bak, not databasename.bkp. Is this a different file, or a change in the ending in the 5.0 version?

    Is it possible to rename the database to make a working backup? I do not want to start from scratch just to be able to make backups of the database.

    Thanks,
    Torsten.

Všechny reakce

  • 20. listopadu 2009 20:35Eric Haberman 1MSFT, ModerátorUživatelské medaileUživatelské medaileUživatelské medaileUživatelské medaileUživatelské medaile
     

    Hi Torsten,

     

    That spaces issue may be a bug in that .cmd file.  I will escalate this issue.

     

    .bak is our new file name, .bkp is our old.  Please let me know where you saw reference to the old and I will submit issue for changes.

     

    If you are running SQL management studio you can use it to rename the database, you will then have to load the database with MAP to insure it gets associated connected to the MAPS instance.

     

    Let me know if this works for you…I’ll work on getting a fix from the space issue.

     

    Thanks,

    Eric

  • 24. listopadu 2009 10:39tjacobs42 Uživatelské medaileUživatelské medaileUživatelské medaileUživatelské medaileUživatelské medaile
     
    This is the original error (translation for below: "-" is syntactically not correct at this point).

    Did I actually mention that I hate non-English error messages ;-)


    -------------------------------------------------------------------
    C:\Programme\Microsoft Assessment and Planning Toolkit\Help\Support Files>Restor
    eCustomerDatabase.cmd "\DBUPGRADEBACKUP\company - Laptops.bak" laptops

    Microsoft Assessment and Planning Toolkit database restore script

    "-" ist syntaktisch an dieser Stelle nicht verarbeitbar.
    -------------------------------------------------------------------

    Now I renamed the bak-file from "company - Laptops.bak" to "Laptops.bak", but this does not solve the problem. seems that parts of the database is created in SQL-Server, but not passed to MAPS. Currently I do not have SQL-Server tools installed, as I only have experience with Oracle...
    (translation for below: The system cannot find the the mentioned path)

    -------------------------------------------------------------------
    C:\Programme\Microsoft Assessment and Planning Toolkit\Help\Support Files>Restor
    eCustomerDatabase.cmd "\DBUPGRADEBACKUP\Laptops.bak" laptops

    Restoring the "laptops" database...
    Msg 5133, Level 16, State 1, Server MKAS109\MAPS, Line 1
    Directory lookup for the file "c:\Program Files\Microsoft SQL
    Server\MSSQL10.MAPS\MSSQL\DATA\company - Laptops.mdf" failed with the operating
    system error 3(Das System kann den angegebenen Pfad nicht finden.).
    Msg 3156, Level 16, State 3, Server MKAS109\MAPS, Line 1
    File 'company - Laptops' cannot be restored to 'c:\Program Files\Microsoft SQL
    Server\MSSQL10.MAPS\MSSQL\DATA\company - Laptops.mdf'. Use WITH MOVE to identify
    a valid location for the file.
    Msg 5133, Level 16, State 1, Server MKAS109\MAPS, Line 1
    Directory lookup for the file "c:\Program Files\Microsoft SQL
    Server\MSSQL10.MAPS\MSSQL\DATA\company - Laptops_log.LDF" failed with the
    operating system error 3(Das System kann den angegebenen Pfad nicht finden.).
    Msg 3156, Level 16, State 3, Server MKAS109\MAPS, Line 1
    File 'company - Laptops_log' cannot be restored to 'c:\Program Files\Microsoft
    SQL Server\MSSQL10.MAPS\MSSQL\DATA\company - Laptops_log.LDF'. Use WITH MOVE to
    identify a valid location for the file.
    Msg 3119, Level 16, State 1, Server MKAS109\MAPS, Line 1
    Problems were identified while planning for the RESTORE statement. Previous
    messages provide details.
    Msg 3013, Level 16, State 1, Server MKAS109\MAPS, Line 1
    RESTORE DATABASE is terminating abnormally.
    -------------------------------------------------------------------
  • 24. listopadu 2009 17:32Jay Sauls [MSFT] Uživatelské medaileUživatelské medaileUživatelské medaileUživatelské medaileUživatelské medaile
     

    The file paths and file names that the databse was originally backed up from are stored in the backup file.  If those paths don't exist on the machine you're trying to restore to, the RestoreCustomerDatabase.cmd batch file can't deal with it.

    If you need to fixup restore paths, you'll need to run the RESTORE DATABASE command directly.  the osql.exe utility gets installed with SQL Express automatically, so you can use OSQL to issue the restore database command without having to install the full SQL Server management suite.