Solved

simple backup not available in management studio

Posted on 2009-07-07
3
177 Views
Last Modified: 2012-05-07
I have a database that is scheduled to backup once/day.  I would like to reduce the log file size. I tried doing transaction log backups but the trn file created was 37GB. I tried to change the scheduled backup to be a simple recovery model but Management Studio/Maintenance plan/backup only allows me to select Full, Differential or Transactional. We don't need hourly transaction backups on this problem database. A daily backup will suffice. Our most important database is larger and has hourly transaction backups. Here is a comparison of this problem database with our bigger production database.
Problem db file sizes               Production database file sizes
ldf  37                                         1
mdf  4                                         5
bak  3                                         5 (including trn files)    
There aren't a huge number of transactions going on in the problem database.
How can I schedule a simple backup in Management Studio?
0
Comment
Question by:dwiseman3
  • 2
3 Comments
 
LVL 15

Expert Comment

by:mcmonap
ID: 24796507
Hi dwiseman3,
>>>I tried to change the scheduled backup to be a simple recovery model but Management Studio/Maintenance plan/backup only allows me to select Full, Differential or Transactional <<<
It sounds as though you want to change the recovery model of your database as well as your backup method.  If you right click the database select "properties" and the select "options" you can see the recovery model  drop down list.  changing this to simple will mean that your log file autotruncates, this would mean you can no longer do transaction log backups and should help to maintain your log file size (depending on your application)
Once this is done you would need to change your backup maintenance plan to a full backup once per day - you can deselect transaction and differential options if you don't need them.
Do make sure you understand the consequences of changing these option before you proceed and make sure you have a good (tested) backup.  That said everything is pretty risk free if you know what you are doing
0
 

Author Comment

by:dwiseman3
ID: 24796582
I see what you're saying. Will changing the recovery model 'midstream' do any damage?
0
 
LVL 15

Accepted Solution

by:
mcmonap earned 500 total points
ID: 24798518
Nope, that will be fine - essentially all you are losing by moving to a simple recovery model is the facility to recover data to the second which you said is not important.  The database will carry on working as normal.  Assuming the application uses small transactions then you could also look at shrinking the log file to a smaller size to better conserve disk space, the snippet below will do this (it is best to do this straight after the log has been truncated), the code below is straight out of SQL BOL (books on-line).
You want to size the database files so they grow as little as possible, this will minimise file fragmentation on the disk - unless you know the growth rates already it easiest to note this over time.

USE yourDatabase;
GO
-- Truncate the log by changing the database recovery model to SIMPLE.
ALTER DATABASE yourDatabase
SET RECOVERY SIMPLE;
GO
-- Shrink the truncated log file to 1GB.
DBCC SHRINKFILE (yourDatabase_Log, 1024);
GO

Open in new window

0

Featured Post

PRTG Network Monitor: Intuitive Network Monitoring

Network Monitoring is essential to ensure that computer systems and network devices are running. Use PRTG to monitor LANs, servers, websites, applications and devices, bandwidth, virtual environments, remote systems, IoT, and many more. PRTG is easy to set up & use.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

I am showing a way to read/import the excel data in table using SQL server 2005... Suppose there is an Excel file "Book1" at location "C:\temp" with column "First Name" and "Last Name". Now to import this Excel data into the table, we will use…
INTRODUCTION: While tying your database objects into builds and your enterprise source control system takes a third-party product (like Visual Studio Database Edition or Red-Gate's SQL Source Control), you can achieve some protection using a sing…
This tutorial gives a high-level tour of the interface of Marketo (a marketing automation tool to help businesses track and engage prospective customers and drive them to purchase). You will see the main areas including Marketing Activities, Design …
Although Jacob Bernoulli (1654-1705) has been credited as the creator of "Binomial Distribution Table", Gottfried Leibniz (1646-1716) did his dissertation on the subject in 1666; Leibniz you may recall is the co-inventor of "Calculus" and beat Isaac…

803 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question