Showing posts with label databases. Show all posts
Showing posts with label databases. Show all posts

Friday, March 23, 2012

last time a table was used

Any way without a trigger to determine the last time a table was accessed? we have duplicate tables accross some databases, and suspect we don't need a few of them. ;)

They won't let me change the names and see who squeals.

Sql profiler?!|||

Yeah, forgot to mention I only have developer rights.

<<sigh>>

I was hoping there was an additional magic microsoft faerie out there that would somehow know.

sql

Friday, March 9, 2012

Largest SQL Server 2000 Enterprise Ed. Databases

I like to obtain information on several of the largest
SQL Server 2000 Enterprise Edition databases? With the
hardware specification and disk space (SAN, LUN, etc.)
they are using.
Also would be helpful the average number of transactions
per minute the server is handling.
If the application used a third party utility to enhance
application scheduling?
I would like to obtain this information for trading floor
application that I'm am working on.
Thanks,
MikeHi,
Have a look into the below link for details.
http://www.microsoft.com/sql/evalua.../wintercorp.asp
Thanks
Hari
MCDBA
"Mike" <anonymous@.discussions.microsoft.com> wrote in message
news:15a7501c446c5$e8df33a0$a101280a@.phx
.gbl...
> I like to obtain information on several of the largest
> SQL Server 2000 Enterprise Edition databases? With the
> hardware specification and disk space (SAN, LUN, etc.)
> they are using.
> Also would be helpful the average number of transactions
> per minute the server is handling.
> If the application used a third party utility to enhance
> application scheduling?
> I would like to obtain this information for trading floor
> application that I'm am working on.
> Thanks,
> Mike|||Mike,
'Scalability and Very Large Database (VLDB) Resources'
http://www.microsoft.com/sql/techin...scalability.asp
'Transaction Processing Performance Council'
http://www.tpc.org/
Dinesh
SQL Server MVP
--
--
SQL Server FAQ at
http://www.tkdinesh.com
"Mike" <anonymous@.discussions.microsoft.com> wrote in message
news:15a7501c446c5$e8df33a0$a101280a@.phx
.gbl...
> I like to obtain information on several of the largest
> SQL Server 2000 Enterprise Edition databases? With the
> hardware specification and disk space (SAN, LUN, etc.)
> they are using.
> Also would be helpful the average number of transactions
> per minute the server is handling.
> If the application used a third party utility to enhance
> application scheduling?
> I would like to obtain this information for trading floor
> application that I'm am working on.
> Thanks,
> Mike

Largest SQL Server 2000 Enterprise Ed. Databases

I like to obtain information on several of the largest
SQL Server 2000 Enterprise Edition databases? With the
hardware specification and disk space (SAN, LUN, etc.)
they are using.
Also would be helpful the average number of transactions
per minute the server is handling.
If the application used a third party utility to enhance
application scheduling?
I would like to obtain this information for trading floor
application that I'm am working on.
Thanks,
Mike
Hi,
Have a look into the below link for details.
http://www.microsoft.com/sql/evaluat...wintercorp.asp
Thanks
Hari
MCDBA
"Mike" <anonymous@.discussions.microsoft.com> wrote in message
news:15a7501c446c5$e8df33a0$a101280a@.phx.gbl...
> I like to obtain information on several of the largest
> SQL Server 2000 Enterprise Edition databases? With the
> hardware specification and disk space (SAN, LUN, etc.)
> they are using.
> Also would be helpful the average number of transactions
> per minute the server is handling.
> If the application used a third party utility to enhance
> application scheduling?
> I would like to obtain this information for trading floor
> application that I'm am working on.
> Thanks,
> Mike
|||Mike,
'Scalability and Very Large Database (VLDB) Resources'
http://www.microsoft.com/sql/techinf...calability.asp
'Transaction Processing Performance Council'
http://www.tpc.org/
Dinesh
SQL Server MVP
--
SQL Server FAQ at
http://www.tkdinesh.com
"Mike" <anonymous@.discussions.microsoft.com> wrote in message
news:15a7501c446c5$e8df33a0$a101280a@.phx.gbl...
> I like to obtain information on several of the largest
> SQL Server 2000 Enterprise Edition databases? With the
> hardware specification and disk space (SAN, LUN, etc.)
> they are using.
> Also would be helpful the average number of transactions
> per minute the server is handling.
> If the application used a third party utility to enhance
> application scheduling?
> I would like to obtain this information for trading floor
> application that I'm am working on.
> Thanks,
> Mike

Largest SQL Server 2000 Enterprise Ed. Databases

I like to obtain information on several of the largest
SQL Server 2000 Enterprise Edition databases? With the
hardware specification and disk space (SAN, LUN, etc.)
they are using.
Also would be helpful the average number of transactions
per minute the server is handling.
If the application used a third party utility to enhance
application scheduling?
I would like to obtain this information for trading floor
application that I'm am working on.
Thanks,
MikeHi,
Have a look into the below link for details.
http://www.microsoft.com/sql/evaluation/compare/wintercorp.asp
Thanks
Hari
MCDBA
"Mike" <anonymous@.discussions.microsoft.com> wrote in message
news:15a7501c446c5$e8df33a0$a101280a@.phx.gbl...
> I like to obtain information on several of the largest
> SQL Server 2000 Enterprise Edition databases? With the
> hardware specification and disk space (SAN, LUN, etc.)
> they are using.
> Also would be helpful the average number of transactions
> per minute the server is handling.
> If the application used a third party utility to enhance
> application scheduling?
> I would like to obtain this information for trading floor
> application that I'm am working on.
> Thanks,
> Mike|||Mike,
'Scalability and Very Large Database (VLDB) Resources'
http://www.microsoft.com/sql/techinfo/administration/2000/scalability.asp
'Transaction Processing Performance Council'
http://www.tpc.org/
Dinesh
SQL Server MVP
--
--
SQL Server FAQ at
http://www.tkdinesh.com
"Mike" <anonymous@.discussions.microsoft.com> wrote in message
news:15a7501c446c5$e8df33a0$a101280a@.phx.gbl...
> I like to obtain information on several of the largest
> SQL Server 2000 Enterprise Edition databases? With the
> hardware specification and disk space (SAN, LUN, etc.)
> they are using.
> Also would be helpful the average number of transactions
> per minute the server is handling.
> If the application used a third party utility to enhance
> application scheduling?
> I would like to obtain this information for trading floor
> application that I'm am working on.
> Thanks,
> Mike

Larger (100gig+) SQl database backup time

We have some databases (100-130 gig) that take 30 plus hours to backup. Is
this normal and is there a better way to do this than using the built in
backup tools? Or a bteer way to use the tools?
I know we can do patial backups but I am specifically looking for
information on the full backup procedure.
OS server 2003, 4gig ram, database sql2000.
Thanks!Hi
You don't say what you are backing up to! You could use multiple backup
devices to cut down this time. Make sure that you do not have contention for
resources when backing up i.e. split data files from backup files
John
"Stedak" wrote:

> We have some databases (100-130 gig) that take 30 plus hours to backup. Is
> this normal and is there a better way to do this than using the built in
> backup tools? Or a bteer way to use the tools?
> I know we can do patial backups but I am specifically looking for
> information on the full backup procedure.
> OS server 2003, 4gig ram, database sql2000.
> Thanks!|||Stedak wrote:
> We have some databases (100-130 gig) that take 30 plus hours to backup. Is
> this normal and is there a better way to do this than using the built in
> backup tools? Or a bteer way to use the tools?
> I know we can do patial backups but I am specifically looking for
> information on the full backup procedure.
> OS server 2003, 4gig ram, database sql2000.
> Thanks!
Something is wrong... We have multiple databases here that are nearly
200GB each, and none of them takes longer than 45 minutes to backup to
disk. Are you backing up to disk or tape?
Tracy McKibben
MCDBA
http://www.realsqlguy.com|||Stedak wrote:
> We have some databases (100-130 gig) that take 30 plus hours to backup. Is
> this normal and is there a better way to do this than using the built in
> backup tools? Or a bteer way to use the tools?
> I know we can do patial backups but I am specifically looking for
> information on the full backup procedure.
> OS server 2003, 4gig ram, database sql2000.
> Thanks!
In addition to my other post, make sure you don't have anti-virus
software that is scanning the backup file as you're writing it. Also
check for disk fragmentation.
Tracy McKibben
MCDBA
http://www.realsqlguy.com|||We are backing up to an external USB hard drive.
"Tracy McKibben" wrote:

> Stedak wrote:
> Something is wrong... We have multiple databases here that are nearly
> 200GB each, and none of them takes longer than 45 minutes to backup to
> disk. Are you backing up to disk or tape?
>
> --
> Tracy McKibben
> MCDBA
> http://www.realsqlguy.com
>|||Probably an IDE 7200 RPM?
Yes, that will take a whole lot longert than an internal SCSI RAID set of
drives.
30 hours seems excessive. have you done a local backup to compare, or is
the reason for the external that you don't have enough drive space locally?
Also, there are backup compression utilities on teh market...LiteSpeed from
Quest and SQL Backup from Red Gate are the two I know well.
Kevin Hill
3NF Consulting
www.3nf-inc.com
"Stedak" <Stedak@.discussions.microsoft.com> wrote in message
news:617BD7F1-D85D-46D6-979E-B9090BA795DE@.microsoft.com...[vbcol=seagreen]
> We are backing up to an external USB hard drive.
> "Tracy McKibben" wrote:
>|||Stedak wrote:
> We are backing up to an external USB hard drive.
>
Probably not the best choice for high-speed SQL Server backups...
Tracy McKibben
MCDBA
http://www.realsqlguy.com|||"Stedak" <Stedak@.discussions.microsoft.com> wrote in message
news:617BD7F1-D85D-46D6-979E-B9090BA795DE@.microsoft.com...
> We are backing up to an external USB hard drive.
>
Not a great choice.
I like the idea of backing up to disk though.
I use Snap Servers (specifically the 4200 right now) and get 100+ gig of
backups done in about 4+ hours.
And there's other tricks one can do to get even faster backups.
(for example writing to TWO snap servers would cut that about in 1/2.)
[vbcol=seagreen]
> "Tracy McKibben" wrote:
>

Larger (100gig+) SQl database backup time

We have some databases (100-130 gig) that take 30 plus hours to backup. Is
this normal and is there a better way to do this than using the built in
backup tools? Or a bteer way to use the tools?
I know we can do patial backups but I am specifically looking for
information on the full backup procedure.
OS server 2003, 4gig ram, database sql2000.
Thanks!Hi
You don't say what you are backing up to! You could use multiple backup
devices to cut down this time. Make sure that you do not have contention for
resources when backing up i.e. split data files from backup files
John
"Stedak" wrote:
> We have some databases (100-130 gig) that take 30 plus hours to backup. Is
> this normal and is there a better way to do this than using the built in
> backup tools? Or a bteer way to use the tools?
> I know we can do patial backups but I am specifically looking for
> information on the full backup procedure.
> OS server 2003, 4gig ram, database sql2000.
> Thanks!|||Stedak wrote:
> We have some databases (100-130 gig) that take 30 plus hours to backup. Is
> this normal and is there a better way to do this than using the built in
> backup tools? Or a bteer way to use the tools?
> I know we can do patial backups but I am specifically looking for
> information on the full backup procedure.
> OS server 2003, 4gig ram, database sql2000.
> Thanks!
Something is wrong... We have multiple databases here that are nearly
200GB each, and none of them takes longer than 45 minutes to backup to
disk. Are you backing up to disk or tape?
Tracy McKibben
MCDBA
http://www.realsqlguy.com|||Stedak wrote:
> We have some databases (100-130 gig) that take 30 plus hours to backup. Is
> this normal and is there a better way to do this than using the built in
> backup tools? Or a bteer way to use the tools?
> I know we can do patial backups but I am specifically looking for
> information on the full backup procedure.
> OS server 2003, 4gig ram, database sql2000.
> Thanks!
In addition to my other post, make sure you don't have anti-virus
software that is scanning the backup file as you're writing it. Also
check for disk fragmentation.
Tracy McKibben
MCDBA
http://www.realsqlguy.com|||We are backing up to an external USB hard drive.
"Tracy McKibben" wrote:
> Stedak wrote:
> > We have some databases (100-130 gig) that take 30 plus hours to backup. Is
> > this normal and is there a better way to do this than using the built in
> > backup tools? Or a bteer way to use the tools?
> >
> > I know we can do patial backups but I am specifically looking for
> > information on the full backup procedure.
> >
> > OS server 2003, 4gig ram, database sql2000.
> >
> > Thanks!
> Something is wrong... We have multiple databases here that are nearly
> 200GB each, and none of them takes longer than 45 minutes to backup to
> disk. Are you backing up to disk or tape?
>
> --
> Tracy McKibben
> MCDBA
> http://www.realsqlguy.com
>|||Probably an IDE 7200 RPM?
Yes, that will take a whole lot longert than an internal SCSI RAID set of
drives.
30 hours seems excessive. have you done a local backup to compare, or is
the reason for the external that you don't have enough drive space locally?
Also, there are backup compression utilities on teh market...LiteSpeed from
Quest and SQL Backup from Red Gate are the two I know well.
--
Kevin Hill
3NF Consulting
www.3nf-inc.com
"Stedak" <Stedak@.discussions.microsoft.com> wrote in message
news:617BD7F1-D85D-46D6-979E-B9090BA795DE@.microsoft.com...
> We are backing up to an external USB hard drive.
> "Tracy McKibben" wrote:
>> Stedak wrote:
>> > We have some databases (100-130 gig) that take 30 plus hours to backup.
>> > Is
>> > this normal and is there a better way to do this than using the built
>> > in
>> > backup tools? Or a bteer way to use the tools?
>> >
>> > I know we can do patial backups but I am specifically looking for
>> > information on the full backup procedure.
>> >
>> > OS server 2003, 4gig ram, database sql2000.
>> >
>> > Thanks!
>> Something is wrong... We have multiple databases here that are nearly
>> 200GB each, and none of them takes longer than 45 minutes to backup to
>> disk. Are you backing up to disk or tape?
>>
>> --
>> Tracy McKibben
>> MCDBA
>> http://www.realsqlguy.com|||Stedak wrote:
> We are backing up to an external USB hard drive.
>
Probably not the best choice for high-speed SQL Server backups...
Tracy McKibben
MCDBA
http://www.realsqlguy.com|||"Stedak" <Stedak@.discussions.microsoft.com> wrote in message
news:617BD7F1-D85D-46D6-979E-B9090BA795DE@.microsoft.com...
> We are backing up to an external USB hard drive.
>
Not a great choice.
I like the idea of backing up to disk though.
I use Snap Servers (specifically the 4200 right now) and get 100+ gig of
backups done in about 4+ hours.
And there's other tricks one can do to get even faster backups.
(for example writing to TWO snap servers would cut that about in 1/2.)
> "Tracy McKibben" wrote:
>> Stedak wrote:
>> > We have some databases (100-130 gig) that take 30 plus hours to backup.
>> > Is
>> > this normal and is there a better way to do this than using the built
>> > in
>> > backup tools? Or a bteer way to use the tools?
>> >
>> > I know we can do patial backups but I am specifically looking for
>> > information on the full backup procedure.
>> >
>> > OS server 2003, 4gig ram, database sql2000.
>> >
>> > Thanks!
>> Something is wrong... We have multiple databases here that are nearly
>> 200GB each, and none of them takes longer than 45 minutes to backup to
>> disk. Are you backing up to disk or tape?
>>
>> --
>> Tracy McKibben
>> MCDBA
>> http://www.realsqlguy.com

Large Transaction Logs

I have some databases that are keeping log files (.ldf) that are 3 times the
size of the db and very large. What is the best way to shrink the size of
these .ldf files? I have made backups of the db's and transaction logs
using SQL database maintenance (as some have suggested), but this does not
shrink the .ldf files. What else can I do?
Brandon
Presentations Direct - "Document Finishing Solutions"
http://www.presentationsdirect.comBrandon,
Backing up a transaction log will clear it but not shrink it. Use DBCC
SHRINKFILE on the t-log. Tibor has some more info here:
http://www.karaszi.com/SQLServer/info_dont_shrink.asp
HTH
Jerry
"Brandon" <bsmith@.presentationsdirect.nospam.com> wrote in message
news:eO5MHFOgGHA.1320@.TK2MSFTNGP04.phx.gbl...
>I have some databases that are keeping log files (.ldf) that are 3 times
>the size of the db and very large. What is the best way to shrink the size
>of these .ldf files? I have made backups of the db's and transaction logs
>using SQL database maintenance (as some have suggested), but this does not
>shrink the .ldf files. What else can I do?
> --
> Brandon
> Presentations Direct - "Document Finishing Solutions"
> http://www.presentationsdirect.com
>|||You might want to investigate what is or has inflated them.
Reindexing, bulk loads of data, replication, etc, can all grow your
logs and there are ways of addressing each.|||Logs can get "locked" if something is hitting them. Example: I have an
Indexdefrag job that fills up a log. I have to stop the job before I can
shrink it. (I am using Simple recovery mode on this database.) You may wan
t
to use View/Textpad to see if the log is filled with active or not. If
you're in full mode, after you backup the log, you should see the empty spac
e
increase and the active space decrease.
"Brandon" wrote:

> I have some databases that are keeping log files (.ldf) that are 3 times t
he
> size of the db and very large. What is the best way to shrink the size of
> these .ldf files? I have made backups of the db's and transaction logs
> using SQL database maintenance (as some have suggested), but this does not
> shrink the .ldf files. What else can I do?
> --
> Brandon
> Presentations Direct - "Document Finishing Solutions"
> http://www.presentationsdirect.com
>
>|||Specific to Transaction logs, here are a few articles you might like to
look at:
INF: Transaction Log Grows Unexpectedly or Becomes Full on SQL Server
http://support.microsoft.com/?id=317375
INF: Shrinking the Transaction Log in SQL Server 2000 with DBCC SHRINKFILE
http://support.microsoft.com/defaul...kb;EN-US;272318
INF: How to Shrink the SQL Server 7.0 Transaction Log
http://support.microsoft.com/defaul...kb;EN-US;256650
INF: Considerations for Autogrow and Autoshrink Configuration
http://support.microsoft.com/defaul...kb;EN-US;315512
INF: Incomplete Transaction May Hold Large Number of Locks and Cause
Blocking
http://support.microsoft.com/defaul...kb;EN-US;295108
Taking a backup of the log will not shrink the size of log , also its
important to consider the recovery model of the database. Consider using
DBCC SHRINKFILE.
Hope This Helps
Vishal Gandhi

Large Transaction Logs

I have some databases that are keeping log files (.ldf) that are 3 times the
size of the db and very large. What is the best way to shrink the size of
these .ldf files? I have made backups of the db's and transaction logs
using SQL database maintenance (as some have suggested), but this does not
shrink the .ldf files. What else can I do?
--
Brandon
Presentations Direct - "Document Finishing Solutions"
http://www.presentationsdirect.comBrandon,
Backing up a transaction log will clear it but not shrink it. Use DBCC
SHRINKFILE on the t-log. Tibor has some more info here:
http://www.karaszi.com/SQLServer/info_dont_shrink.asp
HTH
Jerry
"Brandon" <bsmith@.presentationsdirect.nospam.com> wrote in message
news:eO5MHFOgGHA.1320@.TK2MSFTNGP04.phx.gbl...
>I have some databases that are keeping log files (.ldf) that are 3 times
>the size of the db and very large. What is the best way to shrink the size
>of these .ldf files? I have made backups of the db's and transaction logs
>using SQL database maintenance (as some have suggested), but this does not
>shrink the .ldf files. What else can I do?
> --
> Brandon
> Presentations Direct - "Document Finishing Solutions"
> http://www.presentationsdirect.com
>|||You might want to investigate what is or has inflated them.
Reindexing, bulk loads of data, replication, etc, can all grow your
logs and there are ways of addressing each.|||Logs can get "locked" if something is hitting them. Example: I have an
Indexdefrag job that fills up a log. I have to stop the job before I can
shrink it. (I am using Simple recovery mode on this database.) You may want
to use View/Textpad to see if the log is filled with active or not. If
you're in full mode, after you backup the log, you should see the empty space
increase and the active space decrease.
"Brandon" wrote:
> I have some databases that are keeping log files (.ldf) that are 3 times the
> size of the db and very large. What is the best way to shrink the size of
> these .ldf files? I have made backups of the db's and transaction logs
> using SQL database maintenance (as some have suggested), but this does not
> shrink the .ldf files. What else can I do?
> --
> Brandon
> Presentations Direct - "Document Finishing Solutions"
> http://www.presentationsdirect.com
>
>|||Specific to Transaction logs, here are a few articles you might like to
look at:
INF: Transaction Log Grows Unexpectedly or Becomes Full on SQL Server
http://support.microsoft.com/?id=317375
INF: Shrinking the Transaction Log in SQL Server 2000 with DBCC SHRINKFILE
http://support.microsoft.com/default.aspx?scid=kb;EN-US;272318
INF: How to Shrink the SQL Server 7.0 Transaction Log
http://support.microsoft.com/default.aspx?scid=kb;EN-US;256650
INF: Considerations for Autogrow and Autoshrink Configuration
http://support.microsoft.com/default.aspx?scid=kb;EN-US;315512
INF: Incomplete Transaction May Hold Large Number of Locks and Cause
Blocking
http://support.microsoft.com/default.aspx?scid=kb;EN-US;295108
Taking a backup of the log will not shrink the size of log , also its
important to consider the recovery model of the database. Consider using
DBCC SHRINKFILE.
Hope This Helps
Vishal Gandhi

Large Transaction Log Files - SQL 2000

The SQL 2000 transaction log backups for our customer's databases are
regularly quite large - often times almost as large as the database itself
despite the fact that we run transaction log backups nightly.
We're wondering if the size of the log backups is related to the SQL
optimization jobs we regularly run. How often is it appropriate to run an
optimization job? When is the best time to do the optimizations? (After a
full db backup? Before a full db backup? After a transaction log
backup?Before a transaction log backup?) Or does it really matter at all?
Our databases vary greatly in size from a few megabytes to a few gigabytes.
Being ecommerce website databases, a large percentage of the activity is
read activity (shoppers browsing the site) but there is write activity when
shoppers register, place an order etc. The number of transactions varies
widely from a transaction once a week to hundreds or thousands of
transactions per day depending on which customers database we are talking
about.
Thanks,
Brad
It sounds like a lot of the Transaction Log activity may be related to the
optimization efforts.
Why do you feel the need to exercise optimization efforts out of band with
the backup schedule?
Depending upon write activity, and types of indexes, padding, etc.,
optimization may be occurring much too often.
If you wanted to provide more details about your optimization and backup
schedules, we may be able to give you more directed assistance.
Arnie Rowland, Ph.D.
Westwood Consulting, Inc
Most good judgment comes from experience.
Most experience comes from bad judgment.
- Anonymous
You can't help someone get up a hill without getting a little closer to the
top yourself.
- H. Norman Schwarzkopf
"Brad Baker" <brad@.nospam.nospam> wrote in message
news:uKE47DmEHHA.4024@.TK2MSFTNGP04.phx.gbl...
> The SQL 2000 transaction log backups for our customer's databases are
> regularly quite large - often times almost as large as the database itself
> despite the fact that we run transaction log backups nightly.
> We're wondering if the size of the log backups is related to the SQL
> optimization jobs we regularly run. How often is it appropriate to run an
> optimization job? When is the best time to do the optimizations? (After a
> full db backup? Before a full db backup? After a transaction log
> backup?Before a transaction log backup?) Or does it really matter at all?
> Our databases vary greatly in size from a few megabytes to a few
> gigabytes. Being ecommerce website databases, a large percentage of the
> activity is read activity (shoppers browsing the site) but there is write
> activity when shoppers register, place an order etc. The number of
> transactions varies widely from a transaction once a week to hundreds or
> thousands of transactions per day depending on which customers database we
> are talking about.
> Thanks,
> Brad
>
|||Thanks for the information. Here is how we have our SQL 2000 Maintenance
Plan Setup:
[Optimization]
[x] Reorganize data and index pages
( ) Reorganize pages with the original amount of free space
(*) Change Free Space per page percentage to: 10%
[ ] Update the statistics used by the query optimizer
Percentage of database to sample: (grayed out)
[ ] Remove unused space from the database files
( ) Shrink database when it grows beyond: (grayed out)
( ) Amount of free space to remain after shrink (grayed out)
Occurs every 1 week(s) on Sunday, at 1:00:00 AM.
[Integrity Check]
[x] Check database integrity
(*) Include indexes
[ ] Attempt to repair any minor problems
( ) Excluded indexes
[ ] Perform these tests before backing up the database or transaction log.
Occurs every 1 week(s) on Sunday, at 12:00:00 AM.
[Complete Backup]
[x] Backup the database as part of the maintenance plan
[x] Verify the integrity of the backup upon completion
( ) Tape (grayed out)
( ) Disk
( ) Use the default backup directory
(*) Use this directory (backup directory)
[x] Create a sub-directory for each database
[x] Remove files older than 2 weeks
Backup extension: BAK
Occurs every 1 week(s) on Sunday, at 2:00:00 AM
[Transaction Log Backup]
[x] Backup the transaction log of the database as part of the maintenance
plan
[x] Verify the integrity of the backup upon completion
( ) Tape (grayed out)
( ) Disk
( ) Use the default backup directory
(*) Use this directory (backup directory)
[x] Create a sub-directory for each database
[x] Remove files older than 2 weeks
Backup extension: TRN
Occurs every 1 day(s), every 4 hour(s) between 12:15:00 AM and 6:59:59 AM.
The reason for limiting transaction log backups to the night was that we
found they were negatively impacting website performance.
Hopefully that makes sense but please let me know if you have questions.
Thanks,
Brad
"Arnie Rowland" <arnie@.1568.com> wrote in message
news:uQNhHHmEHHA.4808@.TK2MSFTNGP03.phx.gbl...
> It sounds like a lot of the Transaction Log activity may be related to the
> optimization efforts.
> Why do you feel the need to exercise optimization efforts out of band with
> the backup schedule?
> Depending upon write activity, and types of indexes, padding, etc.,
> optimization may be occurring much too often.
> If you wanted to provide more details about your optimization and backup
> schedules, we may be able to give you more directed assistance.
> --
> Arnie Rowland, Ph.D.
> Westwood Consulting, Inc
> Most good judgment comes from experience.
> Most experience comes from bad judgment.
> - Anonymous
> You can't help someone get up a hill without getting a little closer to
> the top yourself.
> - H. Norman Schwarzkopf
>
> "Brad Baker" <brad@.nospam.nospam> wrote in message
> news:uKE47DmEHHA.4024@.TK2MSFTNGP04.phx.gbl...
>
|||From your statement that TLog backups impact the website performance, it
sounds like the SQL Server is running on the same box as the Web Server AND
it must also be an 'underpowered' server. (I've often seen TLog backups on
multiGB databases having lots of activity take only seconds when done
hourly -and the users never realized anything was different.)
For your current schedule, I would make sure that there is NO TLog backup on
Sunday -it is most likely is happening before the optimization and FULL
Backup.
Arnie Rowland, Ph.D.
Westwood Consulting, Inc
Most good judgment comes from experience.
Most experience comes from bad judgment.
- Anonymous
You can't help someone get up a hill without getting a little closer to the
top yourself.
- H. Norman Schwarzkopf
"Brad Baker" <brad@.nospam.nospam> wrote in message
news:uhAuaUoEHHA.4024@.TK2MSFTNGP04.phx.gbl...
> Thanks for the information. Here is how we have our SQL 2000 Maintenance
> Plan Setup:
>
> [Optimization]
> [x] Reorganize data and index pages
> ( ) Reorganize pages with the original amount of free space
> (*) Change Free Space per page percentage to: 10%
>
> [ ] Update the statistics used by the query optimizer
> Percentage of database to sample: (grayed out)
>
> [ ] Remove unused space from the database files
> ( ) Shrink database when it grows beyond: (grayed out)
> ( ) Amount of free space to remain after shrink (grayed out)
>
> Occurs every 1 week(s) on Sunday, at 1:00:00 AM.
>
>
>
> [Integrity Check]
> [x] Check database integrity
> (*) Include indexes
> [ ] Attempt to repair any minor problems
> ( ) Excluded indexes
>
> [ ] Perform these tests before backing up the database or transaction log.
>
> Occurs every 1 week(s) on Sunday, at 12:00:00 AM.
>
>
>
> [Complete Backup]
> [x] Backup the database as part of the maintenance plan
> [x] Verify the integrity of the backup upon completion
>
> ( ) Tape (grayed out)
> ( ) Disk
> ( ) Use the default backup directory
> (*) Use this directory (backup directory)
>
> [x] Create a sub-directory for each database
> [x] Remove files older than 2 weeks
>
> Backup extension: BAK
>
> Occurs every 1 week(s) on Sunday, at 2:00:00 AM
>
>
> [Transaction Log Backup]
> [x] Backup the transaction log of the database as part of the maintenance
> plan
> [x] Verify the integrity of the backup upon completion
>
> ( ) Tape (grayed out)
> ( ) Disk
> ( ) Use the default backup directory
> (*) Use this directory (backup directory)
>
> [x] Create a sub-directory for each database
> [x] Remove files older than 2 weeks
>
> Backup extension: TRN
>
> Occurs every 1 day(s), every 4 hour(s) between 12:15:00 AM and 6:59:59 AM.
>
>
> The reason for limiting transaction log backups to the night was that we
> found they were negatively impacting website performance.
>
> Hopefully that makes sense but please let me know if you have questions.
>
> Thanks,
> Brad
>
>
> "Arnie Rowland" <arnie@.1568.com> wrote in message
> news:uQNhHHmEHHA.4808@.TK2MSFTNGP03.phx.gbl...
>
|||Does you maintenance plan include more than one database?
I ask, because we are having the same problem and our maintenance plan
specifies 3 databases - where the 1st log file looks fine and the 2nd & 3rd
are quite large.
I just made a post on the subject.
|||We have 6 maintenance plans - all of which contain about 60 databases each.
"JayKon" <JayKon@.discussions.microsoft.com> wrote in message
news:EF1DFA32-E412-4A9D-850E-68783CF8BDA0@.microsoft.com...
> Does you maintenance plan include more than one database?
> I ask, because we are having the same problem and our maintenance plan
> specifies 3 databases - where the 1st log file looks fine and the 2nd &
> 3rd
> are quite large.
> I just made a post on the subject.
|||We have several DB servers all experiencing this problem. They are all
dedicated SQL servers though - no other applications running on them.
The servers are running dual xeon processors with 8GB of RAM. Some of the
servers have a handful of very large databases and other servers have a lot
(100-200) small databases. That's not to say the server isn't underpowered
for the load we are placing on it - sometimes the load is quite high and
other times its nominal.
When the Tlog backups were running we would see ASP errors involving SQL
timeouts as well as short disruptions in service.. so that's why we decided
we probably out to limit tlog backups to night.
I'm going to try disabling transaction log backups on Sunday and see if that
improves things. If you have any other ideas please let me know
Thanks,
Brad
"Arnie Rowland" <arnie@.1568.com> wrote in message
news:uuYyNXxEHHA.4508@.TK2MSFTNGP02.phx.gbl...
> From your statement that TLog backups impact the website performance, it
> sounds like the SQL Server is running on the same box as the Web Server
> AND it must also be an 'underpowered' server. (I've often seen TLog
> backups on multiGB databases having lots of activity take only seconds
> when done hourly -and the users never realized anything was different.)
> For your current schedule, I would make sure that there is NO TLog backup
> on Sunday -it is most likely is happening before the optimization and FULL
> Backup.
> --
> Arnie Rowland, Ph.D.
> Westwood Consulting, Inc
> Most good judgment comes from experience.
> Most experience comes from bad judgment.
> - Anonymous
> You can't help someone get up a hill without getting a little closer to
> the top yourself.
> - H. Norman Schwarzkopf
>
> "Brad Baker" <brad@.nospam.nospam> wrote in message
> news:uhAuaUoEHHA.4024@.TK2MSFTNGP04.phx.gbl...
>

Large Transaction Log Files - SQL 2000

The SQL 2000 transaction log backups for our customer's databases are
regularly quite large - often times almost as large as the database itself
despite the fact that we run transaction log backups nightly.
We're wondering if the size of the log backups is related to the SQL
optimization jobs we regularly run. How often is it appropriate to run an
optimization job? When is the best time to do the optimizations? (After a
full db backup? Before a full db backup? After a transaction log
backup?Before a transaction log backup?) Or does it really matter at all?
Our databases vary greatly in size from a few megabytes to a few gigabytes.
Being ecommerce website databases, a large percentage of the activity is
read activity (shoppers browsing the site) but there is write activity when
shoppers register, place an order etc. The number of transactions varies
widely from a transaction once a week to hundreds or thousands of
transactions per day depending on which customers database we are talking
about.
Thanks,
BradIt sounds like a lot of the Transaction Log activity may be related to the
optimization efforts.
Why do you feel the need to exercise optimization efforts out of band with
the backup schedule?
Depending upon write activity, and types of indexes, padding, etc.,
optimization may be occurring much too often.
If you wanted to provide more details about your optimization and backup
schedules, we may be able to give you more directed assistance.
--
Arnie Rowland, Ph.D.
Westwood Consulting, Inc
Most good judgment comes from experience.
Most experience comes from bad judgment.
- Anonymous
You can't help someone get up a hill without getting a little closer to the
top yourself.
- H. Norman Schwarzkopf
"Brad Baker" <brad@.nospam.nospam> wrote in message
news:uKE47DmEHHA.4024@.TK2MSFTNGP04.phx.gbl...
> The SQL 2000 transaction log backups for our customer's databases are
> regularly quite large - often times almost as large as the database itself
> despite the fact that we run transaction log backups nightly.
> We're wondering if the size of the log backups is related to the SQL
> optimization jobs we regularly run. How often is it appropriate to run an
> optimization job? When is the best time to do the optimizations? (After a
> full db backup? Before a full db backup? After a transaction log
> backup?Before a transaction log backup?) Or does it really matter at all?
> Our databases vary greatly in size from a few megabytes to a few
> gigabytes. Being ecommerce website databases, a large percentage of the
> activity is read activity (shoppers browsing the site) but there is write
> activity when shoppers register, place an order etc. The number of
> transactions varies widely from a transaction once a week to hundreds or
> thousands of transactions per day depending on which customers database we
> are talking about.
> Thanks,
> Brad
>|||> We're wondering if the size of the log backups is related to the SQL optimization jobs we
> regularly run.
Likely. It depends on what you actually mean by "optimization". If you mean index rebuilds, then all
data that you "shuffle" will be logged. This can easily be almost same as db size. It is also likely
that you do lots if optimization when you don't have to. Reading
http://www.microsoft.com/technet/prodtechnol/sql/2000/maintain/ss2kidbp.mspx is a good start.
--
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
http://www.solidqualitylearning.com/
"Brad Baker" <brad@.nospam.nospam> wrote in message news:uKE47DmEHHA.4024@.TK2MSFTNGP04.phx.gbl...
> The SQL 2000 transaction log backups for our customer's databases are regularly quite large -
> often times almost as large as the database itself despite the fact that we run transaction log
> backups nightly.
> We're wondering if the size of the log backups is related to the SQL optimization jobs we
> regularly run. How often is it appropriate to run an optimization job? When is the best time to do
> the optimizations? (After a full db backup? Before a full db backup? After a transaction log
> backup?Before a transaction log backup?) Or does it really matter at all?
> Our databases vary greatly in size from a few megabytes to a few gigabytes. Being ecommerce
> website databases, a large percentage of the activity is read activity (shoppers browsing the
> site) but there is write activity when shoppers register, place an order etc. The number of
> transactions varies widely from a transaction once a week to hundreds or thousands of transactions
> per day depending on which customers database we are talking about.
> Thanks,
> Brad
>|||Thanks for the information. Here is how we have our SQL 2000 Maintenance
Plan Setup:
[Optimization]
[x] Reorganize data and index pages
( ) Reorganize pages with the original amount of free space
(*) Change Free Space per page percentage to: 10%
[ ] Update the statistics used by the query optimizer
Percentage of database to sample: (grayed out)
[ ] Remove unused space from the database files
( ) Shrink database when it grows beyond: (grayed out)
( ) Amount of free space to remain after shrink (grayed out)
Occurs every 1 week(s) on Sunday, at 1:00:00 AM.
[Integrity Check]
[x] Check database integrity
(*) Include indexes
[ ] Attempt to repair any minor problems
( ) Excluded indexes
[ ] Perform these tests before backing up the database or transaction log.
Occurs every 1 week(s) on Sunday, at 12:00:00 AM.
[Complete Backup]
[x] Backup the database as part of the maintenance plan
[x] Verify the integrity of the backup upon completion
( ) Tape (grayed out)
( ) Disk
( ) Use the default backup directory
(*) Use this directory (backup directory)
[x] Create a sub-directory for each database
[x] Remove files older than 2 weeks
Backup extension: BAK
Occurs every 1 week(s) on Sunday, at 2:00:00 AM
[Transaction Log Backup]
[x] Backup the transaction log of the database as part of the maintenance
plan
[x] Verify the integrity of the backup upon completion
( ) Tape (grayed out)
( ) Disk
( ) Use the default backup directory
(*) Use this directory (backup directory)
[x] Create a sub-directory for each database
[x] Remove files older than 2 weeks
Backup extension: TRN
Occurs every 1 day(s), every 4 hour(s) between 12:15:00 AM and 6:59:59 AM.
The reason for limiting transaction log backups to the night was that we
found they were negatively impacting website performance.
Hopefully that makes sense but please let me know if you have questions.
Thanks,
Brad
"Arnie Rowland" <arnie@.1568.com> wrote in message
news:uQNhHHmEHHA.4808@.TK2MSFTNGP03.phx.gbl...
> It sounds like a lot of the Transaction Log activity may be related to the
> optimization efforts.
> Why do you feel the need to exercise optimization efforts out of band with
> the backup schedule?
> Depending upon write activity, and types of indexes, padding, etc.,
> optimization may be occurring much too often.
> If you wanted to provide more details about your optimization and backup
> schedules, we may be able to give you more directed assistance.
> --
> Arnie Rowland, Ph.D.
> Westwood Consulting, Inc
> Most good judgment comes from experience.
> Most experience comes from bad judgment.
> - Anonymous
> You can't help someone get up a hill without getting a little closer to
> the top yourself.
> - H. Norman Schwarzkopf
>
> "Brad Baker" <brad@.nospam.nospam> wrote in message
> news:uKE47DmEHHA.4024@.TK2MSFTNGP04.phx.gbl...
>> The SQL 2000 transaction log backups for our customer's databases are
>> regularly quite large - often times almost as large as the database
>> itself despite the fact that we run transaction log backups nightly.
>> We're wondering if the size of the log backups is related to the SQL
>> optimization jobs we regularly run. How often is it appropriate to run an
>> optimization job? When is the best time to do the optimizations? (After a
>> full db backup? Before a full db backup? After a transaction log
>> backup?Before a transaction log backup?) Or does it really matter at all?
>> Our databases vary greatly in size from a few megabytes to a few
>> gigabytes. Being ecommerce website databases, a large percentage of the
>> activity is read activity (shoppers browsing the site) but there is write
>> activity when shoppers register, place an order etc. The number of
>> transactions varies widely from a transaction once a week to hundreds or
>> thousands of transactions per day depending on which customers database
>> we are talking about.
>> Thanks,
>> Brad
>|||From your statement that TLog backups impact the website performance, it
sounds like the SQL Server is running on the same box as the Web Server AND
it must also be an 'underpowered' server. (I've often seen TLog backups on
multiGB databases having lots of activity take only seconds when done
hourly -and the users never realized anything was different.)
For your current schedule, I would make sure that there is NO TLog backup on
Sunday -it is most likely is happening before the optimization and FULL
Backup.
--
Arnie Rowland, Ph.D.
Westwood Consulting, Inc
Most good judgment comes from experience.
Most experience comes from bad judgment.
- Anonymous
You can't help someone get up a hill without getting a little closer to the
top yourself.
- H. Norman Schwarzkopf
"Brad Baker" <brad@.nospam.nospam> wrote in message
news:uhAuaUoEHHA.4024@.TK2MSFTNGP04.phx.gbl...
> Thanks for the information. Here is how we have our SQL 2000 Maintenance
> Plan Setup:
>
> [Optimization]
> [x] Reorganize data and index pages
> ( ) Reorganize pages with the original amount of free space
> (*) Change Free Space per page percentage to: 10%
>
> [ ] Update the statistics used by the query optimizer
> Percentage of database to sample: (grayed out)
>
> [ ] Remove unused space from the database files
> ( ) Shrink database when it grows beyond: (grayed out)
> ( ) Amount of free space to remain after shrink (grayed out)
>
> Occurs every 1 week(s) on Sunday, at 1:00:00 AM.
>
>
>
> [Integrity Check]
> [x] Check database integrity
> (*) Include indexes
> [ ] Attempt to repair any minor problems
> ( ) Excluded indexes
>
> [ ] Perform these tests before backing up the database or transaction log.
>
> Occurs every 1 week(s) on Sunday, at 12:00:00 AM.
>
>
>
> [Complete Backup]
> [x] Backup the database as part of the maintenance plan
> [x] Verify the integrity of the backup upon completion
>
> ( ) Tape (grayed out)
> ( ) Disk
> ( ) Use the default backup directory
> (*) Use this directory (backup directory)
>
> [x] Create a sub-directory for each database
> [x] Remove files older than 2 weeks
>
> Backup extension: BAK
>
> Occurs every 1 week(s) on Sunday, at 2:00:00 AM
>
>
> [Transaction Log Backup]
> [x] Backup the transaction log of the database as part of the maintenance
> plan
> [x] Verify the integrity of the backup upon completion
>
> ( ) Tape (grayed out)
> ( ) Disk
> ( ) Use the default backup directory
> (*) Use this directory (backup directory)
>
> [x] Create a sub-directory for each database
> [x] Remove files older than 2 weeks
>
> Backup extension: TRN
>
> Occurs every 1 day(s), every 4 hour(s) between 12:15:00 AM and 6:59:59 AM.
>
>
> The reason for limiting transaction log backups to the night was that we
> found they were negatively impacting website performance.
>
> Hopefully that makes sense but please let me know if you have questions.
>
> Thanks,
> Brad
>
>
> "Arnie Rowland" <arnie@.1568.com> wrote in message
> news:uQNhHHmEHHA.4808@.TK2MSFTNGP03.phx.gbl...
>> It sounds like a lot of the Transaction Log activity may be related to
>> the optimization efforts.
>> Why do you feel the need to exercise optimization efforts out of band
>> with the backup schedule?
>> Depending upon write activity, and types of indexes, padding, etc.,
>> optimization may be occurring much too often.
>> If you wanted to provide more details about your optimization and backup
>> schedules, we may be able to give you more directed assistance.
>> --
>> Arnie Rowland, Ph.D.
>> Westwood Consulting, Inc
>> Most good judgment comes from experience.
>> Most experience comes from bad judgment.
>> - Anonymous
>> You can't help someone get up a hill without getting a little closer to
>> the top yourself.
>> - H. Norman Schwarzkopf
>>
>> "Brad Baker" <brad@.nospam.nospam> wrote in message
>> news:uKE47DmEHHA.4024@.TK2MSFTNGP04.phx.gbl...
>> The SQL 2000 transaction log backups for our customer's databases are
>> regularly quite large - often times almost as large as the database
>> itself despite the fact that we run transaction log backups nightly.
>> We're wondering if the size of the log backups is related to the SQL
>> optimization jobs we regularly run. How often is it appropriate to run
>> an optimization job? When is the best time to do the optimizations?
>> (After a full db backup? Before a full db backup? After a transaction
>> log backup?Before a transaction log backup?) Or does it really matter at
>> all?
>> Our databases vary greatly in size from a few megabytes to a few
>> gigabytes. Being ecommerce website databases, a large percentage of the
>> activity is read activity (shoppers browsing the site) but there is
>> write activity when shoppers register, place an order etc. The number of
>> transactions varies widely from a transaction once a week to hundreds or
>> thousands of transactions per day depending on which customers database
>> we are talking about.
>> Thanks,
>> Brad
>>
>|||Does you maintenance plan include more than one database?
I ask, because we are having the same problem and our maintenance plan
specifies 3 databases - where the 1st log file looks fine and the 2nd & 3rd
are quite large.
I just made a post on the subject.|||We have 6 maintenance plans - all of which contain about 60 databases each.
"JayKon" <JayKon@.discussions.microsoft.com> wrote in message
news:EF1DFA32-E412-4A9D-850E-68783CF8BDA0@.microsoft.com...
> Does you maintenance plan include more than one database?
> I ask, because we are having the same problem and our maintenance plan
> specifies 3 databases - where the 1st log file looks fine and the 2nd &
> 3rd
> are quite large.
> I just made a post on the subject.|||We have several DB servers all experiencing this problem. They are all
dedicated SQL servers though - no other applications running on them.
The servers are running dual xeon processors with 8GB of RAM. Some of the
servers have a handful of very large databases and other servers have a lot
(100-200) small databases. That's not to say the server isn't underpowered
for the load we are placing on it - sometimes the load is quite high and
other times its nominal.
When the Tlog backups were running we would see ASP errors involving SQL
timeouts as well as short disruptions in service.. so that's why we decided
we probably out to limit tlog backups to night.
I'm going to try disabling transaction log backups on Sunday and see if that
improves things. If you have any other ideas please let me know :)
Thanks,
Brad
"Arnie Rowland" <arnie@.1568.com> wrote in message
news:uuYyNXxEHHA.4508@.TK2MSFTNGP02.phx.gbl...
> From your statement that TLog backups impact the website performance, it
> sounds like the SQL Server is running on the same box as the Web Server
> AND it must also be an 'underpowered' server. (I've often seen TLog
> backups on multiGB databases having lots of activity take only seconds
> when done hourly -and the users never realized anything was different.)
> For your current schedule, I would make sure that there is NO TLog backup
> on Sunday -it is most likely is happening before the optimization and FULL
> Backup.
> --
> Arnie Rowland, Ph.D.
> Westwood Consulting, Inc
> Most good judgment comes from experience.
> Most experience comes from bad judgment.
> - Anonymous
> You can't help someone get up a hill without getting a little closer to
> the top yourself.
> - H. Norman Schwarzkopf
>
> "Brad Baker" <brad@.nospam.nospam> wrote in message
> news:uhAuaUoEHHA.4024@.TK2MSFTNGP04.phx.gbl...
>> Thanks for the information. Here is how we have our SQL 2000 Maintenance
>> Plan Setup:
>>
>> [Optimization]
>> [x] Reorganize data and index pages
>> ( ) Reorganize pages with the original amount of free space
>> (*) Change Free Space per page percentage to: 10%
>>
>> [ ] Update the statistics used by the query optimizer
>> Percentage of database to sample: (grayed out)
>>
>> [ ] Remove unused space from the database files
>> ( ) Shrink database when it grows beyond: (grayed out)
>> ( ) Amount of free space to remain after shrink (grayed out)
>>
>> Occurs every 1 week(s) on Sunday, at 1:00:00 AM.
>>
>>
>>
>> [Integrity Check]
>> [x] Check database integrity
>> (*) Include indexes
>> [ ] Attempt to repair any minor problems
>> ( ) Excluded indexes
>>
>> [ ] Perform these tests before backing up the database or transaction
>> log.
>>
>> Occurs every 1 week(s) on Sunday, at 12:00:00 AM.
>>
>>
>>
>> [Complete Backup]
>> [x] Backup the database as part of the maintenance plan
>> [x] Verify the integrity of the backup upon completion
>>
>> ( ) Tape (grayed out)
>> ( ) Disk
>> ( ) Use the default backup directory
>> (*) Use this directory (backup directory)
>>
>> [x] Create a sub-directory for each database
>> [x] Remove files older than 2 weeks
>>
>> Backup extension: BAK
>>
>> Occurs every 1 week(s) on Sunday, at 2:00:00 AM
>>
>>
>> [Transaction Log Backup]
>> [x] Backup the transaction log of the database as part of the maintenance
>> plan
>> [x] Verify the integrity of the backup upon completion
>>
>> ( ) Tape (grayed out)
>> ( ) Disk
>> ( ) Use the default backup directory
>> (*) Use this directory (backup directory)
>>
>> [x] Create a sub-directory for each database
>> [x] Remove files older than 2 weeks
>>
>> Backup extension: TRN
>>
>> Occurs every 1 day(s), every 4 hour(s) between 12:15:00 AM and 6:59:59
>> AM.
>>
>>
>> The reason for limiting transaction log backups to the night was that we
>> found they were negatively impacting website performance.
>>
>> Hopefully that makes sense but please let me know if you have questions.
>>
>> Thanks,
>> Brad
>>
>>
>> "Arnie Rowland" <arnie@.1568.com> wrote in message
>> news:uQNhHHmEHHA.4808@.TK2MSFTNGP03.phx.gbl...
>> It sounds like a lot of the Transaction Log activity may be related to
>> the optimization efforts.
>> Why do you feel the need to exercise optimization efforts out of band
>> with the backup schedule?
>> Depending upon write activity, and types of indexes, padding, etc.,
>> optimization may be occurring much too often.
>> If you wanted to provide more details about your optimization and backup
>> schedules, we may be able to give you more directed assistance.
>> --
>> Arnie Rowland, Ph.D.
>> Westwood Consulting, Inc
>> Most good judgment comes from experience.
>> Most experience comes from bad judgment.
>> - Anonymous
>> You can't help someone get up a hill without getting a little closer to
>> the top yourself.
>> - H. Norman Schwarzkopf
>>
>> "Brad Baker" <brad@.nospam.nospam> wrote in message
>> news:uKE47DmEHHA.4024@.TK2MSFTNGP04.phx.gbl...
>> The SQL 2000 transaction log backups for our customer's databases are
>> regularly quite large - often times almost as large as the database
>> itself despite the fact that we run transaction log backups nightly.
>> We're wondering if the size of the log backups is related to the SQL
>> optimization jobs we regularly run. How often is it appropriate to run
>> an optimization job? When is the best time to do the optimizations?
>> (After a full db backup? Before a full db backup? After a transaction
>> log backup?Before a transaction log backup?) Or does it really matter
>> at all?
>> Our databases vary greatly in size from a few megabytes to a few
>> gigabytes. Being ecommerce website databases, a large percentage of the
>> activity is read activity (shoppers browsing the site) but there is
>> write activity when shoppers register, place an order etc. The number
>> of transactions varies widely from a transaction once a week to
>> hundreds or thousands of transactions per day depending on which
>> customers database we are talking about.
>> Thanks,
>> Brad
>>
>>
>

Large Transaction Log Files - SQL 2000

The SQL 2000 transaction log backups for our customer's databases are
regularly quite large - often times almost as large as the database itself
despite the fact that we run transaction log backups nightly.
We're wondering if the size of the log backups is related to the SQL
optimization jobs we regularly run. How often is it appropriate to run an
optimization job? When is the best time to do the optimizations? (After a
full db backup? Before a full db backup? After a transaction log
backup?Before a transaction log backup?) Or does it really matter at all?
Our databases vary greatly in size from a few megabytes to a few gigabytes.
Being ecommerce website databases, a large percentage of the activity is
read activity (shoppers browsing the site) but there is write activity when
shoppers register, place an order etc. The number of transactions varies
widely from a transaction once a week to hundreds or thousands of
transactions per day depending on which customers database we are talking
about.
Thanks,
BradIt sounds like a lot of the Transaction Log activity may be related to the
optimization efforts.
Why do you feel the need to exercise optimization efforts out of band with
the backup schedule?
Depending upon write activity, and types of indexes, padding, etc.,
optimization may be occurring much too often.
If you wanted to provide more details about your optimization and backup
schedules, we may be able to give you more directed assistance.
Arnie Rowland, Ph.D.
Westwood Consulting, Inc
Most good judgment comes from experience.
Most experience comes from bad judgment.
- Anonymous
You can't help someone get up a hill without getting a little closer to the
top yourself.
- H. Norman Schwarzkopf
"Brad Baker" <brad@.nospam.nospam> wrote in message
news:uKE47DmEHHA.4024@.TK2MSFTNGP04.phx.gbl...
> The SQL 2000 transaction log backups for our customer's databases are
> regularly quite large - often times almost as large as the database itself
> despite the fact that we run transaction log backups nightly.
> We're wondering if the size of the log backups is related to the SQL
> optimization jobs we regularly run. How often is it appropriate to run an
> optimization job? When is the best time to do the optimizations? (After a
> full db backup? Before a full db backup? After a transaction log
> backup?Before a transaction log backup?) Or does it really matter at all?
> Our databases vary greatly in size from a few megabytes to a few
> gigabytes. Being ecommerce website databases, a large percentage of the
> activity is read activity (shoppers browsing the site) but there is write
> activity when shoppers register, place an order etc. The number of
> transactions varies widely from a transaction once a week to hundreds or
> thousands of transactions per day depending on which customers database we
> are talking about.
> Thanks,
> Brad
>|||> We're wondering if the size of the log backups is related to the SQL optimization jobs we[
vbcol=seagreen]
> regularly run.[/vbcol]
Likely. It depends on what you actually mean by "optimization". If you mean
index rebuilds, then all
data that you "shuffle" will be logged. This can easily be almost same as db
size. It is also likely
that you do lots if optimization when you don't have to. Reading
http://www.microsoft.com/technet/pr...n/ss2kidbp.mspx
is a good start.
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
http://www.solidqualitylearning.com/
"Brad Baker" <brad@.nospam.nospam> wrote in message news:uKE47DmEHHA.4024@.TK2MSFTNGP04.phx.gb
l...
> The SQL 2000 transaction log backups for our customer's databases are regu
larly quite large -
> often times almost as large as the database itself despite the fact that w
e run transaction log
> backups nightly.
> We're wondering if the size of the log backups is related to the SQL optim
ization jobs we
> regularly run. How often is it appropriate to run an optimization job? Whe
n is the best time to do
> the optimizations? (After a full db backup? Before a full db backup? After
a transaction log
> backup?Before a transaction log backup?) Or does it really matter at all?
> Our databases vary greatly in size from a few megabytes to a few gigabytes
. Being ecommerce
> website databases, a large percentage of the activity is read activity (sh
oppers browsing the
> site) but there is write activity when shoppers register, place an order e
tc. The number of
> transactions varies widely from a transaction once a week to hundreds or t
housands of transactions
> per day depending on which customers database we are talking about.
> Thanks,
> Brad
>|||Thanks for the information. Here is how we have our SQL 2000 Maintenance
Plan Setup:
[Optimization]
[x] Reorganize data and index pages
( ) Reorganize pages with the original amount of free space
(*) Change Free Space per page percentage to: 10%
[ ] Update the statistics used by the query optimizer
Percentage of database to sample: (grayed out)
[ ] Remove unused space from the database files
( ) Shrink database when it grows beyond: (grayed out)
( ) Amount of free space to remain after shrink (grayed out)
Occurs every 1 week(s) on Sunday, at 1:00:00 AM.
[Integrity Check]
[x] Check database integrity
(*) Include indexes
[ ] Attempt to repair any minor problems
( ) Excluded indexes
[ ] Perform these tests before backing up the database or transaction lo
g.
Occurs every 1 week(s) on Sunday, at 12:00:00 AM.
[Complete Backup]
[x] Backup the database as part of the maintenance plan
[x] Verify the integrity of the backup upon completion
( ) Tape (grayed out)
( ) Disk
( ) Use the default backup directory
(*) Use this directory (backup directory)
[x] Create a sub-directory for each database
[x] Remove files older than 2 weeks
Backup extension: BAK
Occurs every 1 week(s) on Sunday, at 2:00:00 AM
[Transaction Log Backup]
[x] Backup the transaction log of the database as part of the maintenanc
e
plan
[x] Verify the integrity of the backup upon completion
( ) Tape (grayed out)
( ) Disk
( ) Use the default backup directory
(*) Use this directory (backup directory)
[x] Create a sub-directory for each database
[x] Remove files older than 2 weeks
Backup extension: TRN
Occurs every 1 day(s), every 4 hour(s) between 12:15:00 AM and 6:59:59 AM.
The reason for limiting transaction log backups to the night was that we
found they were negatively impacting website performance.
Hopefully that makes sense but please let me know if you have questions.
Thanks,
Brad
"Arnie Rowland" <arnie@.1568.com> wrote in message
news:uQNhHHmEHHA.4808@.TK2MSFTNGP03.phx.gbl...
> It sounds like a lot of the Transaction Log activity may be related to the
> optimization efforts.
> Why do you feel the need to exercise optimization efforts out of band with
> the backup schedule?
> Depending upon write activity, and types of indexes, padding, etc.,
> optimization may be occurring much too often.
> If you wanted to provide more details about your optimization and backup
> schedules, we may be able to give you more directed assistance.
> --
> Arnie Rowland, Ph.D.
> Westwood Consulting, Inc
> Most good judgment comes from experience.
> Most experience comes from bad judgment.
> - Anonymous
> You can't help someone get up a hill without getting a little closer to
> the top yourself.
> - H. Norman Schwarzkopf
>
> "Brad Baker" <brad@.nospam.nospam> wrote in message
> news:uKE47DmEHHA.4024@.TK2MSFTNGP04.phx.gbl...
>|||From your statement that TLog backups impact the website performance, it
sounds like the SQL Server is running on the same box as the Web Server AND
it must also be an 'underpowered' server. (I've often seen TLog backups on
multiGB databases having lots of activity take only seconds when done
hourly -and the users never realized anything was different.)
For your current schedule, I would make sure that there is NO TLog backup on
Sunday -it is most likely is happening before the optimization and FULL
Backup.
Arnie Rowland, Ph.D.
Westwood Consulting, Inc
Most good judgment comes from experience.
Most experience comes from bad judgment.
- Anonymous
You can't help someone get up a hill without getting a little closer to the
top yourself.
- H. Norman Schwarzkopf
"Brad Baker" <brad@.nospam.nospam> wrote in message
news:uhAuaUoEHHA.4024@.TK2MSFTNGP04.phx.gbl...
> Thanks for the information. Here is how we have our SQL 2000 Maintenance
> Plan Setup:
>
> [Optimization]
> [x] Reorganize data and index pages
> ( ) Reorganize pages with the original amount of free space
> (*) Change Free Space per page percentage to: 10%
>
> [ ] Update the statistics used by the query optimizer
> Percentage of database to sample: (grayed out)
>
> [ ] Remove unused space from the database files
> ( ) Shrink database when it grows beyond: (grayed out)
> ( ) Amount of free space to remain after shrink (grayed out)
>
> Occurs every 1 week(s) on Sunday, at 1:00:00 AM.
>
>
>
> [Integrity Check]
> [x] Check database integrity
> (*) Include indexes
> [ ] Attempt to repair any minor problems
> ( ) Excluded indexes
>
> [ ] Perform these tests before backing up the database or transaction
log.
>
> Occurs every 1 week(s) on Sunday, at 12:00:00 AM.
>
>
>
> [Complete Backup]
> [x] Backup the database as part of the maintenance plan
> [x] Verify the integrity of the backup upon completion
>
> ( ) Tape (grayed out)
> ( ) Disk
> ( ) Use the default backup directory
> (*) Use this directory (backup directory)
>
> [x] Create a sub-directory for each database
> [x] Remove files older than 2 weeks
>
> Backup extension: BAK
>
> Occurs every 1 week(s) on Sunday, at 2:00:00 AM
>
>
> [Transaction Log Backup]
> [x] Backup the transaction log of the database as part of the maintena
nce
> plan
> [x] Verify the integrity of the backup upon completion
>
> ( ) Tape (grayed out)
> ( ) Disk
> ( ) Use the default backup directory
> (*) Use this directory (backup directory)
>
> [x] Create a sub-directory for each database
> [x] Remove files older than 2 weeks
>
> Backup extension: TRN
>
> Occurs every 1 day(s), every 4 hour(s) between 12:15:00 AM and 6:59:59 AM.
>
>
> The reason for limiting transaction log backups to the night was that we
> found they were negatively impacting website performance.
>
> Hopefully that makes sense but please let me know if you have questions.
>
> Thanks,
> Brad
>
>
> "Arnie Rowland" <arnie@.1568.com> wrote in message
> news:uQNhHHmEHHA.4808@.TK2MSFTNGP03.phx.gbl...
>|||Does you maintenance plan include more than one database?
I ask, because we are having the same problem and our maintenance plan
specifies 3 databases - where the 1st log file looks fine and the 2nd & 3rd
are quite large.
I just made a post on the subject.|||We have 6 maintenance plans - all of which contain about 60 databases each.
"JayKon" <JayKon@.discussions.microsoft.com> wrote in message
news:EF1DFA32-E412-4A9D-850E-68783CF8BDA0@.microsoft.com...
> Does you maintenance plan include more than one database?
> I ask, because we are having the same problem and our maintenance plan
> specifies 3 databases - where the 1st log file looks fine and the 2nd &
> 3rd
> are quite large.
> I just made a post on the subject.|||We have several DB servers all experiencing this problem. They are all
dedicated SQL servers though - no other applications running on them.
The servers are running dual xeon processors with 8GB of RAM. Some of the
servers have a handful of very large databases and other servers have a lot
(100-200) small databases. That's not to say the server isn't underpowered
for the load we are placing on it - sometimes the load is quite high and
other times its nominal.
When the Tlog backups were running we would see ASP errors involving SQL
timeouts as well as short disruptions in service.. so that's why we decided
we probably out to limit tlog backups to night.
I'm going to try disabling transaction log backups on Sunday and see if that
improves things. If you have any other ideas please let me know
Thanks,
Brad
"Arnie Rowland" <arnie@.1568.com> wrote in message
news:uuYyNXxEHHA.4508@.TK2MSFTNGP02.phx.gbl...
> From your statement that TLog backups impact the website performance, it
> sounds like the SQL Server is running on the same box as the Web Server
> AND it must also be an 'underpowered' server. (I've often seen TLog
> backups on multiGB databases having lots of activity take only seconds
> when done hourly -and the users never realized anything was different.)
> For your current schedule, I would make sure that there is NO TLog backup
> on Sunday -it is most likely is happening before the optimization and FULL
> Backup.
> --
> Arnie Rowland, Ph.D.
> Westwood Consulting, Inc
> Most good judgment comes from experience.
> Most experience comes from bad judgment.
> - Anonymous
> You can't help someone get up a hill without getting a little closer to
> the top yourself.
> - H. Norman Schwarzkopf
>
> "Brad Baker" <brad@.nospam.nospam> wrote in message
> news:uhAuaUoEHHA.4024@.TK2MSFTNGP04.phx.gbl...
>

Large transaction log backups

I have a maintenance plans set up for a few of my databases where I am
running a full backup on Sundays, followed by transaction log backups each
day of the week. As far as I understand it, each transaction log should
then be backing up transactions made since the last backup (whether that's a
full or transaction).
What I'm actually seeing though is that the first transaction log backup
after each full one is far larger than I'm expecting (in comparison to the
size of the database anyway).
For example, one of those is producing backup files of these sizes:
06/05/2007 02:12 857,955,840 ADM_db_200705060200.BAK
07/05/2007 00:12 1,313,012,224 ADM_tlog_200705070000.TRN
08/05/2007 00:03 611,840 ADM_tlog_200705080001.TRN
09/05/2007 00:03 5,133,824 ADM_tlog_200705090001.TRN
10/05/2007 00:02 6,510,080 ADM_tlog_200705100000.TRN
11/05/2007 00:03 10,966,528 ADM_tlog_200705110001.TRN
12/05/2007 00:02 10,376,704 ADM_tlog_200705120000.TRN
13/05/2007 02:20 860,951,040 ADM_db_200705130201.BAK
14/05/2007 00:06 428,621,312 ADM_tlog_200705140002.TRN
15/05/2007 00:02 9,046,528 ADM_tlog_200705150000.TRN
16/05/2007 00:02 5,048,832 ADM_tlog_200705160000.TRN
17/05/2007 00:03 13,699,584 ADM_tlog_200705170000.TRN
18/05/2007 00:04 92,212,736 ADM_tlog_200705180000.TRN
19/05/2007 00:03 32,824,832 ADM_tlog_200705190002.TRN
20/05/2007 02:06 864,737,792 ADM_db_200705200202.BAK
21/05/2007 00:05 393,709,056 ADM_tlog_200705210002.TRN
22/05/2007 00:04 17,836,544 ADM_tlog_200705220003.TRN
I'm think I'm misunderstanding the process somewhere. Could anyone clarify?"Rob Oldfield" <blah@.blah.com> wrote in message
news:%23mRHK8EnHHA.3520@.TK2MSFTNGP04.phx.gbl...
>I have a maintenance plans set up for a few of my databases where I am
<Snip>
Please ignore. I've found lots of answers by just Googling. Apologies... I
should have done that first.|||In a Full or Bulk logged recovery model you should plan at regular interval a
clearing of the transaction log, because the full backup in this model
does'nt automatically truncate the log.
The Backup LOG backs up the current consistency of the transaction log
starting from the last successful backup log.
Gilberto Zampatti
"Rob Oldfield" wrote:
> I have a maintenance plans set up for a few of my databases where I am
> running a full backup on Sundays, followed by transaction log backups each
> day of the week. As far as I understand it, each transaction log should
> then be backing up transactions made since the last backup (whether that's a
> full or transaction).
> What I'm actually seeing though is that the first transaction log backup
> after each full one is far larger than I'm expecting (in comparison to the
> size of the database anyway).
> For example, one of those is producing backup files of these sizes:
> 06/05/2007 02:12 857,955,840 ADM_db_200705060200.BAK
> 07/05/2007 00:12 1,313,012,224 ADM_tlog_200705070000.TRN
> 08/05/2007 00:03 611,840 ADM_tlog_200705080001.TRN
> 09/05/2007 00:03 5,133,824 ADM_tlog_200705090001.TRN
> 10/05/2007 00:02 6,510,080 ADM_tlog_200705100000.TRN
> 11/05/2007 00:03 10,966,528 ADM_tlog_200705110001.TRN
> 12/05/2007 00:02 10,376,704 ADM_tlog_200705120000.TRN
> 13/05/2007 02:20 860,951,040 ADM_db_200705130201.BAK
> 14/05/2007 00:06 428,621,312 ADM_tlog_200705140002.TRN
> 15/05/2007 00:02 9,046,528 ADM_tlog_200705150000.TRN
> 16/05/2007 00:02 5,048,832 ADM_tlog_200705160000.TRN
> 17/05/2007 00:03 13,699,584 ADM_tlog_200705170000.TRN
> 18/05/2007 00:04 92,212,736 ADM_tlog_200705180000.TRN
> 19/05/2007 00:03 32,824,832 ADM_tlog_200705190002.TRN
> 20/05/2007 02:06 864,737,792 ADM_db_200705200202.BAK
> 21/05/2007 00:05 393,709,056 ADM_tlog_200705210002.TRN
> 22/05/2007 00:04 17,836,544 ADM_tlog_200705220003.TRN
> I'm think I'm misunderstanding the process somewhere. Could anyone clarify?
>
>

Wednesday, March 7, 2012

Large transaction log backups

I have a maintenance plans set up for a few of my databases where I am
running a full backup on Sundays, followed by transaction log backups each
day of the week. As far as I understand it, each transaction log should
then be backing up transactions made since the last backup (whether that's a
full or transaction).
What I'm actually seeing though is that the first transaction log backup
after each full one is far larger than I'm expecting (in comparison to the
size of the database anyway).
For example, one of those is producing backup files of these sizes:
06/05/2007 02:12 857,955,840 ADM_db_200705060200.BAK
07/05/2007 00:12 1,313,012,224 ADM_tlog_200705070000.TRN
08/05/2007 00:03 611,840 ADM_tlog_200705080001.TRN
09/05/2007 00:03 5,133,824 ADM_tlog_200705090001.TRN
10/05/2007 00:02 6,510,080 ADM_tlog_200705100000.TRN
11/05/2007 00:03 10,966,528 ADM_tlog_200705110001.TRN
12/05/2007 00:02 10,376,704 ADM_tlog_200705120000.TRN
13/05/2007 02:20 860,951,040 ADM_db_200705130201.BAK
14/05/2007 00:06 428,621,312 ADM_tlog_200705140002.TRN
15/05/2007 00:02 9,046,528 ADM_tlog_200705150000.TRN
16/05/2007 00:02 5,048,832 ADM_tlog_200705160000.TRN
17/05/2007 00:03 13,699,584 ADM_tlog_200705170000.TRN
18/05/2007 00:04 92,212,736 ADM_tlog_200705180000.TRN
19/05/2007 00:03 32,824,832 ADM_tlog_200705190002.TRN
20/05/2007 02:06 864,737,792 ADM_db_200705200202.BAK
21/05/2007 00:05 393,709,056 ADM_tlog_200705210002.TRN
22/05/2007 00:04 17,836,544 ADM_tlog_200705220003.TRN
I'm think I'm misunderstanding the process somewhere. Could anyone clarify?"Rob Oldfield" <blah@.blah.com> wrote in message
news:%23mRHK8EnHHA.3520@.TK2MSFTNGP04.phx.gbl...
>I have a maintenance plans set up for a few of my databases where I am
<Snip>
Please ignore. I've found lots of answers by just Googling. Apologies... I
should have done that first.|||In a Full or Bulk logged recovery model you should plan at regular interval
a
clearing of the transaction log, because the full backup in this model
does'nt automatically truncate the log.
The Backup LOG backs up the current consistency of the transaction log
starting from the last successful backup log.
Gilberto Zampatti
"Rob Oldfield" wrote:

> I have a maintenance plans set up for a few of my databases where I am
> running a full backup on Sundays, followed by transaction log backups each
> day of the week. As far as I understand it, each transaction log should
> then be backing up transactions made since the last backup (whether that's
a
> full or transaction).
> What I'm actually seeing though is that the first transaction log backup
> after each full one is far larger than I'm expecting (in comparison to the
> size of the database anyway).
> For example, one of those is producing backup files of these sizes:
> 06/05/2007 02:12 857,955,840 ADM_db_200705060200.BAK
> 07/05/2007 00:12 1,313,012,224 ADM_tlog_200705070000.TRN
> 08/05/2007 00:03 611,840 ADM_tlog_200705080001.TRN
> 09/05/2007 00:03 5,133,824 ADM_tlog_200705090001.TRN
> 10/05/2007 00:02 6,510,080 ADM_tlog_200705100000.TRN
> 11/05/2007 00:03 10,966,528 ADM_tlog_200705110001.TRN
> 12/05/2007 00:02 10,376,704 ADM_tlog_200705120000.TRN
> 13/05/2007 02:20 860,951,040 ADM_db_200705130201.BAK
> 14/05/2007 00:06 428,621,312 ADM_tlog_200705140002.TRN
> 15/05/2007 00:02 9,046,528 ADM_tlog_200705150000.TRN
> 16/05/2007 00:02 5,048,832 ADM_tlog_200705160000.TRN
> 17/05/2007 00:03 13,699,584 ADM_tlog_200705170000.TRN
> 18/05/2007 00:04 92,212,736 ADM_tlog_200705180000.TRN
> 19/05/2007 00:03 32,824,832 ADM_tlog_200705190002.TRN
> 20/05/2007 02:06 864,737,792 ADM_db_200705200202.BAK
> 21/05/2007 00:05 393,709,056 ADM_tlog_200705210002.TRN
> 22/05/2007 00:04 17,836,544 ADM_tlog_200705220003.TRN
> I'm think I'm misunderstanding the process somewhere. Could anyone clarif
y?
>
>

Large Transaction Log Backup after Database Backup

On SQL Server 2000 I have DB maintenance plans to backup databases and
transaction logs. The database is backed up daily at 02:00 hours and
transaction logs backed up every 2 hours (excluding 02:00 hours).The problem
I have is that the first backup of the transaction log after the database
backup is huge. Eg: normal transaction log backups are approx 100mb but the
abnormal one is approx 13gb. The database size is approx 20gb. I can shrink
the transaction log without problem but it expands again after the database
backup.
Does anyone have an explanation for this and is there a resolution?
Thanks
SteveBMy guess is that you either defrag the indexes and/or shrink the database fi
les. Both of these operations are
logged in the transaction log.
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
http://www.solidqualitylearning.com/
"SteveB" <SteveB@.discussions.microsoft.com> wrote in message
news:4BA25F24-0289-4808-B351-D26E2CB6C988@.microsoft.com...
> On SQL Server 2000 I have DB maintenance plans to backup databases and
> transaction logs. The database is backed up daily at 02:00 hours and
> transaction logs backed up every 2 hours (excluding 02:00 hours).The probl
em
> I have is that the first backup of the transaction log after the database
> backup is huge. Eg: normal transaction log backups are approx 100mb but th
e
> abnormal one is approx 13gb. The database size is approx 20gb. I can shrin
k
> the transaction log without problem but it expands again after the databas
e
> backup.
> Does anyone have an explanation for this and is there a resolution?
> Thanks
> SteveB|||Your database maintenance plan not only backs up the database, but it can
also reindex all the indexes on the tables or shrink the data file. If you
have either of these last two options ('Reorganize data and index pages' and
'Remove unused space from database files' respectively) checked on the
second page of the maintenance plan wizard, you might want to uncheck them
and create a maintenance plan that runs on a less regular schedule, like
once a week.
Shrinking the database is not useful in a production environment in general,
so you can start with unchecking that if you have it checked and see what
the result is.
Reindexing is something you should do on a regular basis, but as a rough
guide, once a week is enough for most moderately busy systems.
Jacco Schalkwijk
SQL Server MVP
"SteveB" <SteveB@.discussions.microsoft.com> wrote in message
news:4BA25F24-0289-4808-B351-D26E2CB6C988@.microsoft.com...
> On SQL Server 2000 I have DB maintenance plans to backup databases and
> transaction logs. The database is backed up daily at 02:00 hours and
> transaction logs backed up every 2 hours (excluding 02:00 hours).The
> problem
> I have is that the first backup of the transaction log after the database
> backup is huge. Eg: normal transaction log backups are approx 100mb but
> the
> abnormal one is approx 13gb. The database size is approx 20gb. I can
> shrink
> the transaction log without problem but it expands again after the
> database
> backup.
> Does anyone have an explanation for this and is there a resolution?
> Thanks
> SteveB|||In article <OjsO$X7fEHA.3928@.TK2MSFTNGP11.phx.gbl>,
jacco.please.reply@.to.newsgroups.mvps.org.invalid says...
> Your database maintenance plan not only backs up the database, but it can
> also reindex all the indexes on the tables or shrink the data file. If you
> have either of these last two options ('Reorganize data and index pages' a
nd
> 'Remove unused space from database files' respectively) checked on the
> second page of the maintenance plan wizard, you might want to uncheck them
> and create a maintenance plan that runs on a less regular schedule, like
> once a week.
> Shrinking the database is not useful in a production environment in genera
l,
> so you can start with unchecking that if you have it checked and see what
> the result is.
> Reindexing is something you should do on a regular basis, but as a rough
> guide, once a week is enough for most moderately busy systems.
What do you recommend for 24/7 systems? Just INDEXDEFRAG in place of
REINDEX?|||24/7 you have little choice but to use INDEXDEFRAG. DBREINDEX takes out an
exclusive lock on the table it is reindexing and makes it unavailable to
other users. In contrast, INDEXDEFRAG uses short transactions and doesn't
make the table unavailable.
Jacco Schalkwijk
SQL Server MVP
"Brad" <brad@.seesigifthere.com> wrote in message
news:MPG.1b84088229f26a90989695@.news...
> In article <OjsO$X7fEHA.3928@.TK2MSFTNGP11.phx.gbl>,
> jacco.please.reply@.to.newsgroups.mvps.org.invalid says...
> What do you recommend for 24/7 systems? Just INDEXDEFRAG in place of
> REINDEX?|||Hi Guys
Thanks for the responses. I did have similar thoughts. I am doing some
re-indexing, but this takes place at midnight and completes well before the
backup at 02:00 so I would not expect a large log after the database backup.
Will do a trial run on test database with no maintenance activities tonite
and see what results.
"Tibor Karaszi" wrote:

> My guess is that you either defrag the indexes and/or shrink the database
files. Both of these operations are
> logged in the transaction log.
> --
> Tibor Karaszi, SQL Server MVP
> http://www.karaszi.com/sqlserver/default.asp
> http://www.solidqualitylearning.com/
>
> "SteveB" <SteveB@.discussions.microsoft.com> wrote in message
> news:4BA25F24-0289-4808-B351-D26E2CB6C988@.microsoft.com...
>
>|||The database and log backups are independent of each other. Backing up the
database doesn't have any effect the transaction log, so the extra
transaction log records that are created at midnight (after the 00:00
transaction log backup, I assume) are still there when you next backup the
transaction log at 04:00.
Jacco Schalkwijk
SQL Server MVP
"SteveB" <SteveB@.discussions.microsoft.com> wrote in message
news:413EC866-0D72-4FA1-8A83-A21DDB4656F3@.microsoft.com...[vbcol=seagreen]
> Hi Guys
> Thanks for the responses. I did have similar thoughts. I am doing some
> re-indexing, but this takes place at midnight and completes well before
> the
> backup at 02:00 so I would not expect a large log after the database
> backup.
> Will do a trial run on test database with no maintenance activities tonite
> and see what results.
> "Tibor Karaszi" wrote:
>|||Jacco
Thanks for response. But my understanding was that the transaction log was
truncated after a full database backup. So I would expect the transaction
log to be truncated at 02:00 hours. Whilst I don't expect the physical size
of the transaction log to change I do expect the size of the transaction log
backup to be minimal for the 04:00 backup.
"Jacco Schalkwijk" wrote:

> The database and log backups are independent of each other. Backing up the
> database doesn't have any effect the transaction log, so the extra
> transaction log records that are created at midnight (after the 00:00
> transaction log backup, I assume) are still there when you next backup the
> transaction log at 04:00.
> --
> Jacco Schalkwijk
> SQL Server MVP
>
> "SteveB" <SteveB@.discussions.microsoft.com> wrote in message
> news:413EC866-0D72-4FA1-8A83-A21DDB4656F3@.microsoft.com...
>
>|||Steve,
I'm afraid your understanding of the matter was wrong. Try the following
script and see for yourself that the database backup doesn't truncate the
transaction log:
CREATE DATABASE steve
GO
ALTER DATABASE steve SET RECOVERY FULL
GO
USE steve
GO
BACKUP DATABASE steve TO DISK = 'steve.bak'
-- Need an initial backup to 'switch on' FULL RECOVERY
GO
DBCC SQLPERF ( LOGSPACE )
GO
SELECT s0.* INTO test_table
FROM sysobjects s0, sysobjects s1, sysobjects s2--, sysobjects s3
GO
DBCC SQLPERF ( LOGSPACE )
GO
BACKUP DATABASE steve TO DISK = 'steve.bak'
GO
DBCC SQLPERF ( LOGSPACE )
GO
USE master
GO
DROP DATABASE steve
Jacco Schalkwijk
SQL Server MVP
"SteveB" <SteveB@.discussions.microsoft.com> wrote in message
news:BC1602B4-DC3B-4E61-9477-7D61FE8055E7@.microsoft.com...[vbcol=seagreen]
> Jacco
> Thanks for response. But my understanding was that the transaction log was
> truncated after a full database backup. So I would expect the transaction
> log to be truncated at 02:00 hours. Whilst I don't expect the physical
> size
> of the transaction log to change I do expect the size of the transaction
> log
> backup to be minimal for the 04:00 backup.
> "Jacco Schalkwijk" wrote:
>

Large Transaction Log Backup after Database Backup

On SQL Server 2000 I have DB maintenance plans to backup databases and
transaction logs. The database is backed up daily at 02:00 hours and
transaction logs backed up every 2 hours (excluding 02:00 hours).The problem
I have is that the first backup of the transaction log after the database
backup is huge. Eg: normal transaction log backups are approx 100mb but the
abnormal one is approx 13gb. The database size is approx 20gb. I can shrink
the transaction log without problem but it expands again after the database
backup.
Does anyone have an explanation for this and is there a resolution?
Thanks
SteveB
My guess is that you either defrag the indexes and/or shrink the database files. Both of these operations are
logged in the transaction log.
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
http://www.solidqualitylearning.com/
"SteveB" <SteveB@.discussions.microsoft.com> wrote in message
news:4BA25F24-0289-4808-B351-D26E2CB6C988@.microsoft.com...
> On SQL Server 2000 I have DB maintenance plans to backup databases and
> transaction logs. The database is backed up daily at 02:00 hours and
> transaction logs backed up every 2 hours (excluding 02:00 hours).The problem
> I have is that the first backup of the transaction log after the database
> backup is huge. Eg: normal transaction log backups are approx 100mb but the
> abnormal one is approx 13gb. The database size is approx 20gb. I can shrink
> the transaction log without problem but it expands again after the database
> backup.
> Does anyone have an explanation for this and is there a resolution?
> Thanks
> SteveB
|||Your database maintenance plan not only backs up the database, but it can
also reindex all the indexes on the tables or shrink the data file. If you
have either of these last two options ('Reorganize data and index pages' and
'Remove unused space from database files' respectively) checked on the
second page of the maintenance plan wizard, you might want to uncheck them
and create a maintenance plan that runs on a less regular schedule, like
once a week.
Shrinking the database is not useful in a production environment in general,
so you can start with unchecking that if you have it checked and see what
the result is.
Reindexing is something you should do on a regular basis, but as a rough
guide, once a week is enough for most moderately busy systems.
Jacco Schalkwijk
SQL Server MVP
"SteveB" <SteveB@.discussions.microsoft.com> wrote in message
news:4BA25F24-0289-4808-B351-D26E2CB6C988@.microsoft.com...
> On SQL Server 2000 I have DB maintenance plans to backup databases and
> transaction logs. The database is backed up daily at 02:00 hours and
> transaction logs backed up every 2 hours (excluding 02:00 hours).The
> problem
> I have is that the first backup of the transaction log after the database
> backup is huge. Eg: normal transaction log backups are approx 100mb but
> the
> abnormal one is approx 13gb. The database size is approx 20gb. I can
> shrink
> the transaction log without problem but it expands again after the
> database
> backup.
> Does anyone have an explanation for this and is there a resolution?
> Thanks
> SteveB
|||In article <OjsO$X7fEHA.3928@.TK2MSFTNGP11.phx.gbl>,
jacco.please.reply@.to.newsgroups.mvps.org.invalid says...
> Your database maintenance plan not only backs up the database, but it can
> also reindex all the indexes on the tables or shrink the data file. If you
> have either of these last two options ('Reorganize data and index pages' and
> 'Remove unused space from database files' respectively) checked on the
> second page of the maintenance plan wizard, you might want to uncheck them
> and create a maintenance plan that runs on a less regular schedule, like
> once a week.
> Shrinking the database is not useful in a production environment in general,
> so you can start with unchecking that if you have it checked and see what
> the result is.
> Reindexing is something you should do on a regular basis, but as a rough
> guide, once a week is enough for most moderately busy systems.
What do you recommend for 24/7 systems? Just INDEXDEFRAG in place of
REINDEX?
|||24/7 you have little choice but to use INDEXDEFRAG. DBREINDEX takes out an
exclusive lock on the table it is reindexing and makes it unavailable to
other users. In contrast, INDEXDEFRAG uses short transactions and doesn't
make the table unavailable.
Jacco Schalkwijk
SQL Server MVP
"Brad" <brad@.seesigifthere.com> wrote in message
news:MPG.1b84088229f26a90989695@.news...
> In article <OjsO$X7fEHA.3928@.TK2MSFTNGP11.phx.gbl>,
> jacco.please.reply@.to.newsgroups.mvps.org.invalid says...
> What do you recommend for 24/7 systems? Just INDEXDEFRAG in place of
> REINDEX?
|||Hi Guys
Thanks for the responses. I did have similar thoughts. I am doing some
re-indexing, but this takes place at midnight and completes well before the
backup at 02:00 so I would not expect a large log after the database backup.
Will do a trial run on test database with no maintenance activities tonite
and see what results.
"Tibor Karaszi" wrote:

> My guess is that you either defrag the indexes and/or shrink the database files. Both of these operations are
> logged in the transaction log.
> --
> Tibor Karaszi, SQL Server MVP
> http://www.karaszi.com/sqlserver/default.asp
> http://www.solidqualitylearning.com/
>
> "SteveB" <SteveB@.discussions.microsoft.com> wrote in message
> news:4BA25F24-0289-4808-B351-D26E2CB6C988@.microsoft.com...
>
>
|||The database and log backups are independent of each other. Backing up the
database doesn't have any effect the transaction log, so the extra
transaction log records that are created at midnight (after the 00:00
transaction log backup, I assume) are still there when you next backup the
transaction log at 04:00.
Jacco Schalkwijk
SQL Server MVP
"SteveB" <SteveB@.discussions.microsoft.com> wrote in message
news:413EC866-0D72-4FA1-8A83-A21DDB4656F3@.microsoft.com...[vbcol=seagreen]
> Hi Guys
> Thanks for the responses. I did have similar thoughts. I am doing some
> re-indexing, but this takes place at midnight and completes well before
> the
> backup at 02:00 so I would not expect a large log after the database
> backup.
> Will do a trial run on test database with no maintenance activities tonite
> and see what results.
> "Tibor Karaszi" wrote:
|||Jacco
Thanks for response. But my understanding was that the transaction log was
truncated after a full database backup. So I would expect the transaction
log to be truncated at 02:00 hours. Whilst I don't expect the physical size
of the transaction log to change I do expect the size of the transaction log
backup to be minimal for the 04:00 backup.
"Jacco Schalkwijk" wrote:

> The database and log backups are independent of each other. Backing up the
> database doesn't have any effect the transaction log, so the extra
> transaction log records that are created at midnight (after the 00:00
> transaction log backup, I assume) are still there when you next backup the
> transaction log at 04:00.
> --
> Jacco Schalkwijk
> SQL Server MVP
>
> "SteveB" <SteveB@.discussions.microsoft.com> wrote in message
> news:413EC866-0D72-4FA1-8A83-A21DDB4656F3@.microsoft.com...
>
>
|||Steve,
I'm afraid your understanding of the matter was wrong. Try the following
script and see for yourself that the database backup doesn't truncate the
transaction log:
CREATE DATABASE steve
GO
ALTER DATABASE steve SET RECOVERY FULL
GO
USE steve
GO
BACKUP DATABASE steve TO DISK = 'steve.bak'
-- Need an initial backup to 'switch on' FULL RECOVERY
GO
DBCC SQLPERF ( LOGSPACE )
GO
SELECT s0.* INTO test_table
FROM sysobjects s0, sysobjects s1, sysobjects s2--, sysobjects s3
GO
DBCC SQLPERF ( LOGSPACE )
GO
BACKUP DATABASE steve TO DISK = 'steve.bak'
GO
DBCC SQLPERF ( LOGSPACE )
GO
USE master
GO
DROP DATABASE steve
Jacco Schalkwijk
SQL Server MVP
"SteveB" <SteveB@.discussions.microsoft.com> wrote in message
news:BC1602B4-DC3B-4E61-9477-7D61FE8055E7@.microsoft.com...[vbcol=seagreen]
> Jacco
> Thanks for response. But my understanding was that the transaction log was
> truncated after a full database backup. So I would expect the transaction
> log to be truncated at 02:00 hours. Whilst I don't expect the physical
> size
> of the transaction log to change I do expect the size of the transaction
> log
> backup to be minimal for the 04:00 backup.
> "Jacco Schalkwijk" wrote: