SQL Server Express backup failure

  • I'm attempting to create a new scheduled task to backup a SQL Sever 2008 R2 express database. I have an existing backup with the INIT option running against the database in question, and decided to modify to NOINIT. Rather than overwrite, I elected to create a new one. It will not run.

    I'm getting return code 1 - last run result indicates (0x1). All other tasks (all backing up other databases) are running without issue. Googling has not yielded much.

    Program/script set to"

    "C:\Program Files\Microsoft SQL Server\100\Tools\Binn\SQLCMD.EXE"

    Added arguments:

    -S instance-name -i"D:\user-script\backup_noinit_script.sql"

    backup_noinit_script contents:

    BACKUP DATABASE [Resource] TO DISK = N'D:\SQL_Database_Backup\Resource_noinit.bak' WITH NOFORMAT, NOINIT, NAME = N'Resource-Full Database Backup', SKIP, NOREWIND, NOUNLOAD, STATS = 10 GO

    Following the events, Task Scheduler launches instance of of task (script), the Task Engine receives a message from Task Scheduler to launch the task (script). Task Scheduler starts instance of script. Task Scheduler launches the SQLCMD.EXE in instance of the task (script). Task Scheduler launches the script. The next event indicates the Task Scheduler successfully completed the script / action SQLCMD.EXE with return code 1. Looks like standard event information - however I have no remedy.

    This appears straight forward. Any ideas? Comments / URLs are appreciated - thanks.

  • Hi,

    If you run

    BACKUP DATABASE [Resource] TO DISK = N'D:\SQL_Database_Backup\Resource_noinit.bak'

    from within SSMS does it complete okay?

    ============================================================
    David

    http://www.sqlservercentral.com/articles/Best+Practices/61537/[/url]

  • Ran a query against the database using that script:

    BACKUP DATABASE [Resource] TO DISK = N'D:\SQL_Database_Backup\Resource_noinit.bak'

    It ran successfully, the bak was created. Any ideas?

  • Hi There,

    Does the SQL Log give any more details?

    If you now run the entire backup command from ssms does it complete?

    Which user runs the Job and what permissions does it have?

    ============================================================
    David

    http://www.sqlservercentral.com/articles/Best+Practices/61537/[/url]

  • I created a new task, creating everything from scratch again (script, task arguments, everything). Backup ran successfully. No rhyme or reason as to what happened. Hiccup in my thinking or system. Very frustrating.

    Thank you for responding.

  • Glad it worked..

    Sometimes these things are sent to try us.. 🙂

    ============================================================
    David

    http://www.sqlservercentral.com/articles/Best+Practices/61537/[/url]

  • An error has occurred while setting up a connection to the server when connecting to SQL server 2005, this failure may be caused by the fact that under the default settings SQL server does not allow remote connection.

    windows dedicated server

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

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