Announcement

Collapse
No announcement yet.

SQL 2008 Script Backup

Collapse
X
  • Filter
  • Time
  • Show
Clear All
new posts

  • SQL 2008 Script Backup

    Morning,

    When I run the following command in a DOS window:

    sqlcmd -S .\SQLEXPRESS -E -Q "EXEC sp_BackupDatabases @backupLocation='J:\SQLBackups\', @databaseName=ímasterí, @backupType='F'"

    I get the error:

    Msg 102, Level 15, State 1, Server SERVER\SQLEXPRESS, Line 1
    Incorrect syntax near '''.

    Any idea why this fails?

    Cheers.

  • #2
    Re: SQL 2008 Script Backup

    Found the answer.

    The ' around "master" were of a different type than the rest.

    It's working now that I replaced them.

    Comment

    Working...
    X