Error when restoring Master database on SQL 2008R2

    General discussion

  • Hi

    I have reinstalled our SQL 2008 server, prior to reinstall i backed up the master database as advised by the vendor of our application

    I am trying to restore the master database now and have started the service in single use mode by putting the -m paramter in and then restarting the service.

    I have stopped all ofther SQL services other than the database engine for our MSSQLSERVER instance

    When i run the command below i get the error. Please could someone tell me where i am going wrong, i have found 2 step by step articles on the internet including the technet site and i have followed them to the letter so cant work out whats happening


    1> RESTORE DATABASE master from disk = `e:\SQL_DB_Backups\master.bak` WITH REPLACE;
    2> GO
    Msg 102, Level 15, State 1, Server SQL01, Line 1
    Incorrect syntax near '`'.
    Msg 319, Level 15, State 1, Server SQL01, Line 1
    Incorrect syntax near the keyword 'with'. If this statement is a common table ex
    pression, an xmlnamespaces clause or a change tracking context clause, the previ
    ous statement must be terminated with a semicolon.

    Friday, February 25, 2011 12:44 PM

All replies

  • I don't think it likes the back-tick characters for quoting a string. Try it with the standard single quote/apostrophe character, i.e. 'e:\SQL_DB_Backups\master.bak'.
    Friday, February 25, 2011 3:57 PM
  • We are running into this same issue, were you able to resolve this?  And if so, how?



    Friday, July 22, 2011 6:35 PM
  • Type the RESTORE DATABASE command, do not copy and paste it in the command console or whatever it is that you're using to connect. For example

    FROM DISK='C:\master.BAK'

    Plus, make sure that you are the only one connecting to the SQL Server instance after starting it in single-user mode. Disable any applications that may try to connect to the instance as you won't be able to get in once the applications do

    Edwin Sarmiento SQL Server MVP
    Blog | Twitter | LinkedIn
    Friday, July 22, 2011 7:16 PM