-1

I have 10 databases on my SQL Server. We do an Automatic Full Backup every day at 00.00.

The issue is there are two databases out of the 10 that should not be backed up as these databases are currently not required by the management; but I have no idea how to remove these databases from the Automatic Full Backup.

I am not able to find any script or anything related to the backup. The only thing I was able to find is the Full Backup option on the SQL Agent. Also these backups are done by SQL Server. Please help me out in resolving this issue.

When I went to SQL Server Agent> Jobs> Full Backup I found the following:

Screenshot

I am not able to make it out what exactly is this. Are these backups or something else? The files generated by these jobs are consuming my drive space and these jobs are running on daily basis.

  • 1
    As you can see the job is pointing to the "Daily Backup" Maintenance Plan. So in SSMS go to Management -> Maintenance Plans and double click on "Daily Backup". Remove the two databases you dont want to backup and save. Thats it. I will point out that not backing them up is a terrible idea as without a backup you have no way of recovering them. You should flag this to management before removing them from the backup job. – Lawrage May 5 '16 at 6:17
7

Its easy using T-SQL.

I would suggest not to use Maiantenance plan. Instead go with a much flexible and widely adapted TSQL based solution - SQL Server Backup by Ola Hallengren

EXECUTE dbo.DatabaseBackup
@Databases = 'USER_DATABASES, -DB1,DB2', -- All user databases, except Db1, DB2
@Directory = 'C:\Backup',
@BackupType = 'FULL',
@Verify = 'Y',
@Compress = 'Y',
@CheckSum = 'Y',
@CleanupTime = 24
1

I would check the Management > Maintenance Plans folder, in the Object Explorer pane of SSMS.

The other place would be under SQL Server Agent > Jobs, so I'm curious what you meant by, "I was able to find the full backup option on the SQL Agent." If there is a job titled "Full Backup" under the Jobs folder, then that's probably what you're looking for.

1

This seems to me like the opposite of a problem... Regardless of requirements, I just feel better knowing every database is being backed up. Unless these two databases are quite large and can fill up a significant amount of disk space with backups, what negatives are there to backing up those files?

Not the answer you're looking for? Browse other questions tagged or ask your own question.