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 12»»

Backup Job Incomplete Expand / Collapse
Author
Message
Posted Tuesday, May 21, 2013 3:07 PM
Grasshopper

GrasshopperGrasshopperGrasshopperGrasshopperGrasshopperGrasshopperGrasshopperGrasshopper

Group: General Forum Members
Last Login: Monday, August 18, 2014 10:48 AM
Points: 17, Visits: 150
Hi,

I have problem My backup script runs on every sunday for full backup and should have to take 41 database backup but it only takes 22 or 7 databases backup and and it say that it ran successfully. Can please help me
Post #1455230
Posted Wednesday, May 22, 2013 1:39 AM


Valued Member

Valued MemberValued MemberValued MemberValued MemberValued MemberValued MemberValued MemberValued Member

Group: General Forum Members
Last Login: Monday, June 23, 2014 6:49 AM
Points: 62, Visits: 326
can share script? so we can check more details and also check error log.There should all details.
Post #1455341
Posted Wednesday, May 22, 2013 4:29 AM


Old Hand

Old HandOld HandOld HandOld HandOld HandOld HandOld HandOld Hand

Group: General Forum Members
Last Login: Friday, March 21, 2014 9:46 AM
Points: 387, Visits: 1,078
The login that is running the backup script has enough permission for missing databases?
Any of the database are in restoring mode?

Please post your script to analyse.
Post #1455412
Posted Wednesday, May 22, 2013 7:22 AM


SSCertifiable

SSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiable

Group: General Forum Members
Last Login: Today @ 7:34 AM
Points: 7,098, Visits: 12,606
Are you using sp_MSforeachdb by any chance? Please post the script you're using.

__________________________________________________________________________________________________
There are no special teachers of virtue, because virtue is taught by the whole community. --Plato
Post #1455494
Posted Wednesday, May 22, 2013 10:22 AM
Grasshopper

GrasshopperGrasshopperGrasshopperGrasshopperGrasshopperGrasshopperGrasshopperGrasshopper

Group: General Forum Members
Last Login: Monday, August 18, 2014 10:48 AM
Points: 17, Visits: 150
DECLARE @dbname VARCHAR(max),
@fullfilename VARCHAR(max),
@getfullfileq VARCHAR(max),
@fullfilebackupq VARCHAR(max),
@deldate datetime,
@getdate VARCHAR(30),
@gettime VARCHAR(8),
@hh VARCHAR (2),
@mm VARCHAR(2),
@ss VARCHAR(2)


/*This command will get all Producation databases with any recovery model*/
DECLARE getdbname CURSOR FOR
SELECT name FROM sys.databases
Where name in ('test1','test2','test3','test4','test5','test6',test7')
OPEN getdbname
FETCH NEXT FROM getdbname
INTO @dbname
WHILE @@FETCH_STATUS =0
BEGIN
/* Below section will convert current date and time into varchar so we can put as file name*/
SET @getdate= CONVERT(VARCHAR(30), GETDATE(),110)
SET @gettime=CONVERT(VARCHAR(8), GETDATE(),108)
SET @hh = SUBSTRING(@gettime,1,2)
SET @mm = SUBSTRING(@gettime,4,5)
SET @ss = SUBSTRING(@gettime,7,8)

/*Below command will store backup full file query
Make path modification so we can use from any database*/

SET @fullfilebackupq ='BACKUP DATABASE ['+@dbname+']
TO DISK=''E:\Full\'+@dbname+'_full-BACKUP_'+@getdate+'-'+@hh+'-'+@mm+'-'+@ss+'.bak''
WITH
RETAINDAYS = 30,
NOFORMAT,
NOINIT,
NAME ='''+@dbname+'fullbackup'+@getdate+'_'+@gettime+''''

/*Here query executed*/
--print @fullfilebackupq
EXEC( @fullfilebackupq)


FETCH NEXT FROM getdbname
INTO @dbname
END
CLOSE getdbname
DEALLOCATE getdbname
Post #1455602
Posted Wednesday, May 22, 2013 1:01 PM
Grasshopper

GrasshopperGrasshopperGrasshopperGrasshopperGrasshopperGrasshopperGrasshopperGrasshopper

Group: General Forum Members
Last Login: Monday, August 18, 2014 10:48 AM
Points: 17, Visits: 150
I have sysadmin write and I all database is online.
These are prductiong databases
Post #1455655
Posted Wednesday, May 22, 2013 2:14 PM


SSC-Insane

SSC-InsaneSSC-InsaneSSC-InsaneSSC-InsaneSSC-InsaneSSC-InsaneSSC-InsaneSSC-InsaneSSC-InsaneSSC-InsaneSSC-Insane

Group: General Forum Members
Last Login: Today @ 11:33 AM
Points: 23,299, Visits: 32,048
This:

/*This command will get all Producation databases with any recovery model*/
DECLARE getdbname CURSOR FOR
SELECT name FROM sys.databases
Where name in ('test1','test2','test3','test4','test5','test6',test7')

will get you 7 databases: test1','test2','test3','test4','test5','test6',test7'.

If this is a "Sanitized" script it does us no good.



Lynn Pettis

For better assistance in answering your questions, click here
For tips to get better help with Performance Problems, click here
For Running Totals and its variations, click here or when working with partitioned tables
For more about Tally Tables, click here
For more about Cross Tabs and Pivots, click here and here
Managing Transaction Logs

SQL Musings from the Desert Fountain Valley SQL (My Mirror Blog)
Post #1455697
Posted Wednesday, May 22, 2013 2:35 PM
Grasshopper

GrasshopperGrasshopperGrasshopperGrasshopperGrasshopperGrasshopperGrasshopperGrasshopper

Group: General Forum Members
Last Login: Monday, August 18, 2014 10:48 AM
Points: 17, Visits: 150
I means there is name upto 33 databases test1 to test33
Post #1455708
Posted Wednesday, May 22, 2013 2:47 PM


SSCertifiable

SSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiable

Group: General Forum Members
Last Login: Today @ 7:34 AM
Points: 7,098, Visits: 12,606
Are you capturing the output of the job step to a log file or table, the options in job step advanced tab?

__________________________________________________________________________________________________
There are no special teachers of virtue, because virtue is taught by the whole community. --Plato
Post #1455714
Posted Wednesday, May 22, 2013 2:57 PM
Grasshopper

GrasshopperGrasshopperGrasshopperGrasshopperGrasshopperGrasshopperGrasshopperGrasshopper

Group: General Forum Members
Last Login: Monday, August 18, 2014 10:48 AM
Points: 17, Visits: 150
Log file and log file result is below
Executed as user: NT AUTHORITY\NETWORK SERVICE. ...
'test1' on file 1.
[SQLSTATE 01000] (Message 4035) Processed 2 pages for database 'test1', file 'test_log' on file 1.
[SQLSTATE 01000] (Message 4035) BACKUP DATABASE successfully processed 136818 pages in 19.594 seconds (54.551 MB/sec).
[SQLSTATE 01000] (Message 3014) Processed 3150240 pages for database 'test2', file 'test2' on file 1.
[SQLSTATE 01000] (Message 4035) ... The step succeeded.

Post #1455719
« Prev Topic | Next Topic »

Add to briefcase 12»»

Permissions Expand / Collapse