Quantcast
Channel: Red Gate forums: SQL Backup 7
Viewing all articles
Browse latest Browse all 713

RE: Running a schdule backup automatically

$
0
0
I believe that your requirements can be fulfilled using a combination of SQL backup and editing the SQL Server agent job.

The only thing I am not totally confident in is perfect sychronization of the second backup procedure exactly after the log shrink command. I will do some more research on this.

So, firstly, create a regular, scheduled backup job in the Red gate SQL backup wizard (I'm going to assume you're familiar with this step).

If you have a non-EXPRESS version of SQL Server this will have created a SQL server agent job which you can inspect in SSMS.

Open up the job and look at step 1. You should see the backup job here. Copy the T-SQL and we'll use this in the last step.

The next thins is- Insert a new step that will shrink the log:

DBCC SHRINKFILE (Transact-SQL)

Then create the last step by inserting and copying in the same T-SQL that is in the first step.

Viewing all articles
Browse latest Browse all 713

Trending Articles