Click here to monitor SSC
SQLServerCentral is supported by Red Gate Software Ltd.
 
Log in  ::  Register  ::  Not logged in
 
 
 
        
Home       Members    Calendar    Who's On


Add to briefcase

SQL Server Express backup failure Expand / Collapse
Author
Message
Posted Thursday, March 20, 2014 8:23 AM
Valued Member

Valued MemberValued MemberValued MemberValued MemberValued MemberValued MemberValued MemberValued Member

Group: General Forum Members
Last Login: Monday, September 22, 2014 8:50 AM
Points: 66, Visits: 592
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.
Post #1553040
Posted Friday, March 21, 2014 9:54 AM
Valued Member

Valued MemberValued MemberValued MemberValued MemberValued MemberValued MemberValued MemberValued Member

Group: General Forum Members
Last Login: Today @ 4:21 AM
Points: 61, Visits: 556
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/
Post #1553570
Posted Monday, March 24, 2014 6:38 AM
Valued Member

Valued MemberValued MemberValued MemberValued MemberValued MemberValued MemberValued MemberValued Member

Group: General Forum Members
Last Login: Monday, September 22, 2014 8:50 AM
Points: 66, Visits: 592
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?
Post #1554008
Posted Monday, March 24, 2014 7:28 AM
Valued Member

Valued MemberValued MemberValued MemberValued MemberValued MemberValued MemberValued MemberValued Member

Group: General Forum Members
Last Login: Today @ 4:21 AM
Points: 61, Visits: 556
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/
Post #1554023
Posted Monday, March 24, 2014 8:14 AM
Valued Member

Valued MemberValued MemberValued MemberValued MemberValued MemberValued MemberValued MemberValued Member

Group: General Forum Members
Last Login: Monday, September 22, 2014 8:50 AM
Points: 66, Visits: 592
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.
Post #1554041
Posted Monday, March 24, 2014 8:49 AM
Valued Member

Valued MemberValued MemberValued MemberValued MemberValued MemberValued MemberValued MemberValued Member

Group: General Forum Members
Last Login: Today @ 4:21 AM
Points: 61, Visits: 556
Glad it worked..

Sometimes these things are sent to try us.. :)


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

http://www.sqlservercentral.com/articles/Best+Practices/61537/
Post #1554072
Posted Friday, March 28, 2014 2:24 AM
Forum Newbie

Forum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum Newbie

Group: General Forum Members
Last Login: Friday, March 28, 2014 2:21 AM
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
Post #1555799
« Prev Topic | Next Topic »

Add to briefcase

Permissions Expand / Collapse