all groups > sql server replication > october 2006 >
You're in the

sql server replication

group:

Transaction log way too large - no transactional replication involved!



Transaction log way too large - no transactional replication involved! Susanne Wenzel
10/12/2006 12:00:00 AM
sql server replication: Hi to everyone,

our transaction log (again) has reached an unbelievable size (about 4,6 Gb,
the corresponding database has about 200 Mb). We do a backup every night
(full recovery model). Our system: SQL Server 2000 SP4 (publisher and
distributor identical, the publisher itself has no subscriptions), Windows
Server 2000 SP4, several (trusted) domains, clients Win2k Pro SP4. We have
snapshot and merge replication, definitely *no transactional replication*.
We never had *any* transactional replication at any given time, because
right from the beginning this type was no option for our scenario so we
never even tested it.

The common way with DBCC Shrinkfile, DBCC Loginfo, backup log and the like
is not successful, I get the following message:

The log was not truncated because records at the beginning
of the log are pending replication. Ensure the Log Reader
Agent is running or use sp_repldone to mark transactions
as distributed.

I know one way that is suggested (with sp_repldone and so on) to solve this
problem and reduce the size of the log. We had the same problem before and
used the repldone-thing successfully, but I'd like to avoid that for now.
For it seems to me this way is only temporary because the log will be
building up again, as I experience now.

Our situation is best described here:

*(den folgenden Link bitte in /eine/ Zeile)*
http://groups.google.de/group/comp.databases.ms-sqlserver/browse_frm/thread/23ca52b9df791e59/9ee4e7d0f089ab98?lnk=st&q=transaction+log+replication+merge&rnum=5#9ee4e7d0f089ab98

So far I've got the impression that people think, this problem can only
occur if you use transactional replication but again I assure we have none
of that!

This thread also fits very neatly to my problem:

*(den folgenden Link bitte in /eine/ Zeile)*
http://groups.google.de/group/microsoft.public.sqlserver.replication/browse_frm/thread/456d4407ad85ede5/7b942db4b21d44cf?lnk=st&q=transaction+log+replication+merge&rnum=10#7b942db4b21d44cf

It looks like the poster opened a PSS-Ticket, is there any chance to learn
about the state of this ticket?

I've invested quite a few hours to get nearer to the problem. I ran a DBCC
OPENTRAN WITH TABLERESULTS and got the following back:

REPL_DIST_OLD_LSN (0:0:0)
REPL_NONDIST_OLD_LSN (41204:61:1)

I've found another thread that deals with this problem:

*(den folgenden Link bitte in /eine/ Zeile)*
http://groups.google.de/group/microsoft.public.sqlserver.replication/browse_frm/thread/6972cf1f0c26f0b/47e34c0887db4e8b?lnk=st&q=REPL_NONDIST_OLD_LSN&rnum=1#47e34c0887db4e8b

(At least I can tell that we are not running DataMirror)

My aim/wish is to get this pending transaction going so the log can shrink
on its own accord.

A dbcc log gave me among a *huge* amount of other entries a BEGIN_XACT, but
no corresponding COMMIT_XACT back (as I remember it from my home right now,
but I can look it up another time). The usual way to end an open
transaction as I understand, is to get the SPID and then use KILL, but this
is getting me nowhere as I'm not getting a spid back. And of course we have
no log reader agent showing up in EM that we could start manually.

I'd really like to know what this is all about, I don't understand what's
going on and I'd love to!

Thanks for reading, any help is greatly appreciated.

Greetings from Germany
Re: Transaction log way too large - no transactional replication involved! Paul Ibison
10/12/2006 12:00:00 AM
Susanne,
there's no way to find out the outcome of the PSS call unless they post it
themselves, as this is confidential client info. However if you open a PSS
call yourself no doubt they'll cross reference your query with other similar
cases. In fact that's what I'd do in your case. DBCC OPENTRAN shows
undistributed transactions but you don't have (and never had) replication
set up, so I'd open a PSS case.
Rgds,
Paul Ibison

Re: Transaction log way too large - no transactional replication involved! Adam Patrick Cassidy
10/12/2006 9:29:04 AM
Susanne,

Can you reply with the results from running the following query in the
database you are having problems with:

SELECT * FROM syspublications

Adam P. Cassidy
MCDBA, MCSE, MCSA, MCT


[quoted text, click to view]

Re: Transaction log way too large - no transactional replication involved! Adam Patrick Cassidy
10/12/2006 3:42:44 PM
General information about your publications. A starting point for providing
you an answer.

Adam

[quoted text, click to view]

Re: Transaction log way too large - no transactional replication involved! Susanne Wenzel
10/12/2006 9:20:30 PM
Hi Adam,
Am Thu, 12 Oct 2006 09:29:04 -0400 schrieb Adam Patrick Cassidy:

[quoted text, click to view]

yes, I can do that but as I had a day off today this will not be before
tomorrow evening. Could you tell me in advance what kind of entry/entries
you expect?

Just out of curiosity...

Greetings
Re: Transaction log way too large - no transactional replication involved! zerg2k NO[at]SPAM yahoo.com
10/13/2006 2:32:19 PM
I am aware of the issues with the transaction Log.
I have been working with MS India without any results :-(
I do believe they have problems with the transaction log handling code.
I have proof of it, but MS is not willing to acknowledge they have
problems with it in SS 2005 SP1

I hope someone here can shed some light in this issue :-)

I have also started a thread

Regards,

Noel
Sr. DBA


[quoted text, click to view]
Re: Transaction log way too large - no transactional replication involved! Susanne Wenzel
10/13/2006 9:39:41 PM
Hi Adam,
Am Thu, 12 Oct 2006 09:29:04 -0400 schrieb Adam Patrick Cassidy:

[quoted text, click to view]

And here it goes (I've only included columns that had a value, since there
are so many columns in the resultset):

description MyDescription
name MyName
pubid 1
repl_freq 1
status 1
sync_method 0
independent_agent FALSE
immediate_sync FALSE
enabled_for_internet FALSE
allow_push TRUE
allow_pull TRUE
allow_anonymous FALSE
immediate_sync_ready FALSE
allow_sync_tran FALSE
autogen_sync_procs FALSE
retention 0
allow_queued_tran FALSE
snapshot_in_defaultfolder TRUE
post_snapshot_script PathAndNameOfMySnapshotScript.sql
compress_snapshot FALSE
ftp_port 21
ftp_login anonymous
allow_dts FALSE
allow_subscription_copy FALSE
conflict_retention 14
backward_comp_level 10

I hope you can read this properly.

BTW I have to correct 2 points of my opening posting:

1.
My Publisher&Distributor has subscriptions, all of them are internal
between databases of the Publisher&Distributor, all of them snapshot
replications.

2.
We do not do a backup of the transaction log every night but only once a
week (which was very astonishing to me, I remembered otherwise). I checked
this up today.

The situation is starting to become alarming now, because the transaction
log is now so huge, it costs us all of our harddrive space which is not
tolerable. So I think I have to do the repldone-thing out of pure necessity
although I hate that. Which also means that I can forget about the
PSS-Ticket because I assume the size of our transaction log will turn back
to normal for a while after I've done all those steps.

The thing that puzzles me right now is the size of the backup-file of that
particular database (produced through a maintenance plan which consists of
a backup of the database and does *not* contain a backup of the transaction
log, we do a backup of that by a separate maintenance plan).

It so happens that the size of this backupfile is nearly (close to 100%)
the size of the database-file *plus* the size of the logfile which is very
irritating to me (and that backupfile of course has also reached a size
that is really ridiculous).

We've got several other databases on that server, *all* of them have their
backup by the same maintenance plans. And in *all other cases* the backup
file fits roughly to the size of the database file alone as I would expect
it.

This is another thing I can't understand. I tried to find something about
database file sizes in Kalen Delaney's book but wasn't fortunate. I will
search the net, see if I can find something there about this second strange
thing.

My overall opinion is that there is some kind of bug involved but what can
one really do? You have to keep the system going there is no other
choice...

Thanks for your help and
Greetings from Germany
Re: Transaction log way too large - no transactional replication involved! Susanne Wenzel
10/14/2006 12:00:00 AM
Hi Noel,
Am 13 Oct 2006 14:32:19 -0700 schrieb zerg2k@yahoo.com:

thanks for participating, of course I read your threads here.:-)

[quoted text, click to view]

Sounds like you opened a PSS-Ticket to no avail?
So I don't have to think about it because there is no chance anyway...

[quoted text, click to view]

Well, at least I think your chances are better than mine, regarding the
fact that you work with SQL 2005. This will be more interesting to the
developers than my case since we are working with SQL 2000. And our
situations are different since you deal with transactional replication and
I do not. But after what I experience here I agree with you: they *do* have
problems with the transaction log handling code, no matter what scenario
you actually have.

[quoted text, click to view]

FACK, I do definitely join your forces in this matter :-)

[quoted text, click to view]

And you did get an answer from Raymond that might be a start. I'll follow
that thread but my hopes are not high that there will be something useful
for my scenario.

Well, you never know, do you?

Greetings from Germany to India
Re: Transaction log way too large - no transactional replication involved! zerg2k NO[at]SPAM yahoo.com
10/14/2006 7:05:14 AM
Suzanne first of all I am glad to participate on these forums... I hope
my input can help others.

[quoted text, click to view]
frequently, not once a week. It is really strange to see a message like
that on a log that has no transactional replication setup.

These are my recomendations for you:
1. It could be the case that someone set up transactional replication
temporarily and somehow at cleanup time it didn't worked correctly. If
this was the case, I would remove all replication settings... all the
way till you run sp_replicationdbobtion to mark the datatabase as not
replicated, make sure your log is clean etc, in other words start fresh
and re-establish replication again.

2. The database backup command does *not* clean up the log when your
database is marked as published, therefore you do need tlog backups and
they better be frequent.

3. In some cases I have seen issues where the database was backed up on
a server where it was being replicated (transactionally) and when
restored on a different one, the log had to be cleaned up because some
of the transactions in there were sitll marked as in use. Again Step 1
is your friend.


Regards,
Noel
Sr. DBA


[quoted text, click to view]
Re: Transaction log way too large - no transactional replication involved! Susanne Wenzel
10/16/2006 6:14:46 AM
Hi Neil,
Am 14 Oct 2006 07:05:14 -0700 schrieb zerg2k@yahoo.com:

[quoted text, click to view]

yes, that is what drives me in this issue as well. Just for fun I recently
googled the web with REPL_NONDIST_OLD_LSN (nothing more than that) and got
10 results, more or less all of them were questions from users. So this
seems to be a black box somehow.

[quoted text, click to view]

Ask me. Well, we can do that now. Yesterday we ran the whole
sp_repldone-thing and we finally succeeded. Before we did this, our
transaction log had the size of roughly 6,7 GB, now it is down to 0,6 MB.
An uneasy feeling remains on my part.

With this size we can do a backup daily, no problem. And we think about
running a dbcc opentran every morning to see when this problem rises again
(as I'm sure it will do). Could be easier to go looking for the cause when
the transaction log is not so monstrous.

[quoted text, click to view]

Sounds quite like a major undertaking to me regarding the fact we've got
about 60 subscribers... I'll think about that.

[quoted text, click to view]

See above (but I wonder whether this will really help?)

[quoted text, click to view]

I'll keep that in mind as soon as we have our first transactional
replication.

Thanks a lot for your help and good luck for you
Greetings
AddThis Social Bookmark Button