Click here to monitor SSC
SQLServerCentral is supported by Redgate
 
Log in  ::  Register  ::  Not logged in
 
 
 


SQL Server Express backup failure


SQL Server Express backup failure

Author
Message
jralston88
jralston88
SSC Journeyman
SSC Journeyman (77 reputation)SSC Journeyman (77 reputation)SSC Journeyman (77 reputation)SSC Journeyman (77 reputation)SSC Journeyman (77 reputation)SSC Journeyman (77 reputation)SSC Journeyman (77 reputation)SSC Journeyman (77 reputation)

Group: General Forum Members
Points: 77 Visits: 689
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.
dbalmf
dbalmf
Valued Member
Valued Member (67 reputation)Valued Member (67 reputation)Valued Member (67 reputation)Valued Member (67 reputation)Valued Member (67 reputation)Valued Member (67 reputation)Valued Member (67 reputation)Valued Member (67 reputation)

Group: General Forum Members
Points: 67 Visits: 699
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/
jralston88
jralston88
SSC Journeyman
SSC Journeyman (77 reputation)SSC Journeyman (77 reputation)SSC Journeyman (77 reputation)SSC Journeyman (77 reputation)SSC Journeyman (77 reputation)SSC Journeyman (77 reputation)SSC Journeyman (77 reputation)SSC Journeyman (77 reputation)

Group: General Forum Members
Points: 77 Visits: 689
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?
dbalmf
dbalmf
Valued Member
Valued Member (67 reputation)Valued Member (67 reputation)Valued Member (67 reputation)Valued Member (67 reputation)Valued Member (67 reputation)Valued Member (67 reputation)Valued Member (67 reputation)Valued Member (67 reputation)

Group: General Forum Members
Points: 67 Visits: 699
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/
jralston88
jralston88
SSC Journeyman
SSC Journeyman (77 reputation)SSC Journeyman (77 reputation)SSC Journeyman (77 reputation)SSC Journeyman (77 reputation)SSC Journeyman (77 reputation)SSC Journeyman (77 reputation)SSC Journeyman (77 reputation)SSC Journeyman (77 reputation)

Group: General Forum Members
Points: 77 Visits: 689
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.
dbalmf
dbalmf
Valued Member
Valued Member (67 reputation)Valued Member (67 reputation)Valued Member (67 reputation)Valued Member (67 reputation)Valued Member (67 reputation)Valued Member (67 reputation)Valued Member (67 reputation)Valued Member (67 reputation)

Group: General Forum Members
Points: 67 Visits: 699
Glad it worked..

Sometimes these things are sent to try us.. Smile

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

http://www.sqlservercentral.com/articles/Best+Practices/61537/
steyiven
steyiven
Forum Newbie
Forum Newbie (1 reputation)Forum Newbie (1 reputation)Forum Newbie (1 reputation)Forum Newbie (1 reputation)Forum Newbie (1 reputation)Forum Newbie (1 reputation)Forum Newbie (1 reputation)Forum Newbie (1 reputation)

Group: General Forum Members
Points: 1 Visits: 0
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
Go


Permissions

You can't post new topics.
You can't post topic replies.
You can't post new polls.
You can't post replies to polls.
You can't edit your own topics.
You can't delete your own topics.
You can't edit other topics.
You can't delete other topics.
You can't edit your own posts.
You can't edit other posts.
You can't delete your own posts.
You can't delete other posts.
You can't post events.
You can't edit your own events.
You can't edit other events.
You can't delete your own events.
You can't delete other events.
You can't send private messages.
You can't send emails.
You can read topics.
You can't vote in polls.
You can't upload attachments.
You can download attachments.
You can't post HTML code.
You can't edit HTML code.
You can't post IFCode.
You can't post JavaScript.
You can post emoticons.
You can't post or upload images.

Select a forum

































































































































































SQLServerCentral


Search