Showing posts with label transaction. Show all posts
Showing posts with label transaction. Show all posts

Friday, March 23, 2012

Frustrating Backup/Restore Issue

Im running SQL Server 2005

I set up 4 maintenance plans:

1) Full production DBS backup every day at midnight

2) Transaction Backups every 10 minutes starting at 12:10 AM ending at 11:59 PM

3) Full System DBS backups

4) Maintenance on production database: index rebuild, stats, etc.

All the files are sucessfully there but when I try to restore the backup to a new database to make sure its valid it seems I can restore the full backup but the transaction logs seem to be completely disassociated with the full backup. Says there not from the same backup set

I tried the same thing earlier just taking a full backup and then transaction logs in two separate plans and it worked fine. Sometimes it seems to sync up and sometimes it does not. Any help on this issue would be much appreciated

Thanks

Scott

What you're attempting should work just fine, so we need to figure out exactly where it's going wrong.

Information that will help us figure that out:

The exact error text, cut and pasted if possible. That allows us to track down what code is generating the error.|||

Okay first and foremost here is the error message I can when I try to restore the full backup with the first transaction log after the full backup. (Im having trouble copying and pasting) its says:

The volume on Device 'S:\Microsoft SQL Server\MSSQL.1\MSSQL\backup\radb\radb_backup_200609281200.trn' is not part of a multiple family media set. BACKUP WITH FORMAT can be used to form a new media set. RESTORE HEADERONLY is terminating abnormally. (Microsoft SQL Server, Error: 3259)

- I am using separate files and separate database maintenance plans (since they need to be schedule at different times) for the full backup and transactional backups

- I am using separate transaction files for each log and not appending

- I am backing up to disk and not directly to tape

- I am using Management Studio and maintenance plans for these operations

Thanks

Scott

|||

It sounds from your description and the error message as if you might be attempting to restore the full backup and the log backup in one command. If that's the case, this is your problem.

You need to restore the full backup first, WITH NORECOVERY, and then restore transaction log backups one by one in order, specifying WITH NORECOVERY until you've got them all applied. At that point you can restore with recovery, and you're done.

|||

Okay I understand what your saying but ...

I have gotten it to work where I can restore and check the full backup with the transaction logs. Its worked twice like that and hasnt worked twice so its the consistency that bothers me. In the meantime I will try to restore the full backup first and then apply the logs.

sql

Frustrating Backup/Restore Issue

Im running SQL Server 2005

I set up 4 maintenance plans:

1) Full production DBS backup every day at midnight

2) Transaction Backups every 10 minutes starting at 12:10 AM ending at 11:59 PM

3) Full System DBS backups

4) Maintenance on production database: index rebuild, stats, etc.

All the files are sucessfully there but when I try to restore the backup to a new database to make sure its valid it seems I can restore the full backup but the transaction logs seem to be completely disassociated with the full backup. Says there not from the same backup set

I tried the same thing earlier just taking a full backup and then transaction logs in two separate plans and it worked fine. Sometimes it seems to sync up and sometimes it does not. Any help on this issue would be much appreciated

Thanks

Scott

What you're attempting should work just fine, so we need to figure out exactly where it's going wrong.

Information that will help us figure that out:

The exact error text, cut and pasted if possible. That allows us to track down what code is generating the error.|||

Okay first and foremost here is the error message I can when I try to restore the full backup with the first transaction log after the full backup. (Im having trouble copying and pasting) its says:

The volume on Device 'S:\Microsoft SQL Server\MSSQL.1\MSSQL\backup\radb\radb_backup_200609281200.trn' is not part of a multiple family media set. BACKUP WITH FORMAT can be used to form a new media set. RESTORE HEADERONLY is terminating abnormally. (Microsoft SQL Server, Error: 3259)

- I am using separate files and separate database maintenance plans (since they need to be schedule at different times) for the full backup and transactional backups

- I am using separate transaction files for each log and not appending

- I am backing up to disk and not directly to tape

- I am using Management Studio and maintenance plans for these operations

Thanks

Scott

|||

It sounds from your description and the error message as if you might be attempting to restore the full backup and the log backup in one command. If that's the case, this is your problem.

You need to restore the full backup first, WITH NORECOVERY, and then restore transaction log backups one by one in order, specifying WITH NORECOVERY until you've got them all applied. At that point you can restore with recovery, and you're done.

|||

Okay I understand what your saying but ...

I have gotten it to work where I can restore and check the full backup with the transaction logs. Its worked twice like that and hasnt worked twice so its the consistency that bothers me. In the meantime I will try to restore the full backup first and then apply the logs.

FrontPage/SharePoint Designer Search and Replace Fills Transaction

When we run a search and replace across all pages in one our web site (104
pages), my transaction log on the SQL Server grows by about 200 MB of space!
This has caused major system headaches - the transaction log fills, causes
IIS to fail, causing my clients using FP / SP Designer not to be able to save
the files they have opened / edited.
That database is 400MB in size while the Transaction Log is now over 6GB.
and the minimum Log is now 6GB too. We can't keep having this log grow
exponential like this.
Also - In the event log, I see that there a couple of 'webparts' that are
failing on the global search and replace: WSS 2.0 Error: Failing in loading
assemble Customer.WebParts, Version=1.0.2.4.
We're running SQL Server 2000 SP4, on a Windows 2003 Server with WSS 2.0
using the latest versions of FrontPage and SharePoint Designer.
Thoughts?
After posting this, I started to search the WSS / Sharepoint forums (instead
of just SQL Server) and see that this is a common issue and found a variety
of ways to correct this.
Iza
"iZa" wrote:

> When we run a search and replace across all pages in one our web site (104
> pages), my transaction log on the SQL Server grows by about 200 MB of space!
> This has caused major system headaches - the transaction log fills, causes
> IIS to fail, causing my clients using FP / SP Designer not to be able to save
> the files they have opened / edited.
> That database is 400MB in size while the Transaction Log is now over 6GB.
> and the minimum Log is now 6GB too. We can't keep having this log grow
> exponential like this.
> Also - In the event log, I see that there a couple of 'webparts' that are
> failing on the global search and replace: WSS 2.0 Error: Failing in loading
> assemble Customer.WebParts, Version=1.0.2.4.
> We're running SQL Server 2000 SP4, on a Windows 2003 Server with WSS 2.0
> using the latest versions of FrontPage and SharePoint Designer.
> Thoughts?

FrontPage/SharePoint Designer Search and Replace Fills Transaction

When we run a search and replace across all pages in one our web site (104
pages), my transaction log on the SQL Server grows by about 200 MB of space!
This has caused major system headaches - the transaction log fills, causes
IIS to fail, causing my clients using FP / SP Designer not to be able to save
the files they have opened / edited.
That database is 400MB in size while the Transaction Log is now over 6GB.
and the minimum Log is now 6GB too. We can't keep having this log grow
exponential like this.
Also - In the event log, I see that there a couple of 'webparts' that are
failing on the global search and replace: WSS 2.0 Error: Failing in loading
assemble Customer.WebParts, Version=1.0.2.4.
We're running SQL Server 2000 SP4, on a Windows 2003 Server with WSS 2.0
using the latest versions of FrontPage and SharePoint Designer.
Thoughts?After posting this, I started to search the WSS / Sharepoint forums (instead
of just SQL Server) and see that this is a common issue and found a variety
of ways to correct this.
Iza
"iZa" wrote:
> When we run a search and replace across all pages in one our web site (104
> pages), my transaction log on the SQL Server grows by about 200 MB of space!
> This has caused major system headaches - the transaction log fills, causes
> IIS to fail, causing my clients using FP / SP Designer not to be able to save
> the files they have opened / edited.
> That database is 400MB in size while the Transaction Log is now over 6GB.
> and the minimum Log is now 6GB too. We can't keep having this log grow
> exponential like this.
> Also - In the event log, I see that there a couple of 'webparts' that are
> failing on the global search and replace: WSS 2.0 Error: Failing in loading
> assemble Customer.WebParts, Version=1.0.2.4.
> We're running SQL Server 2000 SP4, on a Windows 2003 Server with WSS 2.0
> using the latest versions of FrontPage and SharePoint Designer.
> Thoughts?sql

FrontPage/SharePoint Designer Search and Replace Fills Transaction

When we run a search and replace across all pages in one our web site (104
pages), my transaction log on the SQL Server grows by about 200 MB of space!
This has caused major system headaches - the transaction log fills, causes
IIS to fail, causing my clients using FP / SP Designer not to be able to sav
e
the files they have opened / edited.
That database is 400MB in size while the Transaction Log is now over 6GB.
and the minimum Log is now 6GB too. We can't keep having this log grow
exponential like this.
Also - In the event log, I see that there a couple of 'webparts' that are
failing on the global search and replace: WSS 2.0 Error: Failing in loading
assemble Customer.WebParts, Version=1.0.2.4.
We're running SQL Server 2000 SP4, on a Windows 2003 Server with WSS 2.0
using the latest versions of FrontPage and SharePoint Designer.
Thoughts?After posting this, I started to search the WSS / Sharepoint forums (instead
of just SQL Server) and see that this is a common issue and found a variety
of ways to correct this.
Iza
"iZa" wrote:

> When we run a search and replace across all pages in one our web site (104
> pages), my transaction log on the SQL Server grows by about 200 MB of spac
e!
> This has caused major system headaches - the transaction log fills, causes
> IIS to fail, causing my clients using FP / SP Designer not to be able to s
ave
> the files they have opened / edited.
> That database is 400MB in size while the Transaction Log is now over 6GB.
> and the minimum Log is now 6GB too. We can't keep having this log grow
> exponential like this.
> Also - In the event log, I see that there a couple of 'webparts' that are
> failing on the global search and replace: WSS 2.0 Error: Failing in loadin
g
> assemble Customer.WebParts, Version=1.0.2.4.
> We're running SQL Server 2000 SP4, on a Windows 2003 Server with WSS 2.0
> using the latest versions of FrontPage and SharePoint Designer.
> Thoughts?

Wednesday, March 21, 2012

from OLTP, DW, SSAS, to Report

Transaction db (such as AdentureWorks) changes all the time. If I'd like to see Report updated every day, DW and SSAS should be updated every night. Is there any sample (DTS) or ducoment for this issue?

Thanks!

-Z

I'd suggest you take a look at The Microsoft Datawarehouse Toolkit written by Joy Mundy and Warren Thornthwaite from the Kimball Group. It walks through all of the layers of a BI solution using Microsoft technology (from ETL to DW to SSAS to reporting) and discusses issues such as data latency, ETL schedules, near real-time updates, etc.

HTH,

Dave Fackler

|||

Thanks, Dave! It helps a lot!

-Z

Monday, March 19, 2012

from AdventureWorks to AdventureWorksDW

AdventureWorks and AdventureWorksDW are good samples for transaction and dw.

Is there any sample of SSIS package to load data from AdventureWorks to AdventureWorksDW? For example, I'd like to update AdventureWorksDW db everyday from transaction db.

How about if some dimensions changed, like employees, and productions?

Thanks!

-Z

Project REAL has examples.

http://www.microsoft.com/sql/solutions/bi/projectreal.mspx|||

Phil Brammer wrote:

Project REAL has examples.

http://www.microsoft.com/sql/solutions/bi/projectreal.mspx

Phil,

Does it have examples of using AdventureWorks though? I didn't think so. I admit I haven't looked at the Project REALstuff in too much detail.

-Jamie

|||Z,
Project REAL doesn't go against AWDW, but the concepts would be the same...

Another good resource (again not specific to AdventureWorks) is the Ralph Kimball Group Webcast.

Here are some tutorials (have you looked at MSDN at all?) from Microsoft that are against AWDW.|||

Hi, Phil,

Thanks much for your quick response. It helps a lot!

BTW,

Do you happen to know if there is any sample for the daily changes from DW to SSAS?

-Z

|||

ZZhang wrote:

BTW,

Do you happen to know if there is any sample for the daily changes from DW to SSAS?

-Z

That I cannot help with! That's out of my knowledge area!|||I am looking for advetureworkdb to advetureworkdw plus full digram of advetureworkdw

from AdventureWorks to AdventureWorksDW

AdventureWorks and AdventureWorksDW are good samples for transaction and dw.

Is there any sample of SSIS package to load data from AdventureWorks to AdventureWorksDW? For example, I'd like to update AdventureWorksDW db everyday from transaction db.

How about if some dimensions changed, like employees, and productions?

Thanks!

-Z

Project REAL has examples.

http://www.microsoft.com/sql/solutions/bi/projectreal.mspx|||

Phil Brammer wrote:

Project REAL has examples.

http://www.microsoft.com/sql/solutions/bi/projectreal.mspx

Phil,

Does it have examples of using AdventureWorks though? I didn't think so. I admit I haven't looked at the Project REALstuff in too much detail.

-Jamie

|||Z,
Project REAL doesn't go against AWDW, but the concepts would be the same...

Another good resource (again not specific to AdventureWorks) is the Ralph Kimball Group Webcast.

Here are some tutorials (have you looked at MSDN at all?) from Microsoft that are against AWDW.|||

Hi, Phil,

Thanks much for your quick response. It helps a lot!

BTW,

Do you happen to know if there is any sample for the daily changes from DW to SSAS?

-Z

|||

ZZhang wrote:

BTW,

Do you happen to know if there is any sample for the daily changes from DW to SSAS?

-Z

That I cannot help with! That's out of my knowledge area!|||I am looking for advetureworkdb to advetureworkdw plus full digram of advetureworkdw

Monday, March 12, 2012

frequently updated tables

Hi
I have a transaction table that is very frequently updated, so I have no
indexes on it. I also need to be able to run queries against this data on,
for example, a date range. I think the easiest solution would be to extract
data on a daily basis onto another table with indexes. Or should I be looking
at some sort of data warehousing/data cube approach? Any ideas/resources?
Thanks
if your just updating the table i dont see any reason why you couldnt
index that table and run data off of it. and if you would be able to
export it to a different table once a day i'm guess the data your
viewing isnt live data you need to see right away. i'd just index that
table and run queries off of it. just set all the tables your
selecting from 'WITH (NOLOCK)' then it wont matter if a record is
being access at that time. it doesnt sound like your worried about any
type of dirty reads. if it is being inserted into quite frequently you
might have to take another approach or run a job to reindex at night.
i'm not 100% sure of your exact situation. hope that helps.
|||We have been advised in the past that it wasn't a good idea to have indexes
on the transaction table that is being frequently written too i.e. less than
a second between inserts, but I'd still like to query the data. Without some
sort of index, the query ends up doing a full table scan on a massive table,
so I think I need some sort of extract to an indexed version to make these
queries manageable.
"GlennThomas5" wrote:

> if your just updating the table i dont see any reason why you couldnt
> index that table and run data off of it. and if you would be able to
> export it to a different table once a day i'm guess the data your
> viewing isnt live data you need to see right away. i'd just index that
> table and run queries off of it. just set all the tables your
> selecting from 'WITH (NOLOCK)' then it wont matter if a record is
> being access at that time. it doesnt sound like your worried about any
> type of dirty reads. if it is being inserted into quite frequently you
> might have to take another approach or run a job to reindex at night.
> i'm not 100% sure of your exact situation. hope that helps.
>
|||Who ever told you that certainly didn't know what they were talking about.
If you are going to update a row you need to know which row to update
otherwise you scan and most likely lock the entire table. If you need to
query it (which that is what tables are for) and don't want all the rows you
also need an index. The trick is to pick the right column(s) to index and
the correct index type. If you post the DDL for the table and a sample of
the queries you run against it we can help you decide on the proper
indexing.
Andrew J. Kelly SQL MVP
"Gary Homewood" <GaryHomewood@.discussions.microsoft.com> wrote in message
news:AE25E15B-FC19-4FDF-BEF1-DEAAA4671C5D@.microsoft.com...[vbcol=seagreen]
> We have been advised in the past that it wasn't a good idea to have
> indexes
> on the transaction table that is being frequently written too i.e. less
> than
> a second between inserts, but I'd still like to query the data. Without
> some
> sort of index, the query ends up doing a full table scan on a massive
> table,
> so I think I need some sort of extract to an indexed version to make these
> queries manageable.
>
> "GlennThomas5" wrote:
|||OK here's what I'm doing. My transaction table is written to potentially
several times a second; this is just an insert, not an update. I was under
the impression that if I had an index on such a large and rapidly expanding
table, there would be a performance hit when the index was recalculated as
rows are written to the table. I would subsequently like to retrieve results
from this table for a particular date range, in which case I do really need
an index on date to avoid doing a full table scan. Is there a way to get SQL
Server to maybe ignore the date index as rows are being inserted, and then
perhaps do a reindexing of the table once a day? Or do I need to extract data
to some sort of warehouse or data cube with a date index? In which case I'd
still have the same problem, because I'd need to extract entries from my very
large transaction table for a particular date.
Thanks for your replies so far. Hope I've phrased my problem a bit more
clearly this time.
"Andrew J. Kelly" wrote:

> Who ever told you that certainly didn't know what they were talking about.
> If you are going to update a row you need to know which row to update
> otherwise you scan and most likely lock the entire table. If you need to
> query it (which that is what tables are for) and don't want all the rows you
> also need an index. The trick is to pick the right column(s) to index and
> the correct index type. If you post the DDL for the table and a sample of
> the queries you run against it we can help you decide on the proper
> indexing.
> --
> Andrew J. Kelly SQL MVP
>
> "Gary Homewood" <GaryHomewood@.discussions.microsoft.com> wrote in message
> news:AE25E15B-FC19-4FDF-BEF1-DEAAA4671C5D@.microsoft.com...
>
>

frequently updated tables

Hi
I have a transaction table that is very frequently updated, so I have no
indexes on it. I also need to be able to run queries against this data on,
for example, a date range. I think the easiest solution would be to extract
data on a daily basis onto another table with indexes. Or should I be looking
at some sort of data warehousing/data cube approach? Any ideas/resources?
Thanksif your just updating the table i dont see any reason why you couldnt
index that table and run data off of it. and if you would be able to
export it to a different table once a day i'm guess the data your
viewing isnt live data you need to see right away. i'd just index that
table and run queries off of it. just set all the tables your
selecting from 'WITH (NOLOCK)' then it wont matter if a record is
being access at that time. it doesnt sound like your worried about any
type of dirty reads. if it is being inserted into quite frequently you
might have to take another approach or run a job to reindex at night.
i'm not 100% sure of your exact situation. hope that helps.|||We have been advised in the past that it wasn't a good idea to have indexes
on the transaction table that is being frequently written too i.e. less than
a second between inserts, but I'd still like to query the data. Without some
sort of index, the query ends up doing a full table scan on a massive table,
so I think I need some sort of extract to an indexed version to make these
queries manageable.
"GlennThomas5" wrote:
> if your just updating the table i dont see any reason why you couldnt
> index that table and run data off of it. and if you would be able to
> export it to a different table once a day i'm guess the data your
> viewing isnt live data you need to see right away. i'd just index that
> table and run queries off of it. just set all the tables your
> selecting from 'WITH (NOLOCK)' then it wont matter if a record is
> being access at that time. it doesnt sound like your worried about any
> type of dirty reads. if it is being inserted into quite frequently you
> might have to take another approach or run a job to reindex at night.
> i'm not 100% sure of your exact situation. hope that helps.
>|||Who ever told you that certainly didn't know what they were talking about.
If you are going to update a row you need to know which row to update
otherwise you scan and most likely lock the entire table. If you need to
query it (which that is what tables are for) and don't want all the rows you
also need an index. The trick is to pick the right column(s) to index and
the correct index type. If you post the DDL for the table and a sample of
the queries you run against it we can help you decide on the proper
indexing.
--
Andrew J. Kelly SQL MVP
"Gary Homewood" <GaryHomewood@.discussions.microsoft.com> wrote in message
news:AE25E15B-FC19-4FDF-BEF1-DEAAA4671C5D@.microsoft.com...
> We have been advised in the past that it wasn't a good idea to have
> indexes
> on the transaction table that is being frequently written too i.e. less
> than
> a second between inserts, but I'd still like to query the data. Without
> some
> sort of index, the query ends up doing a full table scan on a massive
> table,
> so I think I need some sort of extract to an indexed version to make these
> queries manageable.
>
> "GlennThomas5" wrote:
>> if your just updating the table i dont see any reason why you couldnt
>> index that table and run data off of it. and if you would be able to
>> export it to a different table once a day i'm guess the data your
>> viewing isnt live data you need to see right away. i'd just index that
>> table and run queries off of it. just set all the tables your
>> selecting from 'WITH (NOLOCK)' then it wont matter if a record is
>> being access at that time. it doesnt sound like your worried about any
>> type of dirty reads. if it is being inserted into quite frequently you
>> might have to take another approach or run a job to reindex at night.
>> i'm not 100% sure of your exact situation. hope that helps.
>>|||OK here's what I'm doing. My transaction table is written to potentially
several times a second; this is just an insert, not an update. I was under
the impression that if I had an index on such a large and rapidly expanding
table, there would be a performance hit when the index was recalculated as
rows are written to the table. I would subsequently like to retrieve results
from this table for a particular date range, in which case I do really need
an index on date to avoid doing a full table scan. Is there a way to get SQL
Server to maybe ignore the date index as rows are being inserted, and then
perhaps do a reindexing of the table once a day? Or do I need to extract data
to some sort of warehouse or data cube with a date index? In which case I'd
still have the same problem, because I'd need to extract entries from my very
large transaction table for a particular date.
Thanks for your replies so far. Hope I've phrased my problem a bit more
clearly this time.
"Andrew J. Kelly" wrote:
> Who ever told you that certainly didn't know what they were talking about.
> If you are going to update a row you need to know which row to update
> otherwise you scan and most likely lock the entire table. If you need to
> query it (which that is what tables are for) and don't want all the rows you
> also need an index. The trick is to pick the right column(s) to index and
> the correct index type. If you post the DDL for the table and a sample of
> the queries you run against it we can help you decide on the proper
> indexing.
> --
> Andrew J. Kelly SQL MVP
>
> "Gary Homewood" <GaryHomewood@.discussions.microsoft.com> wrote in message
> news:AE25E15B-FC19-4FDF-BEF1-DEAAA4671C5D@.microsoft.com...
> > We have been advised in the past that it wasn't a good idea to have
> > indexes
> > on the transaction table that is being frequently written too i.e. less
> > than
> > a second between inserts, but I'd still like to query the data. Without
> > some
> > sort of index, the query ends up doing a full table scan on a massive
> > table,
> > so I think I need some sort of extract to an indexed version to make these
> > queries manageable.
> >
> >
> >
> > "GlennThomas5" wrote:
> >
> >> if your just updating the table i dont see any reason why you couldnt
> >> index that table and run data off of it. and if you would be able to
> >> export it to a different table once a day i'm guess the data your
> >> viewing isnt live data you need to see right away. i'd just index that
> >> table and run queries off of it. just set all the tables your
> >> selecting from 'WITH (NOLOCK)' then it wont matter if a record is
> >> being access at that time. it doesnt sound like your worried about any
> >> type of dirty reads. if it is being inserted into quite frequently you
> >> might have to take another approach or run a job to reindex at night.
> >> i'm not 100% sure of your exact situation. hope that helps.
> >>
> >>
>
>

frequently updated tables

Hi
I have a transaction table that is very frequently updated, so I have no
indexes on it. I also need to be able to run queries against this data on,
for example, a date range. I think the easiest solution would be to extract
data on a daily basis onto another table with indexes. Or should I be lookin
g
at some sort of data warehousing/data cube approach? Any ideas/resources?
Thanksif your just updating the table i dont see any reason why you couldnt
index that table and run data off of it. and if you would be able to
export it to a different table once a day i'm guess the data your
viewing isnt live data you need to see right away. i'd just index that
table and run queries off of it. just set all the tables your
selecting from 'WITH (NOLOCK)' then it wont matter if a record is
being access at that time. it doesnt sound like your worried about any
type of dirty reads. if it is being inserted into quite frequently you
might have to take another approach or run a job to reindex at night.
i'm not 100% sure of your exact situation. hope that helps.|||We have been advised in the past that it wasn't a good idea to have indexes
on the transaction table that is being frequently written too i.e. less than
a second between inserts, but I'd still like to query the data. Without some
sort of index, the query ends up doing a full table scan on a massive table,
so I think I need some sort of extract to an indexed version to make these
queries manageable.
"GlennThomas5" wrote:

> if your just updating the table i dont see any reason why you couldnt
> index that table and run data off of it. and if you would be able to
> export it to a different table once a day i'm guess the data your
> viewing isnt live data you need to see right away. i'd just index that
> table and run queries off of it. just set all the tables your
> selecting from 'WITH (NOLOCK)' then it wont matter if a record is
> being access at that time. it doesnt sound like your worried about any
> type of dirty reads. if it is being inserted into quite frequently you
> might have to take another approach or run a job to reindex at night.
> i'm not 100% sure of your exact situation. hope that helps.
>|||Who ever told you that certainly didn't know what they were talking about.
If you are going to update a row you need to know which row to update
otherwise you scan and most likely lock the entire table. If you need to
query it (which that is what tables are for) and don't want all the rows you
also need an index. The trick is to pick the right column(s) to index and
the correct index type. If you post the DDL for the table and a sample of
the queries you run against it we can help you decide on the proper
indexing.
Andrew J. Kelly SQL MVP
"Gary Homewood" <GaryHomewood@.discussions.microsoft.com> wrote in message
news:AE25E15B-FC19-4FDF-BEF1-DEAAA4671C5D@.microsoft.com...[vbcol=seagreen]
> We have been advised in the past that it wasn't a good idea to have
> indexes
> on the transaction table that is being frequently written too i.e. less
> than
> a second between inserts, but I'd still like to query the data. Without
> some
> sort of index, the query ends up doing a full table scan on a massive
> table,
> so I think I need some sort of extract to an indexed version to make these
> queries manageable.
>
> "GlennThomas5" wrote:
>|||OK here's what I'm doing. My transaction table is written to potentially
several times a second; this is just an insert, not an update. I was under
the impression that if I had an index on such a large and rapidly expanding
table, there would be a performance hit when the index was recalculated as
rows are written to the table. I would subsequently like to retrieve results
from this table for a particular date range, in which case I do really need
an index on date to avoid doing a full table scan. Is there a way to get SQL
Server to maybe ignore the date index as rows are being inserted, and then
perhaps do a reindexing of the table once a day? Or do I need to extract dat
a
to some sort of warehouse or data cube with a date index? In which case I'd
still have the same problem, because I'd need to extract entries from my ver
y
large transaction table for a particular date.
Thanks for your replies so far. Hope I've phrased my problem a bit more
clearly this time.
"Andrew J. Kelly" wrote:

> Who ever told you that certainly didn't know what they were talking about.
> If you are going to update a row you need to know which row to update
> otherwise you scan and most likely lock the entire table. If you need to
> query it (which that is what tables are for) and don't want all the rows y
ou
> also need an index. The trick is to pick the right column(s) to index and
> the correct index type. If you post the DDL for the table and a sample of
> the queries you run against it we can help you decide on the proper
> indexing.
> --
> Andrew J. Kelly SQL MVP
>
> "Gary Homewood" <GaryHomewood@.discussions.microsoft.com> wrote in message
> news:AE25E15B-FC19-4FDF-BEF1-DEAAA4671C5D@.microsoft.com...
>
>

Frequent Trans Log backups Vs Autogrow

Hi
Im doing some testing on mirroring at the moment, and have found out about
the inherent problems with transaction log size that thie replication
scenario entails. However I have found that frequent trans log backups are a
way around the problem - This sets the vast majority of VLFs in the trans log
to state 0 allowing them to be overwritten by new transactions VLF's.
Accordingly I dont need to autogrow half as often.
The question is which is the most harmful of system performance? frequent
trans log backups or autogrows? if i DO backup frequently i DONT need to
autogrow, and if i DONT back up frequently i DO need to autogrow...
which which people choose?
Cheers
Alastair Jones
Methodology Group
In SQL 2005 autogrows do not cause performance degradation they way they did
in SQL 2000. Backing up your transaction log should not cause performance
problems either. It may cause some performance problems with Full-text
search, but should not cause other problems.
So I normally backup every 15-20 minutes, unless I am log shipping where it
might be more to decrease my exposure to data loss. None of these
considerations should impact database mirroring though.
Hilary Cotter
Director of Text Mining and Database Strategy
RelevantNOISE.Com - Dedicated to mining blogs for business intelligence.
This posting is my own and doesn't necessarily represent RelevantNoise's
positions, strategies or opinions.
Looking for a SQL Server replication book?
http://www.nwsu.com/0974973602.html
Looking for a FAQ on Indexing Services/SQL FTS
http://www.indexserverfaq.com
"Methodology" <Methodology@.discussions.microsoft.com> wrote in message
news:83043C4C-1FD2-4F7A-9E9B-9A0C1890908C@.microsoft.com...
> Hi
> Im doing some testing on mirroring at the moment, and have found out about
> the inherent problems with transaction log size that thie replication
> scenario entails. However I have found that frequent trans log backups are
> a
> way around the problem - This sets the vast majority of VLFs in the trans
> log
> to state 0 allowing them to be overwritten by new transactions VLF's.
> Accordingly I dont need to autogrow half as often.
> The question is which is the most harmful of system performance? frequent
> trans log backups or autogrows? if i DO backup frequently i DONT need to
> autogrow, and if i DONT back up frequently i DO need to autogrow...
> which which people choose?
> Cheers
> Alastair Jones
> Methodology Group

Wednesday, March 7, 2012

Free/Used space of a transaction log file

Hello,
I am looking for a sp or view which shows the size of used/free space of a transaction log file
in SQL Server (2k), like the view 'Taskpad' in Enterprise Manager does.
How can I get this logfile information?
Thank You
Joachim
1. This example summarizes space used in the current database and uses the
optional parameter @.updateusage.
USE pubs
sp_spaceused @.updateusage = 'TRUE'
2. sp_tempdbspace
This stored procedure can be used to get the total size and the space used
by the tempdb database. It is used without parameters.
3. Further you can use the following queries :-
Select * from master..sysaltfiles
Select * from sysfiles
Let me know if it served your purpose.
"Joachim Hofmann" wrote:

> Hello,
> I am looking for a sp or view which shows the size of used/free space of a transaction log file
> in SQL Server (2k), like the view 'Taskpad' in Enterprise Manager does.
> How can I get this logfile information?
> Thank You
> Joachim
>
|||Joachim Hofmann wrote:
> Hello,
> I am looking for a sp or view which shows the size of used/free space
> of a transaction log file in SQL Server (2k), like the view 'Taskpad'
> in Enterprise Manager does.
> How can I get this logfile information?
> Thank You
> Joachim
I used profiler to trace what EM does:
DBCC sqlperf(logspace)
DBCC showfilestats
--
remove RmEaMkOnViEoTHvIoS from my email
svi komentari i razmisljanja su moja kao pojedinca i nikako se ne smiju
povezivati sa tvrtkom u kojoj radim
|||Yes, DBCC SQLPERF(LOGSPACE) shows what I wanted to know.
The other sp's / tables only show the database files, objects like tables or only the absolute
sizes.
Thank You
Joachim

Free/Used space of a transaction log file

Hello,
I am looking for a sp or view which shows the size of used/free space of a t
ransaction log file
in SQL Server (2k), like the view 'Taskpad' in Enterprise Manager does.
How can I get this logfile information?
Thank You
Joachim1. This example summarizes space used in the current database and uses the
optional parameter @.updateusage.
USE pubs
sp_spaceused @.updateusage = 'TRUE'
2. sp_tempdbspace
This stored procedure can be used to get the total size and the space used
by the tempdb database. It is used without parameters.
3. Further you can use the following queries :-
Select * from master..sysaltfiles
Select * from sysfiles
Let me know if it served your purpose.
"Joachim Hofmann" wrote:

> Hello,
> I am looking for a sp or view which shows the size of used/free space of a
transaction log file
> in SQL Server (2k), like the view 'Taskpad' in Enterprise Manager does.
> How can I get this logfile information?
> Thank You
> Joachim
>|||Joachim Hofmann wrote:
> Hello,
> I am looking for a sp or view which shows the size of used/free space
> of a transaction log file in SQL Server (2k), like the view 'Taskpad'
> in Enterprise Manager does.
> How can I get this logfile information?
> Thank You
> Joachim
I used profiler to trace what EM does:
DBCC sqlperf(logspace)
DBCC showfilestats
--
remove RmEaMkOnViEoTHvIoS from my email
svi komentari i razmisljanja su moja kao pojedinca i nikako se ne smiju
povezivati sa tvrtkom u kojoj radim|||Yes, DBCC SQLPERF(LOGSPACE) shows what I wanted to know.
The other sp's / tables only show the database files, objects like tables or
only the absolute
sizes.
Thank You
Joachim

Free/Used space of a transaction log file

Hello,
I am looking for a sp or view which shows the size of used/free space of a transaction log file
in SQL Server (2k), like the view 'Taskpad' in Enterprise Manager does.
How can I get this logfile information?
Thank You
Joachim1. This example summarizes space used in the current database and uses the
optional parameter @.updateusage.
USE pubs
sp_spaceused @.updateusage = 'TRUE'
2. sp_tempdbspace
This stored procedure can be used to get the total size and the space used
by the tempdb database. It is used without parameters.
3. Further you can use the following queries :-
Select * from master..sysaltfiles
Select * from sysfiles
Let me know if it served your purpose.
"Joachim Hofmann" wrote:
> Hello,
> I am looking for a sp or view which shows the size of used/free space of a transaction log file
> in SQL Server (2k), like the view 'Taskpad' in Enterprise Manager does.
> How can I get this logfile information?
> Thank You
> Joachim
>|||Joachim Hofmann wrote:
> Hello,
> I am looking for a sp or view which shows the size of used/free space
> of a transaction log file in SQL Server (2k), like the view 'Taskpad'
> in Enterprise Manager does.
> How can I get this logfile information?
> Thank You
> Joachim
I used profiler to trace what EM does:
DBCC sqlperf(logspace)
DBCC showfilestats
--
remove RmEaMkOnViEoTHvIoS from my email
svi komentari i razmisljanja su moja kao pojedinca i nikako se ne smiju
povezivati sa tvrtkom u kojoj radim|||Yes, DBCC SQLPERF(LOGSPACE) shows what I wanted to know.
The other sp's / tables only show the database files, objects like tables or only the absolute
sizes.
Thank You
Joachim

Sunday, February 26, 2012

Free up the transaction log

Hi ,
When full db is backed up (using maintenance plan) , does transaction
log get shrunk (inactive transactions are dropped from log) . Also does this
space get released to OS .
Can you pl. let me know answer for same question , when log is backed up
explicity (using backup log without using truncate_only option ) .
What could be the reasons , why my log is not getting shrunk after DB and
log backup . What are the other options available apart from using
truncate_only option and dbcc shrinkfile .
Thanks,
Prabhu
Shrinking is NOT part of a backup, log or db. You must use either DBCC
SHRINKDATABSE or SHRINKFILE to do that. Have a look at these:
http://www.karaszi.com/SQLServer/info_dont_shrink.asp Shrinking
considerations
http://www.nigelrivett.net/Transacti...leGrows_1.html Log File issues
http://www.support.microsoft.com/?id=317375 Log File Grows too big
http://www.support.microsoft.com/?id=110139 Log file filling up
http://www.support.microsoft.com/?id=315512 Considerations for Autogrow
and AutoShrink
http://www.support.microsoft.com/?id=272318 Shrinking Log in SQL Server
2000 with DBCC SHRINKFILE
http://www.support.microsoft.com/?id=873235 How to stop the log file from
growing
http://www.support.microsoft.com/?id=305635 Timeout while DB expanding
http://www.support.microsoft.com/?id=307487 Shrinking TempDB
Andrew J. Kelly SQL MVP
"Prabhu" <Prabhu@.discussions.microsoft.com> wrote in message
news:0CC4883D-7A2F-4701-94CC-4521F3B81A61@.microsoft.com...
> Hi ,
> When full db is backed up (using maintenance plan) , does transaction
> log get shrunk (inactive transactions are dropped from log) . Also does
> this
> space get released to OS .
> Can you pl. let me know answer for same question , when log is backed up
> explicity (using backup log without using truncate_only option ) .
> What could be the reasons , why my log is not getting shrunk after DB and
> log backup . What are the other options available apart from using
> truncate_only option and dbcc shrinkfile .
> Thanks,
> Prabhu
|||Thanks for your reply Kelly .
I understand shrinking the physical file(s) is not part of backup .
Truncation does not reduce the size of a physical log file, it reduces the
size of the logical log file
But I have 2 weird situations .
1. My tempdb log just grows out of control . Only way we could reuse the
space is after explicitly using backup log with truncate option and dbcc
shrinkfile .
But , Log truncation should occur ,every time a checkpoint is processed,
provided the database is using the simple recovery model (tempdb is in
recovery model).
2. Other user DBs log files also grow , they are in full or Bulk_Logged
recovery model . We have daily fulldb maintenance plan to take only full DB
backup . Does it truncate the log ? But looks like unused space in log files
are not being reused and log files are just extending .
I have also used backup log command (without truncate_only) but still unused
space is not reused but log file grows .( log truncation should occur after
BACKUP LOG statement , right . )
Thanks,
Prabhu
"Andrew J. Kelly" wrote:

> Shrinking is NOT part of a backup, log or db. You must use either DBCC
> SHRINKDATABSE or SHRINKFILE to do that. Have a look at these:
> http://www.karaszi.com/SQLServer/info_dont_shrink.asp Shrinking
> considerations
> http://www.nigelrivett.net/Transacti...leGrows_1.html Log File issues
> http://www.support.microsoft.com/?id=317375 Log File Grows too big
> http://www.support.microsoft.com/?id=110139 Log file filling up
> http://www.support.microsoft.com/?id=315512 Considerations for Autogrow
> and AutoShrink
> http://www.support.microsoft.com/?id=272318 Shrinking Log in SQL Server
> 2000 with DBCC SHRINKFILE
> http://www.support.microsoft.com/?id=873235 How to stop the log file from
> growing
> http://www.support.microsoft.com/?id=305635 Timeout while DB expanding
> http://www.support.microsoft.com/?id=307487 Shrinking TempDB
> --
> Andrew J. Kelly SQL MVP
>
> "Prabhu" <Prabhu@.discussions.microsoft.com> wrote in message
> news:0CC4883D-7A2F-4701-94CC-4521F3B81A61@.microsoft.com...
>
>
|||Do you have the latest service pack? I have heard of other postings in
which the tempdb log grows but I can't find any KB on it. I think it was
fixed with a service pack. This KB might be helpful:
http://support.microsoft.com/Default.aspx?id=110139
As for # 2 if you are in Full or BulkLogged recovery mode you must do
regular log backups otherwise the log will continue to grow. A full backup
does not truncate the log only a proper Log backup will do that as long as
there are no open transactions.
Andrew J. Kelly SQL MVP
"Prabhu" <Prabhu@.discussions.microsoft.com> wrote in message
news:8B5506DD-860D-4851-AAE6-AEB4005D753F@.microsoft.com...[vbcol=seagreen]
> Thanks for your reply Kelly .
> I understand shrinking the physical file(s) is not part of backup .
> Truncation does not reduce the size of a physical log file, it reduces the
> size of the logical log file
> But I have 2 weird situations .
> 1. My tempdb log just grows out of control . Only way we could reuse the
> space is after explicitly using backup log with truncate option and dbcc
> shrinkfile .
> But , Log truncation should occur ,every time a checkpoint is processed,
> provided the database is using the simple recovery model (tempdb is in
> recovery model).
> 2. Other user DBs log files also grow , they are in full or Bulk_Logged
> recovery model . We have daily fulldb maintenance plan to take only full
> DB
> backup . Does it truncate the log ? But looks like unused space in log
> files
> are not being reused and log files are just extending .
> I have also used backup log command (without truncate_only) but still
> unused
> space is not reused but log file grows .( log truncation should occur
> after
> BACKUP LOG statement , right . )
> Thanks,
> Prabhu
> "Andrew J. Kelly" wrote:
|||Hi Andrew ,
1. I have SP4 ( 8.00.2040 ) .
2. If DB is in simple recovery mode , log is getting truncated (but space
not released to OS , as expected) but for other recovery models backup log
command sometimes truncates log and sometimes it won't .
Thanks,
Prabhu
"Andrew J. Kelly" wrote:

> Do you have the latest service pack? I have heard of other postings in
> which the tempdb log grows but I can't find any KB on it. I think it was
> fixed with a service pack. This KB might be helpful:
> http://support.microsoft.com/Default.aspx?id=110139
> As for # 2 if you are in Full or BulkLogged recovery mode you must do
> regular log backups otherwise the log will continue to grow. A full backup
> does not truncate the log only a proper Log backup will do that as long as
> there are no open transactions.
> --
> Andrew J. Kelly SQL MVP
>
> "Prabhu" <Prabhu@.discussions.microsoft.com> wrote in message
> news:8B5506DD-860D-4851-AAE6-AEB4005D753F@.microsoft.com...
>
>
|||If there are any long running open transactions it can not truncate that
portion of the log.
Andrew J. Kelly SQL MVP
"Prabhu" <Prabhu@.discussions.microsoft.com> wrote in message
news:14032F27-857D-4F34-9864-00A4D9514E67@.microsoft.com...[vbcol=seagreen]
> Hi Andrew ,
> 1. I have SP4 ( 8.00.2040 ) .
> 2. If DB is in simple recovery mode , log is getting truncated (but space
> not released to OS , as expected) but for other recovery models backup log
> command sometimes truncates log and sometimes it won't .
> Thanks,
> Prabhu
>
> "Andrew J. Kelly" wrote:
|||Andrew ,
I have SP4 but still have issues with tempdb log (issue #1) , as I described
below . Can you pl. suggest me any solution . I also read from MS support
site ,using dbcc shrinkdatabase (and/or dbcc shrinkfile) could currept
tempdb . Right .
Pl. let me know .
--Prabhu
"Andrew J. Kelly" wrote:

> If there are any long running open transactions it can not truncate that
> portion of the log.
> --
> Andrew J. Kelly SQL MVP
>
> "Prabhu" <Prabhu@.discussions.microsoft.com> wrote in message
> news:14032F27-857D-4F34-9864-00A4D9514E67@.microsoft.com...
>
>
|||As I stated if you have long running open transactions in the db the log
file may not be able to be truncated. Try running DBCC OPENTRAN() in the
affected db's.
Andrew J. Kelly SQL MVP
"Prabhu" <Prabhu@.discussions.microsoft.com> wrote in message
news:B04001DD-4233-4E2B-B62C-F4E6C960D77A@.microsoft.com...[vbcol=seagreen]
> Andrew ,
> I have SP4 but still have issues with tempdb log (issue #1) , as I
> described
> below . Can you pl. suggest me any solution . I also read from MS support
> site ,using dbcc shrinkdatabase (and/or dbcc shrinkfile) could currept
> tempdb . Right .
> Pl. let me know .
> --Prabhu
> "Andrew J. Kelly" wrote:

Free up the transaction log

Hi ,
When full db is backed up (using maintenance plan) , does transaction
log get shrunk (inactive transactions are dropped from log) . Also does this
space get released to OS .
Can you pl. let me know answer for same question , when log is backed up
explicity (using backup log without using truncate_only option ) .
What could be the reasons , why my log is not getting shrunk after DB and
log backup . What are the other options available apart from using
truncate_only option and dbcc shrinkfile .
Thanks,
PrabhuShrinking is NOT part of a backup, log or db. You must use either DBCC
SHRINKDATABSE or SHRINKFILE to do that. Have a look at these:
http://www.karaszi.com/SQLServer/info_dont_shrink.asp Shrinking
considerations
http://www.nigelrivett.net/TransactionLogFileGrows_1.html Log File issues
http://www.support.microsoft.com/?id=317375 Log File Grows too big
http://www.support.microsoft.com/?id=110139 Log file filling up
http://www.support.microsoft.com/?id=315512 Considerations for Autogrow
and AutoShrink
http://www.support.microsoft.com/?id=272318 Shrinking Log in SQL Server
2000 with DBCC SHRINKFILE
http://www.support.microsoft.com/?id=873235 How to stop the log file from
growing
http://www.support.microsoft.com/?id=305635 Timeout while DB expanding
http://www.support.microsoft.com/?id=307487 Shrinking TempDB
--
Andrew J. Kelly SQL MVP
"Prabhu" <Prabhu@.discussions.microsoft.com> wrote in message
news:0CC4883D-7A2F-4701-94CC-4521F3B81A61@.microsoft.com...
> Hi ,
> When full db is backed up (using maintenance plan) , does transaction
> log get shrunk (inactive transactions are dropped from log) . Also does
> this
> space get released to OS .
> Can you pl. let me know answer for same question , when log is backed up
> explicity (using backup log without using truncate_only option ) .
> What could be the reasons , why my log is not getting shrunk after DB and
> log backup . What are the other options available apart from using
> truncate_only option and dbcc shrinkfile .
> Thanks,
> Prabhu|||Thanks for your reply Kelly .
I understand shrinking the physical file(s) is not part of backup .
Truncation does not reduce the size of a physical log file, it reduces the
size of the logical log file
But I have 2 weird situations .
1. My tempdb log just grows out of control . Only way we could reuse the
space is after explicitly using backup log with truncate option and dbcc
shrinkfile .
But , Log truncation should occur ,every time a checkpoint is processed,
provided the database is using the simple recovery model (tempdb is in
recovery model).
2. Other user DBs log files also grow , they are in full or Bulk_Logged
recovery model . We have daily fulldb maintenance plan to take only full DB
backup . Does it truncate the log ? But looks like unused space in log files
are not being reused and log files are just extending .
I have also used backup log command (without truncate_only) but still unused
space is not reused but log file grows .( log truncation should occur after
BACKUP LOG statement , right . )
Thanks,
Prabhu
"Andrew J. Kelly" wrote:
> Shrinking is NOT part of a backup, log or db. You must use either DBCC
> SHRINKDATABSE or SHRINKFILE to do that. Have a look at these:
> http://www.karaszi.com/SQLServer/info_dont_shrink.asp Shrinking
> considerations
> http://www.nigelrivett.net/TransactionLogFileGrows_1.html Log File issues
> http://www.support.microsoft.com/?id=317375 Log File Grows too big
> http://www.support.microsoft.com/?id=110139 Log file filling up
> http://www.support.microsoft.com/?id=315512 Considerations for Autogrow
> and AutoShrink
> http://www.support.microsoft.com/?id=272318 Shrinking Log in SQL Server
> 2000 with DBCC SHRINKFILE
> http://www.support.microsoft.com/?id=873235 How to stop the log file from
> growing
> http://www.support.microsoft.com/?id=305635 Timeout while DB expanding
> http://www.support.microsoft.com/?id=307487 Shrinking TempDB
> --
> Andrew J. Kelly SQL MVP
>
> "Prabhu" <Prabhu@.discussions.microsoft.com> wrote in message
> news:0CC4883D-7A2F-4701-94CC-4521F3B81A61@.microsoft.com...
> > Hi ,
> > When full db is backed up (using maintenance plan) , does transaction
> > log get shrunk (inactive transactions are dropped from log) . Also does
> > this
> > space get released to OS .
> > Can you pl. let me know answer for same question , when log is backed up
> > explicity (using backup log without using truncate_only option ) .
> > What could be the reasons , why my log is not getting shrunk after DB and
> > log backup . What are the other options available apart from using
> > truncate_only option and dbcc shrinkfile .
> >
> > Thanks,
> > Prabhu
>
>|||Do you have the latest service pack? I have heard of other postings in
which the tempdb log grows but I can't find any KB on it. I think it was
fixed with a service pack. This KB might be helpful:
http://support.microsoft.com/Default.aspx?id=110139
As for # 2 if you are in Full or BulkLogged recovery mode you must do
regular log backups otherwise the log will continue to grow. A full backup
does not truncate the log only a proper Log backup will do that as long as
there are no open transactions.
--
Andrew J. Kelly SQL MVP
"Prabhu" <Prabhu@.discussions.microsoft.com> wrote in message
news:8B5506DD-860D-4851-AAE6-AEB4005D753F@.microsoft.com...
> Thanks for your reply Kelly .
> I understand shrinking the physical file(s) is not part of backup .
> Truncation does not reduce the size of a physical log file, it reduces the
> size of the logical log file
> But I have 2 weird situations .
> 1. My tempdb log just grows out of control . Only way we could reuse the
> space is after explicitly using backup log with truncate option and dbcc
> shrinkfile .
> But , Log truncation should occur ,every time a checkpoint is processed,
> provided the database is using the simple recovery model (tempdb is in
> recovery model).
> 2. Other user DBs log files also grow , they are in full or Bulk_Logged
> recovery model . We have daily fulldb maintenance plan to take only full
> DB
> backup . Does it truncate the log ? But looks like unused space in log
> files
> are not being reused and log files are just extending .
> I have also used backup log command (without truncate_only) but still
> unused
> space is not reused but log file grows .( log truncation should occur
> after
> BACKUP LOG statement , right . )
> Thanks,
> Prabhu
> "Andrew J. Kelly" wrote:
>> Shrinking is NOT part of a backup, log or db. You must use either DBCC
>> SHRINKDATABSE or SHRINKFILE to do that. Have a look at these:
>> http://www.karaszi.com/SQLServer/info_dont_shrink.asp Shrinking
>> considerations
>> http://www.nigelrivett.net/TransactionLogFileGrows_1.html Log File
>> issues
>> http://www.support.microsoft.com/?id=317375 Log File Grows too big
>> http://www.support.microsoft.com/?id=110139 Log file filling up
>> http://www.support.microsoft.com/?id=315512 Considerations for Autogrow
>> and AutoShrink
>> http://www.support.microsoft.com/?id=272318 Shrinking Log in SQL Server
>> 2000 with DBCC SHRINKFILE
>> http://www.support.microsoft.com/?id=873235 How to stop the log file
>> from
>> growing
>> http://www.support.microsoft.com/?id=305635 Timeout while DB expanding
>> http://www.support.microsoft.com/?id=307487 Shrinking TempDB
>> --
>> Andrew J. Kelly SQL MVP
>>
>> "Prabhu" <Prabhu@.discussions.microsoft.com> wrote in message
>> news:0CC4883D-7A2F-4701-94CC-4521F3B81A61@.microsoft.com...
>> > Hi ,
>> > When full db is backed up (using maintenance plan) , does
>> > transaction
>> > log get shrunk (inactive transactions are dropped from log) . Also
>> > does
>> > this
>> > space get released to OS .
>> > Can you pl. let me know answer for same question , when log is backed
>> > up
>> > explicity (using backup log without using truncate_only option ) .
>> > What could be the reasons , why my log is not getting shrunk after DB
>> > and
>> > log backup . What are the other options available apart from using
>> > truncate_only option and dbcc shrinkfile .
>> >
>> > Thanks,
>> > Prabhu
>>|||Hi Andrew ,
1. I have SP4 ( 8.00.2040 ) .
2. If DB is in simple recovery mode , log is getting truncated (but space
not released to OS , as expected) but for other recovery models backup log
command sometimes truncates log and sometimes it won't .
Thanks,
Prabhu
"Andrew J. Kelly" wrote:
> Do you have the latest service pack? I have heard of other postings in
> which the tempdb log grows but I can't find any KB on it. I think it was
> fixed with a service pack. This KB might be helpful:
> http://support.microsoft.com/Default.aspx?id=110139
> As for # 2 if you are in Full or BulkLogged recovery mode you must do
> regular log backups otherwise the log will continue to grow. A full backup
> does not truncate the log only a proper Log backup will do that as long as
> there are no open transactions.
> --
> Andrew J. Kelly SQL MVP
>
> "Prabhu" <Prabhu@.discussions.microsoft.com> wrote in message
> news:8B5506DD-860D-4851-AAE6-AEB4005D753F@.microsoft.com...
> > Thanks for your reply Kelly .
> >
> > I understand shrinking the physical file(s) is not part of backup .
> > Truncation does not reduce the size of a physical log file, it reduces the
> > size of the logical log file
> >
> > But I have 2 weird situations .
> >
> > 1. My tempdb log just grows out of control . Only way we could reuse the
> > space is after explicitly using backup log with truncate option and dbcc
> > shrinkfile .
> > But , Log truncation should occur ,every time a checkpoint is processed,
> > provided the database is using the simple recovery model (tempdb is in
> > recovery model).
> > 2. Other user DBs log files also grow , they are in full or Bulk_Logged
> > recovery model . We have daily fulldb maintenance plan to take only full
> > DB
> > backup . Does it truncate the log ? But looks like unused space in log
> > files
> > are not being reused and log files are just extending .
> > I have also used backup log command (without truncate_only) but still
> > unused
> > space is not reused but log file grows .( log truncation should occur
> > after
> > BACKUP LOG statement , right . )
> >
> > Thanks,
> > Prabhu
> >
> > "Andrew J. Kelly" wrote:
> >
> >> Shrinking is NOT part of a backup, log or db. You must use either DBCC
> >> SHRINKDATABSE or SHRINKFILE to do that. Have a look at these:
> >>
> >> http://www.karaszi.com/SQLServer/info_dont_shrink.asp Shrinking
> >> considerations
> >> http://www.nigelrivett.net/TransactionLogFileGrows_1.html Log File
> >> issues
> >> http://www.support.microsoft.com/?id=317375 Log File Grows too big
> >> http://www.support.microsoft.com/?id=110139 Log file filling up
> >> http://www.support.microsoft.com/?id=315512 Considerations for Autogrow
> >> and AutoShrink
> >> http://www.support.microsoft.com/?id=272318 Shrinking Log in SQL Server
> >> 2000 with DBCC SHRINKFILE
> >> http://www.support.microsoft.com/?id=873235 How to stop the log file
> >> from
> >> growing
> >> http://www.support.microsoft.com/?id=305635 Timeout while DB expanding
> >> http://www.support.microsoft.com/?id=307487 Shrinking TempDB
> >>
> >> --
> >> Andrew J. Kelly SQL MVP
> >>
> >>
> >> "Prabhu" <Prabhu@.discussions.microsoft.com> wrote in message
> >> news:0CC4883D-7A2F-4701-94CC-4521F3B81A61@.microsoft.com...
> >> > Hi ,
> >> > When full db is backed up (using maintenance plan) , does
> >> > transaction
> >> > log get shrunk (inactive transactions are dropped from log) . Also
> >> > does
> >> > this
> >> > space get released to OS .
> >> > Can you pl. let me know answer for same question , when log is backed
> >> > up
> >> > explicity (using backup log without using truncate_only option ) .
> >> > What could be the reasons , why my log is not getting shrunk after DB
> >> > and
> >> > log backup . What are the other options available apart from using
> >> > truncate_only option and dbcc shrinkfile .
> >> >
> >> > Thanks,
> >> > Prabhu
> >>
> >>
> >>
>
>|||If there are any long running open transactions it can not truncate that
portion of the log.
--
Andrew J. Kelly SQL MVP
"Prabhu" <Prabhu@.discussions.microsoft.com> wrote in message
news:14032F27-857D-4F34-9864-00A4D9514E67@.microsoft.com...
> Hi Andrew ,
> 1. I have SP4 ( 8.00.2040 ) .
> 2. If DB is in simple recovery mode , log is getting truncated (but space
> not released to OS , as expected) but for other recovery models backup log
> command sometimes truncates log and sometimes it won't .
> Thanks,
> Prabhu
>
> "Andrew J. Kelly" wrote:
>> Do you have the latest service pack? I have heard of other postings in
>> which the tempdb log grows but I can't find any KB on it. I think it was
>> fixed with a service pack. This KB might be helpful:
>> http://support.microsoft.com/Default.aspx?id=110139
>> As for # 2 if you are in Full or BulkLogged recovery mode you must do
>> regular log backups otherwise the log will continue to grow. A full
>> backup
>> does not truncate the log only a proper Log backup will do that as long
>> as
>> there are no open transactions.
>> --
>> Andrew J. Kelly SQL MVP
>>
>> "Prabhu" <Prabhu@.discussions.microsoft.com> wrote in message
>> news:8B5506DD-860D-4851-AAE6-AEB4005D753F@.microsoft.com...
>> > Thanks for your reply Kelly .
>> >
>> > I understand shrinking the physical file(s) is not part of backup .
>> > Truncation does not reduce the size of a physical log file, it reduces
>> > the
>> > size of the logical log file
>> >
>> > But I have 2 weird situations .
>> >
>> > 1. My tempdb log just grows out of control . Only way we could reuse
>> > the
>> > space is after explicitly using backup log with truncate option and
>> > dbcc
>> > shrinkfile .
>> > But , Log truncation should occur ,every time a checkpoint is
>> > processed,
>> > provided the database is using the simple recovery model (tempdb is in
>> > recovery model).
>> > 2. Other user DBs log files also grow , they are in full or
>> > Bulk_Logged
>> > recovery model . We have daily fulldb maintenance plan to take only
>> > full
>> > DB
>> > backup . Does it truncate the log ? But looks like unused space in log
>> > files
>> > are not being reused and log files are just extending .
>> > I have also used backup log command (without truncate_only) but still
>> > unused
>> > space is not reused but log file grows .( log truncation should occur
>> > after
>> > BACKUP LOG statement , right . )
>> >
>> > Thanks,
>> > Prabhu
>> >
>> > "Andrew J. Kelly" wrote:
>> >
>> >> Shrinking is NOT part of a backup, log or db. You must use either
>> >> DBCC
>> >> SHRINKDATABSE or SHRINKFILE to do that. Have a look at these:
>> >>
>> >> http://www.karaszi.com/SQLServer/info_dont_shrink.asp Shrinking
>> >> considerations
>> >> http://www.nigelrivett.net/TransactionLogFileGrows_1.html Log File
>> >> issues
>> >> http://www.support.microsoft.com/?id=317375 Log File Grows too big
>> >> http://www.support.microsoft.com/?id=110139 Log file filling up
>> >> http://www.support.microsoft.com/?id=315512 Considerations for
>> >> Autogrow
>> >> and AutoShrink
>> >> http://www.support.microsoft.com/?id=272318 Shrinking Log in SQL
>> >> Server
>> >> 2000 with DBCC SHRINKFILE
>> >> http://www.support.microsoft.com/?id=873235 How to stop the log file
>> >> from
>> >> growing
>> >> http://www.support.microsoft.com/?id=305635 Timeout while DB
>> >> expanding
>> >> http://www.support.microsoft.com/?id=307487 Shrinking TempDB
>> >>
>> >> --
>> >> Andrew J. Kelly SQL MVP
>> >>
>> >>
>> >> "Prabhu" <Prabhu@.discussions.microsoft.com> wrote in message
>> >> news:0CC4883D-7A2F-4701-94CC-4521F3B81A61@.microsoft.com...
>> >> > Hi ,
>> >> > When full db is backed up (using maintenance plan) , does
>> >> > transaction
>> >> > log get shrunk (inactive transactions are dropped from log) . Also
>> >> > does
>> >> > this
>> >> > space get released to OS .
>> >> > Can you pl. let me know answer for same question , when log is
>> >> > backed
>> >> > up
>> >> > explicity (using backup log without using truncate_only option ) .
>> >> > What could be the reasons , why my log is not getting shrunk after
>> >> > DB
>> >> > and
>> >> > log backup . What are the other options available apart from using
>> >> > truncate_only option and dbcc shrinkfile .
>> >> >
>> >> > Thanks,
>> >> > Prabhu
>> >>
>> >>
>> >>
>>|||Andrew ,
I have SP4 but still have issues with tempdb log (issue #1) , as I described
below . Can you pl. suggest me any solution . I also read from MS support
site ,using dbcc shrinkdatabase (and/or dbcc shrinkfile) could currept
tempdb . Right .
Pl. let me know .
--Prabhu
"Andrew J. Kelly" wrote:
> If there are any long running open transactions it can not truncate that
> portion of the log.
> --
> Andrew J. Kelly SQL MVP
>
> "Prabhu" <Prabhu@.discussions.microsoft.com> wrote in message
> news:14032F27-857D-4F34-9864-00A4D9514E67@.microsoft.com...
> > Hi Andrew ,
> >
> > 1. I have SP4 ( 8.00.2040 ) .
> > 2. If DB is in simple recovery mode , log is getting truncated (but space
> > not released to OS , as expected) but for other recovery models backup log
> > command sometimes truncates log and sometimes it won't .
> >
> > Thanks,
> > Prabhu
> >
> >
> > "Andrew J. Kelly" wrote:
> >
> >> Do you have the latest service pack? I have heard of other postings in
> >> which the tempdb log grows but I can't find any KB on it. I think it was
> >> fixed with a service pack. This KB might be helpful:
> >>
> >> http://support.microsoft.com/Default.aspx?id=110139
> >>
> >> As for # 2 if you are in Full or BulkLogged recovery mode you must do
> >> regular log backups otherwise the log will continue to grow. A full
> >> backup
> >> does not truncate the log only a proper Log backup will do that as long
> >> as
> >> there are no open transactions.
> >>
> >> --
> >> Andrew J. Kelly SQL MVP
> >>
> >>
> >> "Prabhu" <Prabhu@.discussions.microsoft.com> wrote in message
> >> news:8B5506DD-860D-4851-AAE6-AEB4005D753F@.microsoft.com...
> >> > Thanks for your reply Kelly .
> >> >
> >> > I understand shrinking the physical file(s) is not part of backup .
> >> > Truncation does not reduce the size of a physical log file, it reduces
> >> > the
> >> > size of the logical log file
> >> >
> >> > But I have 2 weird situations .
> >> >
> >> > 1. My tempdb log just grows out of control . Only way we could reuse
> >> > the
> >> > space is after explicitly using backup log with truncate option and
> >> > dbcc
> >> > shrinkfile .
> >> > But , Log truncation should occur ,every time a checkpoint is
> >> > processed,
> >> > provided the database is using the simple recovery model (tempdb is in
> >> > recovery model).
> >> > 2. Other user DBs log files also grow , they are in full or
> >> > Bulk_Logged
> >> > recovery model . We have daily fulldb maintenance plan to take only
> >> > full
> >> > DB
> >> > backup . Does it truncate the log ? But looks like unused space in log
> >> > files
> >> > are not being reused and log files are just extending .
> >> > I have also used backup log command (without truncate_only) but still
> >> > unused
> >> > space is not reused but log file grows .( log truncation should occur
> >> > after
> >> > BACKUP LOG statement , right . )
> >> >
> >> > Thanks,
> >> > Prabhu
> >> >
> >> > "Andrew J. Kelly" wrote:
> >> >
> >> >> Shrinking is NOT part of a backup, log or db. You must use either
> >> >> DBCC
> >> >> SHRINKDATABSE or SHRINKFILE to do that. Have a look at these:
> >> >>
> >> >> http://www.karaszi.com/SQLServer/info_dont_shrink.asp Shrinking
> >> >> considerations
> >> >> http://www.nigelrivett.net/TransactionLogFileGrows_1.html Log File
> >> >> issues
> >> >> http://www.support.microsoft.com/?id=317375 Log File Grows too big
> >> >> http://www.support.microsoft.com/?id=110139 Log file filling up
> >> >> http://www.support.microsoft.com/?id=315512 Considerations for
> >> >> Autogrow
> >> >> and AutoShrink
> >> >> http://www.support.microsoft.com/?id=272318 Shrinking Log in SQL
> >> >> Server
> >> >> 2000 with DBCC SHRINKFILE
> >> >> http://www.support.microsoft.com/?id=873235 How to stop the log file
> >> >> from
> >> >> growing
> >> >> http://www.support.microsoft.com/?id=305635 Timeout while DB
> >> >> expanding
> >> >> http://www.support.microsoft.com/?id=307487 Shrinking TempDB
> >> >>
> >> >> --
> >> >> Andrew J. Kelly SQL MVP
> >> >>
> >> >>
> >> >> "Prabhu" <Prabhu@.discussions.microsoft.com> wrote in message
> >> >> news:0CC4883D-7A2F-4701-94CC-4521F3B81A61@.microsoft.com...
> >> >> > Hi ,
> >> >> > When full db is backed up (using maintenance plan) , does
> >> >> > transaction
> >> >> > log get shrunk (inactive transactions are dropped from log) . Also
> >> >> > does
> >> >> > this
> >> >> > space get released to OS .
> >> >> > Can you pl. let me know answer for same question , when log is
> >> >> > backed
> >> >> > up
> >> >> > explicity (using backup log without using truncate_only option ) .
> >> >> > What could be the reasons , why my log is not getting shrunk after
> >> >> > DB
> >> >> > and
> >> >> > log backup . What are the other options available apart from using
> >> >> > truncate_only option and dbcc shrinkfile .
> >> >> >
> >> >> > Thanks,
> >> >> > Prabhu
> >> >>
> >> >>
> >> >>
> >>
> >>
> >>
>
>|||As I stated if you have long running open transactions in the db the log
file may not be able to be truncated. Try running DBCC OPENTRAN() in the
affected db's.
--
Andrew J. Kelly SQL MVP
"Prabhu" <Prabhu@.discussions.microsoft.com> wrote in message
news:B04001DD-4233-4E2B-B62C-F4E6C960D77A@.microsoft.com...
> Andrew ,
> I have SP4 but still have issues with tempdb log (issue #1) , as I
> described
> below . Can you pl. suggest me any solution . I also read from MS support
> site ,using dbcc shrinkdatabase (and/or dbcc shrinkfile) could currept
> tempdb . Right .
> Pl. let me know .
> --Prabhu
> "Andrew J. Kelly" wrote:
>> If there are any long running open transactions it can not truncate that
>> portion of the log.
>> --
>> Andrew J. Kelly SQL MVP
>>
>> "Prabhu" <Prabhu@.discussions.microsoft.com> wrote in message
>> news:14032F27-857D-4F34-9864-00A4D9514E67@.microsoft.com...
>> > Hi Andrew ,
>> >
>> > 1. I have SP4 ( 8.00.2040 ) .
>> > 2. If DB is in simple recovery mode , log is getting truncated (but
>> > space
>> > not released to OS , as expected) but for other recovery models backup
>> > log
>> > command sometimes truncates log and sometimes it won't .
>> >
>> > Thanks,
>> > Prabhu
>> >
>> >
>> > "Andrew J. Kelly" wrote:
>> >
>> >> Do you have the latest service pack? I have heard of other postings
>> >> in
>> >> which the tempdb log grows but I can't find any KB on it. I think it
>> >> was
>> >> fixed with a service pack. This KB might be helpful:
>> >>
>> >> http://support.microsoft.com/Default.aspx?id=110139
>> >>
>> >> As for # 2 if you are in Full or BulkLogged recovery mode you must do
>> >> regular log backups otherwise the log will continue to grow. A full
>> >> backup
>> >> does not truncate the log only a proper Log backup will do that as
>> >> long
>> >> as
>> >> there are no open transactions.
>> >>
>> >> --
>> >> Andrew J. Kelly SQL MVP
>> >>
>> >>
>> >> "Prabhu" <Prabhu@.discussions.microsoft.com> wrote in message
>> >> news:8B5506DD-860D-4851-AAE6-AEB4005D753F@.microsoft.com...
>> >> > Thanks for your reply Kelly .
>> >> >
>> >> > I understand shrinking the physical file(s) is not part of backup .
>> >> > Truncation does not reduce the size of a physical log file, it
>> >> > reduces
>> >> > the
>> >> > size of the logical log file
>> >> >
>> >> > But I have 2 weird situations .
>> >> >
>> >> > 1. My tempdb log just grows out of control . Only way we could
>> >> > reuse
>> >> > the
>> >> > space is after explicitly using backup log with truncate option and
>> >> > dbcc
>> >> > shrinkfile .
>> >> > But , Log truncation should occur ,every time a checkpoint is
>> >> > processed,
>> >> > provided the database is using the simple recovery model (tempdb is
>> >> > in
>> >> > recovery model).
>> >> > 2. Other user DBs log files also grow , they are in full or
>> >> > Bulk_Logged
>> >> > recovery model . We have daily fulldb maintenance plan to take only
>> >> > full
>> >> > DB
>> >> > backup . Does it truncate the log ? But looks like unused space in
>> >> > log
>> >> > files
>> >> > are not being reused and log files are just extending .
>> >> > I have also used backup log command (without truncate_only) but
>> >> > still
>> >> > unused
>> >> > space is not reused but log file grows .( log truncation should
>> >> > occur
>> >> > after
>> >> > BACKUP LOG statement , right . )
>> >> >
>> >> > Thanks,
>> >> > Prabhu
>> >> >
>> >> > "Andrew J. Kelly" wrote:
>> >> >
>> >> >> Shrinking is NOT part of a backup, log or db. You must use either
>> >> >> DBCC
>> >> >> SHRINKDATABSE or SHRINKFILE to do that. Have a look at these:
>> >> >>
>> >> >> http://www.karaszi.com/SQLServer/info_dont_shrink.asp Shrinking
>> >> >> considerations
>> >> >> http://www.nigelrivett.net/TransactionLogFileGrows_1.html Log File
>> >> >> issues
>> >> >> http://www.support.microsoft.com/?id=317375 Log File Grows too
>> >> >> big
>> >> >> http://www.support.microsoft.com/?id=110139 Log file filling up
>> >> >> http://www.support.microsoft.com/?id=315512 Considerations for
>> >> >> Autogrow
>> >> >> and AutoShrink
>> >> >> http://www.support.microsoft.com/?id=272318 Shrinking Log in SQL
>> >> >> Server
>> >> >> 2000 with DBCC SHRINKFILE
>> >> >> http://www.support.microsoft.com/?id=873235 How to stop the log
>> >> >> file
>> >> >> from
>> >> >> growing
>> >> >> http://www.support.microsoft.com/?id=305635 Timeout while DB
>> >> >> expanding
>> >> >> http://www.support.microsoft.com/?id=307487 Shrinking TempDB
>> >> >>
>> >> >> --
>> >> >> Andrew J. Kelly SQL MVP
>> >> >>
>> >> >>
>> >> >> "Prabhu" <Prabhu@.discussions.microsoft.com> wrote in message
>> >> >> news:0CC4883D-7A2F-4701-94CC-4521F3B81A61@.microsoft.com...
>> >> >> > Hi ,
>> >> >> > When full db is backed up (using maintenance plan) , does
>> >> >> > transaction
>> >> >> > log get shrunk (inactive transactions are dropped from log) .
>> >> >> > Also
>> >> >> > does
>> >> >> > this
>> >> >> > space get released to OS .
>> >> >> > Can you pl. let me know answer for same question , when log is
>> >> >> > backed
>> >> >> > up
>> >> >> > explicity (using backup log without using truncate_only option )
>> >> >> > .
>> >> >> > What could be the reasons , why my log is not getting shrunk
>> >> >> > after
>> >> >> > DB
>> >> >> > and
>> >> >> > log backup . What are the other options available apart from
>> >> >> > using
>> >> >> > truncate_only option and dbcc shrinkfile .
>> >> >> >
>> >> >> > Thanks,
>> >> >> > Prabhu
>> >> >>
>> >> >>
>> >> >>
>> >>
>> >>
>> >>
>>

Free up the transaction log

Hi ,
When full db is backed up (using maintenance plan) , does transaction
log get shrunk (inactive transactions are dropped from log) . Also does thi
s
space get released to OS .
Can you pl. let me know answer for same question , when log is backed up
explicity (using backup log without using truncate_only option ) .
What could be the reasons , why my log is not getting shrunk after DB and
log backup . What are the other options available apart from using
truncate_only option and dbcc shrinkfile .
Thanks,
PrabhuShrinking is NOT part of a backup, log or db. You must use either DBCC
SHRINKDATABSE or SHRINKFILE to do that. Have a look at these:
http://www.karaszi.com/SQLServer/info_dont_shrink.asp Shrinking
considerations
http://www.nigelrivett.net/Transact...ileGrows_1.html Log File issues
http://www.support.microsoft.com/?id=317375 Log File Grows too big
http://www.support.microsoft.com/?id=110139 Log file filling up
http://www.support.microsoft.com/?id=315512 Considerations for Autogrow
and AutoShrink
http://www.support.microsoft.com/?id=272318 Shrinking Log in SQL Server
2000 with DBCC SHRINKFILE
http://www.support.microsoft.com/?id=873235 How to stop the log file from
growing
http://www.support.microsoft.com/?id=305635 Timeout while DB expanding
http://www.support.microsoft.com/?id=307487 Shrinking TempDB
Andrew J. Kelly SQL MVP
"Prabhu" <Prabhu@.discussions.microsoft.com> wrote in message
news:0CC4883D-7A2F-4701-94CC-4521F3B81A61@.microsoft.com...
> Hi ,
> When full db is backed up (using maintenance plan) , does transaction
> log get shrunk (inactive transactions are dropped from log) . Also does
> this
> space get released to OS .
> Can you pl. let me know answer for same question , when log is backed up
> explicity (using backup log without using truncate_only option ) .
> What could be the reasons , why my log is not getting shrunk after DB and
> log backup . What are the other options available apart from using
> truncate_only option and dbcc shrinkfile .
> Thanks,
> Prabhu|||Thanks for your reply Kelly .
I understand shrinking the physical file(s) is not part of backup .
Truncation does not reduce the size of a physical log file, it reduces the
size of the logical log file
But I have 2 weird situations .
1. My tempdb log just grows out of control . Only way we could reuse the
space is after explicitly using backup log with truncate option and dbcc
shrinkfile .
But , Log truncation should occur ,every time a checkpoint is processed,
provided the database is using the simple recovery model (tempdb is in
recovery model).
2. Other user DBs log files also grow , they are in full or Bulk_Logged
recovery model . We have daily fulldb maintenance plan to take only full DB
backup . Does it truncate the log ? But looks like unused space in log files
are not being reused and log files are just extending .
I have also used backup log command (without truncate_only) but still unused
space is not reused but log file grows .( log truncation should occur after
BACKUP LOG statement , right . )
Thanks,
Prabhu
"Andrew J. Kelly" wrote:

> Shrinking is NOT part of a backup, log or db. You must use either DBCC
> SHRINKDATABSE or SHRINKFILE to do that. Have a look at these:
> http://www.karaszi.com/SQLServer/info_dont_shrink.asp Shrinking
> considerations
> http://www.nigelrivett.net/Transact...ileGrows_1.html Log File issues
> http://www.support.microsoft.com/?id=317375 Log File Grows too big
> http://www.support.microsoft.com/?id=110139 Log file filling up
> http://www.support.microsoft.com/?id=315512 Considerations for Autogrow
> and AutoShrink
> http://www.support.microsoft.com/?id=272318 Shrinking Log in SQL Server
> 2000 with DBCC SHRINKFILE
> http://www.support.microsoft.com/?id=873235 How to stop the log file fro
m
> growing
> http://www.support.microsoft.com/?id=305635 Timeout while DB expanding
> http://www.support.microsoft.com/?id=307487 Shrinking TempDB
> --
> Andrew J. Kelly SQL MVP
>
> "Prabhu" <Prabhu@.discussions.microsoft.com> wrote in message
> news:0CC4883D-7A2F-4701-94CC-4521F3B81A61@.microsoft.com...
>
>|||Do you have the latest service pack? I have heard of other postings in
which the tempdb log grows but I can't find any KB on it. I think it was
fixed with a service pack. This KB might be helpful:
http://support.microsoft.com/Default.aspx?id=110139
As for # 2 if you are in Full or BulkLogged recovery mode you must do
regular log backups otherwise the log will continue to grow. A full backup
does not truncate the log only a proper Log backup will do that as long as
there are no open transactions.
Andrew J. Kelly SQL MVP
"Prabhu" <Prabhu@.discussions.microsoft.com> wrote in message
news:8B5506DD-860D-4851-AAE6-AEB4005D753F@.microsoft.com...[vbcol=seagreen]
> Thanks for your reply Kelly .
> I understand shrinking the physical file(s) is not part of backup .
> Truncation does not reduce the size of a physical log file, it reduces the
> size of the logical log file
> But I have 2 weird situations .
> 1. My tempdb log just grows out of control . Only way we could reuse the
> space is after explicitly using backup log with truncate option and dbcc
> shrinkfile .
> But , Log truncation should occur ,every time a checkpoint is processed,
> provided the database is using the simple recovery model (tempdb is in
> recovery model).
> 2. Other user DBs log files also grow , they are in full or Bulk_Logged
> recovery model . We have daily fulldb maintenance plan to take only full
> DB
> backup . Does it truncate the log ? But looks like unused space in log
> files
> are not being reused and log files are just extending .
> I have also used backup log command (without truncate_only) but still
> unused
> space is not reused but log file grows .( log truncation should occur
> after
> BACKUP LOG statement , right . )
> Thanks,
> Prabhu
> "Andrew J. Kelly" wrote:
>|||Hi Andrew ,
1. I have SP4 ( 8.00.2040 ) .
2. If DB is in simple recovery mode , log is getting truncated (but space
not released to OS , as expected) but for other recovery models backup log
command sometimes truncates log and sometimes it won't .
Thanks,
Prabhu
"Andrew J. Kelly" wrote:

> Do you have the latest service pack? I have heard of other postings in
> which the tempdb log grows but I can't find any KB on it. I think it was
> fixed with a service pack. This KB might be helpful:
> http://support.microsoft.com/Default.aspx?id=110139
> As for # 2 if you are in Full or BulkLogged recovery mode you must do
> regular log backups otherwise the log will continue to grow. A full backu
p
> does not truncate the log only a proper Log backup will do that as long as
> there are no open transactions.
> --
> Andrew J. Kelly SQL MVP
>
> "Prabhu" <Prabhu@.discussions.microsoft.com> wrote in message
> news:8B5506DD-860D-4851-AAE6-AEB4005D753F@.microsoft.com...
>
>|||If there are any long running open transactions it can not truncate that
portion of the log.
Andrew J. Kelly SQL MVP
"Prabhu" <Prabhu@.discussions.microsoft.com> wrote in message
news:14032F27-857D-4F34-9864-00A4D9514E67@.microsoft.com...[vbcol=seagreen]
> Hi Andrew ,
> 1. I have SP4 ( 8.00.2040 ) .
> 2. If DB is in simple recovery mode , log is getting truncated (but space
> not released to OS , as expected) but for other recovery models backup log
> command sometimes truncates log and sometimes it won't .
> Thanks,
> Prabhu
>
> "Andrew J. Kelly" wrote:
>|||Andrew ,
I have SP4 but still have issues with tempdb log (issue #1) , as I described
below . Can you pl. suggest me any solution . I also read from MS support
site ,using dbcc shrinkdatabase (and/or dbcc shrinkfile) could currept
tempdb . Right .
Pl. let me know .
--Prabhu
"Andrew J. Kelly" wrote:

> If there are any long running open transactions it can not truncate that
> portion of the log.
> --
> Andrew J. Kelly SQL MVP
>
> "Prabhu" <Prabhu@.discussions.microsoft.com> wrote in message
> news:14032F27-857D-4F34-9864-00A4D9514E67@.microsoft.com...
>
>|||As I stated if you have long running open transactions in the db the log
file may not be able to be truncated. Try running DBCC OPENTRAN() in the
affected db's.
Andrew J. Kelly SQL MVP
"Prabhu" <Prabhu@.discussions.microsoft.com> wrote in message
news:B04001DD-4233-4E2B-B62C-F4E6C960D77A@.microsoft.com...[vbcol=seagreen]
> Andrew ,
> I have SP4 but still have issues with tempdb log (issue #1) , as I
> described
> below . Can you pl. suggest me any solution . I also read from MS support
> site ,using dbcc shrinkdatabase (and/or dbcc shrinkfile) could currept
> tempdb . Right .
> Pl. let me know .
> --Prabhu
> "Andrew J. Kelly" wrote:
>

free transaction log reader

There have been deleted several records from a table and i want to know who did it. Is there a free transactionlog reader to find out?
MarcelOriginally posted by swissis
There have been deleted several records from a table and i want to know who did it. Is there a free transactionlog reader to find out?

Marcel

try log explorer by Lumigent:
http://www.lumigent.com/products/le_sql/le_sql.htm|||I did download that one but it isn't free and the trial version only works on the pubs and northwind database.
Is there not another way to read or query the transactionlog?