473,407 Members | 2,598 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,407 software developers and data experts.

How do I back-up > truncate > shrink > back-up SQL 2000

Hello,

I am hoping you can help me with the following problem; I need to process the following steps every couple of hours in order to keep our Sql 2000 database a small as possible (the transaction log is 5x bigger than the db).

1.back-up the entire database
2.truncate the log
3.shrink the log
4.back-up once again.

As you may have determined, I am relatively new to managing a sql server database and while I have found multiple articles online about the topics I need to accomplish, I cannot find any actual examples that explain where I input the coded used to accomplish the above-mentioned steps. I do understand the theory behind the steps I just do not know how to accomplish them!

If you know of a well-documented tutorial, please point me in the right direction.

Regards.
Jul 20 '05 #1
2 11396

"NOSPAM" <NO****@shaw.ca> wrote in message
news:plqBb.627140$9l5.184547@pd7tw2no...

If you know of a well-documented tutorial, please point me in the right

direction.

Books Online (F1). To encourage more detailed help from other users of
usenet, I suggest you post in plain text, and do not cross-post your message
to half a dozen groups.

Ray at work
Jul 20 '05 #2

"NOSPAM" <NO****@shaw.ca> wrote in message
news:plqBb.627140$9l5.184547@pd7tw2no...
Hello,

I am hoping you can help me with the following problem; I need to process
the following steps every couple of hours in order to keep our Sql 2000
database a small as possible (the transaction log is 5x bigger than the db).

1.back-up the entire database
2.truncate the log
3.shrink the log
4.back-up once again.
======================= My post =======================
First, most of the newsgroups you posted to are completely inappropriate for
this.
Second, please don't post in HTML.

Having gotten my gripes out of the way.

First question to ask is, how important is the data?
This sounds like a production database.

However, for a moment, let's assume it's not. In that case, using SQL
Enterprise Manager you can set the recovery mode to SIMPLE RECOVERY and then
just do backups at your leisure. However, you'll have NO transaction log to
speak of and in the event of a failure you will only be able to restore to
the point of your last backup. (Which is essentially where you are at now.)

However, if it's a production database, what you want to do is schedule
transaction log backups as often as business requirements require. In other
words if you can't lose more than 15 minutes worth of data, do a transaction
log backup every 15 minutes.

Once you have transaction backups in place, DO NOT truncate the log. (It
shouldn't grow out of control at this point.)

Once you truncate a transaction log, you lose a lot of your ability to
perform an up to the minute restore.

Also, shrinking the log should be a fairly rare event (it is about the only
way one can end up with disk-level fragmentation of a db file which can
affect performance.)

================================================== ======

As you may have determined, I am relatively new to managing a sql server
database and while I have found multiple articles online about the topics I
need to accomplish, I cannot find any actual examples that explain where I
input the coded used to accomplish the above-mentioned steps. I do
understand the theory behind the steps I just do not know how to accomplish
them!

If you know of a well-documented tutorial, please point me in the right
direction.

Regards.
Jul 20 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

24
by: jason | last post by:
Hi Ray...a while ago you explained an elegant solution to enable me to CREATE and EDIT existing tables and queries inside my online access 2000 database.... could you provide refresher links on...
0
by: rjp | last post by:
Hi, I am using a SQLServer 7 SP4 version. I have scheduled one job with the SQLServer agent which backup the log of the databases every day. The command is : "backup log base to with noinit"...
1
by: R Camarda | last post by:
Help, I have a database that has a data file of 2GB and a log file of 31GB. In enterprise manager, when I choose shrink it says there is 30GB of unused space. When I shrink the database, it does...
2
by: Robert Kruk | last post by:
Hello, Recently I've tried to restore backup made on SQL Server 6.5. Unfortunately, the only version of SQL Server I currently possess is SQL Server 2000. I have access only to that backup,...
3
by: Mark Bennett | last post by:
Hello, Embarrassing as it is, I'm stumped by a (I'd imagine) fairly elementary CSS problem. Consider the code below. We have a table with three columns, two of which are set to a width of...
4
by: Dr John Stockton | last post by:
Throughout the world in general, ISO 8601 Week Numbers are used, in which weeks are numbered 01 upwards and Week 01 contains the first Thursday of the Gregorian Calendar Year. There are,...
3
by: | last post by:
I have been researching articles on google on how to create a simple RSS feed that sucks <title><blurb><link><date> out of a sql server 2000 database via an aspx page. I know it has to be pushed...
3
by: alwinkotiya | last post by:
Hi all, If I set recovery model SIMPLE then truncation of log files will be automated , but I will lose database changes made since the last backup was taken. Is there any way to automate...
2
by: John | last post by:
I have an Access 2000 form that has a Hyperlink that opens an Excel 2000 worksheet located in the same network folder as the Access MDB. The Hyperlink works great. When users close the Excel...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.