dbTalk Databases Forums  

dts package and t log

microsoft.public.sqlserver.dts microsoft.public.sqlserver.dts


Discuss dts package and t log in the microsoft.public.sqlserver.dts forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
sqlsurfer
 
Posts: n/a

Default dts package and t log - 04-09-2004 , 10:46 AM






Why does the t-log appear to log the whole transaction of an import of data into a table when the database is in simple recovery model. I thought it would only log the extents that were effected but it takes a t log that is as large as the file being imported e.g. a 10 gig file needs 10 gigs worth of t-log space.

I know I can solve it by setting the commit batch size option but it is messing with my fundamental understanding of the t-log.

Reply With Quote
  #2  
Old   
Allan Mitchell
 
Posts: n/a

Default Re: dts package and t log - 04-09-2004 , 11:05 AM






Your understanding of the T Log is slightly out then.

The T Log must store all uncommitted data + any worktables.

Simple mode will allow SQL Server to use the Lazy Writer (I think) and flush
COMMITTED transactions from the log at intervals


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.mssqlserver.com/faq/logs-shrinklog.asp Shrink File
http://www.support.microsoft.com/?id=315512 Considerations for Autogrow
and AutoShrink
http://www.support.microsoft.com/?id=256650 INF: How to Shrink the SQL
Server 7.0 Tran Log
http://www.support.microsoft.com/?id=272318 INF: Shrinking Log in SQL
Server 2000 with DBCC SHRINKFILE



--
--

Allan Mitchell MCSE,MCDBA, (Microsoft SQL Server MVP)
www.SQLDTS.com - The site for all your DTS needs.
I support PASS - the definitive, global community
for SQL Server professionals - http://www.sqlpass.org


"sqlsurfer" <anonymous (AT) discussions (DOT) microsoft.com> wrote

Quote:
Why does the t-log appear to log the whole transaction of an import of
data into a table when the database is in simple recovery model. I thought
it would only log the extents that were effected but it takes a t log that
is as large as the file being imported e.g. a 10 gig file needs 10 gigs
worth of t-log space.
Quote:
I know I can solve it by setting the commit batch size option but it is
messing with my fundamental understanding of the t-log.




Reply With Quote
  #3  
Old   
Michael Vardinghus
 
Posts: n/a

Default Re: dts package and t log - 04-13-2004 , 11:44 AM



Hi All..

But isn't it possible to start a dts package and as the first step use some
kind af statement to tell sql not to fill up
the log-file ? No need for this when transporting data to a dw .. error
handling will be tackled as part of the package.

Of course it could break down in the middle ... but then i would have my old
dw environment and can run it again..

If this isn't possible how can i shrink the log (backup log (database) with
no_log) AND reduce the file size to the hereafter used space.

\Michael Vardinghus

Allan Mitchell <allan (AT) no-spam (DOT) sqldts.com> wrote

Quote:
Your understanding of the T Log is slightly out then.

The T Log must store all uncommitted data + any worktables.

Simple mode will allow SQL Server to use the Lazy Writer (I think) and
flush
COMMITTED transactions from the log at intervals


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.mssqlserver.com/faq/logs-shrinklog.asp Shrink File
http://www.support.microsoft.com/?id=315512 Considerations for
Autogrow
and AutoShrink
http://www.support.microsoft.com/?id=256650 INF: How to Shrink the SQL
Server 7.0 Tran Log
http://www.support.microsoft.com/?id=272318 INF: Shrinking Log in SQL
Server 2000 with DBCC SHRINKFILE



--
--

Allan Mitchell MCSE,MCDBA, (Microsoft SQL Server MVP)
www.SQLDTS.com - The site for all your DTS needs.
I support PASS - the definitive, global community
for SQL Server professionals - http://www.sqlpass.org


"sqlsurfer" <anonymous (AT) discussions (DOT) microsoft.com> wrote in message
news:7A312FCB-725D-4EE6-A067-0E9B147DA856 (AT) microsoft (DOT) com...
Why does the t-log appear to log the whole transaction of an import of
data into a table when the database is in simple recovery model. I
thought
it would only log the extents that were effected but it takes a t log that
is as large as the file being imported e.g. a 10 gig file needs 10 gigs
worth of t-log space.

I know I can solve it by setting the commit batch size option but it is
messing with my fundamental understanding of the t-log.





Reply With Quote
  #4  
Old   
Allan Mitchell
 
Posts: n/a

Default Re: dts package and t log - 04-13-2004 , 12:42 PM



You need to setup your destination to SIMPLE recovery model and insert in
batches. This way the log gets to breathe.

--
--

Allan Mitchell MCSE,MCDBA, (Microsoft SQL Server MVP)
www.SQLDTS.com - The site for all your DTS needs.
I support PASS - the definitive, global community
for SQL Server professionals - http://www.sqlpass.org


"Michael Vardinghus" <mivar (AT) wmdata (DOT) dk> wrote

Quote:
Hi All..

But isn't it possible to start a dts package and as the first step use
some
kind af statement to tell sql not to fill up
the log-file ? No need for this when transporting data to a dw .. error
handling will be tackled as part of the package.

Of course it could break down in the middle ... but then i would have my
old
dw environment and can run it again..

If this isn't possible how can i shrink the log (backup log (database)
with
no_log) AND reduce the file size to the hereafter used space.

\Michael Vardinghus

Allan Mitchell <allan (AT) no-spam (DOT) sqldts.com> wrote in message
news:ON#4SvkHEHA.3840 (AT) TK2MSFTNGP11 (DOT) phx.gbl...
Your understanding of the T Log is slightly out then.

The T Log must store all uncommitted data + any worktables.

Simple mode will allow SQL Server to use the Lazy Writer (I think) and
flush
COMMITTED transactions from the log at intervals


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.mssqlserver.com/faq/logs-shrinklog.asp Shrink File
http://www.support.microsoft.com/?id=315512 Considerations for
Autogrow
and AutoShrink
http://www.support.microsoft.com/?id=256650 INF: How to Shrink the SQL
Server 7.0 Tran Log
http://www.support.microsoft.com/?id=272318 INF: Shrinking Log in SQL
Server 2000 with DBCC SHRINKFILE



--
--

Allan Mitchell MCSE,MCDBA, (Microsoft SQL Server MVP)
www.SQLDTS.com - The site for all your DTS needs.
I support PASS - the definitive, global community
for SQL Server professionals - http://www.sqlpass.org


"sqlsurfer" <anonymous (AT) discussions (DOT) microsoft.com> wrote in message
news:7A312FCB-725D-4EE6-A067-0E9B147DA856 (AT) microsoft (DOT) com...
Why does the t-log appear to log the whole transaction of an import of
data into a table when the database is in simple recovery model. I
thought
it would only log the extents that were effected but it takes a t log
that
is as large as the file being imported e.g. a 10 gig file needs 10 gigs
worth of t-log space.

I know I can solve it by setting the commit batch size option but it
is
messing with my fundamental understanding of the t-log.







Reply With Quote
  #5  
Old   
Michael Vardinghus
 
Posts: n/a

Default Re: dts package and t log - 04-13-2004 , 12:45 PM



How is comitted to be understood ? When inserting and updating data is
comitted immediately ... in a dts package with lots of inserts and update's
this would mean
that there is no growth in the log file .. but there is. How come ?

\Michael V.


Allan Mitchell <allan (AT) no-spam (DOT) sqldts.com> wrote

Quote:
Your understanding of the T Log is slightly out then.

The T Log must store all uncommitted data + any worktables.

Simple mode will allow SQL Server to use the Lazy Writer (I think) and
flush
COMMITTED transactions from the log at intervals


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.mssqlserver.com/faq/logs-shrinklog.asp Shrink File
http://www.support.microsoft.com/?id=315512 Considerations for
Autogrow
and AutoShrink
http://www.support.microsoft.com/?id=256650 INF: How to Shrink the SQL
Server 7.0 Tran Log
http://www.support.microsoft.com/?id=272318 INF: Shrinking Log in SQL
Server 2000 with DBCC SHRINKFILE



--
--

Allan Mitchell MCSE,MCDBA, (Microsoft SQL Server MVP)
www.SQLDTS.com - The site for all your DTS needs.
I support PASS - the definitive, global community
for SQL Server professionals - http://www.sqlpass.org


"sqlsurfer" <anonymous (AT) discussions (DOT) microsoft.com> wrote in message
news:7A312FCB-725D-4EE6-A067-0E9B147DA856 (AT) microsoft (DOT) com...
Why does the t-log appear to log the whole transaction of an import of
data into a table when the database is in simple recovery model. I
thought
it would only log the extents that were effected but it takes a t log that
is as large as the file being imported e.g. a 10 gig file needs 10 gigs
worth of t-log space.

I know I can solve it by setting the commit batch size option but it is
messing with my fundamental understanding of the t-log.





Reply With Quote
  #6  
Old   
Sue Hoegemeier
 
Posts: n/a

Default Re: dts package and t log - 04-13-2004 , 12:59 PM



The transaction may have been committed but not yet flushed
to disk - the pages for these transactions are in the buffer
cache. That's why the log will still grow as it needs to
keep track of these transactions so that they can be rolled
forward, applied if something happens where you have a
system problem, crash the server, etc. When SQL Server comes
back online, it can read those transactions from the log and
apply them even though they weren't yet physically flushed
to disk.

-Sue

On Tue, 13 Apr 2004 19:45:26 +0200, "Michael Vardinghus"
<mivar (AT) wmdata (DOT) dk> wrote:

Quote:
How is comitted to be understood ? When inserting and updating data is
comitted immediately ... in a dts package with lots of inserts and update's
this would mean
that there is no growth in the log file .. but there is. How come ?

\Michael V.


Allan Mitchell <allan (AT) no-spam (DOT) sqldts.com> wrote in message
news:ON#4SvkHEHA.3840 (AT) TK2MSFTNGP11 (DOT) phx.gbl...
Your understanding of the T Log is slightly out then.

The T Log must store all uncommitted data + any worktables.

Simple mode will allow SQL Server to use the Lazy Writer (I think) and
flush
COMMITTED transactions from the log at intervals


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.mssqlserver.com/faq/logs-shrinklog.asp Shrink File
http://www.support.microsoft.com/?id=315512 Considerations for
Autogrow
and AutoShrink
http://www.support.microsoft.com/?id=256650 INF: How to Shrink the SQL
Server 7.0 Tran Log
http://www.support.microsoft.com/?id=272318 INF: Shrinking Log in SQL
Server 2000 with DBCC SHRINKFILE



--
--

Allan Mitchell MCSE,MCDBA, (Microsoft SQL Server MVP)
www.SQLDTS.com - The site for all your DTS needs.
I support PASS - the definitive, global community
for SQL Server professionals - http://www.sqlpass.org


"sqlsurfer" <anonymous (AT) discussions (DOT) microsoft.com> wrote in message
news:7A312FCB-725D-4EE6-A067-0E9B147DA856 (AT) microsoft (DOT) com...
Why does the t-log appear to log the whole transaction of an import of
data into a table when the database is in simple recovery model. I
thought
it would only log the extents that were effected but it takes a t log that
is as large as the file being imported e.g. a 10 gig file needs 10 gigs
worth of t-log space.

I know I can solve it by setting the commit batch size option but it is
messing with my fundamental understanding of the t-log.





Reply With Quote
  #7  
Old   
Allan Mitchell
 
Posts: n/a

Default Re: dts package and t log - 04-13-2004 , 03:10 PM



INSERTING and UPDATING is not necessarily committed straight away. By
Default DTS says "Only commit the rows after the last one has gone through".
You can change this behaviour on the last tab of the datapump. The rows not
committed are held in the T Log for consistency. If you commit in batches
then you may have a siruation where some early batches commit but hen one
fails so is not committed.

Basically the default behaviour of TSQL/DTS is "All in or All Out"



--
--

Allan Mitchell MCSE,MCDBA, (Microsoft SQL Server MVP)
www.SQLDTS.com - The site for all your DTS needs.
I support PASS - the definitive, global community
for SQL Server professionals - http://www.sqlpass.org


"Michael Vardinghus" <mivar (AT) wmdata (DOT) dk> wrote

Quote:
How is comitted to be understood ? When inserting and updating data is
comitted immediately ... in a dts package with lots of inserts and
update's
this would mean
that there is no growth in the log file .. but there is. How come ?

\Michael V.


Allan Mitchell <allan (AT) no-spam (DOT) sqldts.com> wrote in message
news:ON#4SvkHEHA.3840 (AT) TK2MSFTNGP11 (DOT) phx.gbl...
Your understanding of the T Log is slightly out then.

The T Log must store all uncommitted data + any worktables.

Simple mode will allow SQL Server to use the Lazy Writer (I think) and
flush
COMMITTED transactions from the log at intervals


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.mssqlserver.com/faq/logs-shrinklog.asp Shrink File
http://www.support.microsoft.com/?id=315512 Considerations for
Autogrow
and AutoShrink
http://www.support.microsoft.com/?id=256650 INF: How to Shrink the SQL
Server 7.0 Tran Log
http://www.support.microsoft.com/?id=272318 INF: Shrinking Log in SQL
Server 2000 with DBCC SHRINKFILE



--
--

Allan Mitchell MCSE,MCDBA, (Microsoft SQL Server MVP)
www.SQLDTS.com - The site for all your DTS needs.
I support PASS - the definitive, global community
for SQL Server professionals - http://www.sqlpass.org


"sqlsurfer" <anonymous (AT) discussions (DOT) microsoft.com> wrote in message
news:7A312FCB-725D-4EE6-A067-0E9B147DA856 (AT) microsoft (DOT) com...
Why does the t-log appear to log the whole transaction of an import of
data into a table when the database is in simple recovery model. I
thought
it would only log the extents that were effected but it takes a t log
that
is as large as the file being imported e.g. a 10 gig file needs 10 gigs
worth of t-log space.

I know I can solve it by setting the commit batch size option but it
is
messing with my fundamental understanding of the t-log.







Reply With Quote
  #8  
Old   
Michael V
 
Posts: n/a

Default Re: dts package and t log - 04-14-2004 , 08:36 AM



Thanks Su

Does this mean that the log file doesn't physically grow during execution of the package and supplying th
package with truncate log at the end will prevent it from doing so

\Michael V.

Reply With Quote
  #9  
Old   
Michael V
 
Posts: n/a

Default Re: dts package and t log - 04-14-2004 , 08:36 AM



Ah

All in ... is that one step in the package or the whole package ..

\Michael V.

Reply With Quote
  #10  
Old   
Allan Mitchell
 
Posts: n/a

Default Re: dts package and t log - 04-14-2004 , 08:52 AM



All in = at the task.

--
--

Allan Mitchell MCSE,MCDBA, (Microsoft SQL Server MVP)
www.SQLDTS.com - The site for all your DTS needs.
I support PASS - the definitive, global community
for SQL Server professionals - http://www.sqlpass.org


"Michael V" <anonymous (AT) discussions (DOT) microsoft.com> wrote

Quote:
Aha

All in ... is that one step in the package or the whole package .. ?

\Michael V.



Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.3
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.