SQL Clone
SQLServerCentral is supported by Redgate
 
Log in  ::  Register  ::  Not logged in
 
 
 


Backup Job Incomplete


Backup Job Incomplete

Author
Message
jignesh.swami82
jignesh.swami82
Grasshopper
Grasshopper (17 reputation)Grasshopper (17 reputation)Grasshopper (17 reputation)Grasshopper (17 reputation)Grasshopper (17 reputation)Grasshopper (17 reputation)Grasshopper (17 reputation)Grasshopper (17 reputation)

Group: General Forum Members
Points: 17 Visits: 172
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
dineshvishe
dineshvishe
SSC-Enthusiastic
SSC-Enthusiastic (184 reputation)SSC-Enthusiastic (184 reputation)SSC-Enthusiastic (184 reputation)SSC-Enthusiastic (184 reputation)SSC-Enthusiastic (184 reputation)SSC-Enthusiastic (184 reputation)SSC-Enthusiastic (184 reputation)SSC-Enthusiastic (184 reputation)

Group: General Forum Members
Points: 184 Visits: 342
can share script? so we can check more details and also check error log.There should all details.
SQL Show
SQL Show
SSChasing Mays
SSChasing Mays (651 reputation)SSChasing Mays (651 reputation)SSChasing Mays (651 reputation)SSChasing Mays (651 reputation)SSChasing Mays (651 reputation)SSChasing Mays (651 reputation)SSChasing Mays (651 reputation)SSChasing Mays (651 reputation)

Group: General Forum Members
Points: 651 Visits: 1078
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.
Orlando Colamatteo
Orlando Colamatteo
SSChampion
SSChampion (14K reputation)SSChampion (14K reputation)SSChampion (14K reputation)SSChampion (14K reputation)SSChampion (14K reputation)SSChampion (14K reputation)SSChampion (14K reputation)SSChampion (14K reputation)

Group: General Forum Members
Points: 14913 Visits: 14396
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
jignesh.swami82
jignesh.swami82
Grasshopper
Grasshopper (17 reputation)Grasshopper (17 reputation)Grasshopper (17 reputation)Grasshopper (17 reputation)Grasshopper (17 reputation)Grasshopper (17 reputation)Grasshopper (17 reputation)Grasshopper (17 reputation)

Group: General Forum Members
Points: 17 Visits: 172
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
jignesh.swami82
jignesh.swami82
Grasshopper
Grasshopper (17 reputation)Grasshopper (17 reputation)Grasshopper (17 reputation)Grasshopper (17 reputation)Grasshopper (17 reputation)Grasshopper (17 reputation)Grasshopper (17 reputation)Grasshopper (17 reputation)

Group: General Forum Members
Points: 17 Visits: 172
I have sysadmin write and I all database is online.
These are prductiong databases
Lynn Pettis
Lynn Pettis
SSC-Dedicated
SSC-Dedicated (39K reputation)SSC-Dedicated (39K reputation)SSC-Dedicated (39K reputation)SSC-Dedicated (39K reputation)SSC-Dedicated (39K reputation)SSC-Dedicated (39K reputation)SSC-Dedicated (39K reputation)SSC-Dedicated (39K reputation)

Group: General Forum Members
Points: 39229 Visits: 38529
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.

Cool
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)
jignesh.swami82
jignesh.swami82
Grasshopper
Grasshopper (17 reputation)Grasshopper (17 reputation)Grasshopper (17 reputation)Grasshopper (17 reputation)Grasshopper (17 reputation)Grasshopper (17 reputation)Grasshopper (17 reputation)Grasshopper (17 reputation)

Group: General Forum Members
Points: 17 Visits: 172
I means there is name upto 33 databases test1 to test33
Orlando Colamatteo
Orlando Colamatteo
SSChampion
SSChampion (14K reputation)SSChampion (14K reputation)SSChampion (14K reputation)SSChampion (14K reputation)SSChampion (14K reputation)SSChampion (14K reputation)SSChampion (14K reputation)SSChampion (14K reputation)

Group: General Forum Members
Points: 14913 Visits: 14396
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
jignesh.swami82
jignesh.swami82
Grasshopper
Grasshopper (17 reputation)Grasshopper (17 reputation)Grasshopper (17 reputation)Grasshopper (17 reputation)Grasshopper (17 reputation)Grasshopper (17 reputation)Grasshopper (17 reputation)Grasshopper (17 reputation)

Group: General Forum Members
Points: 17 Visits: 172
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.
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