RE: Ldf file size is more then mdf file size -Publisher DB

RE: Ldf file size is more then mdf file size -Publisher DB

 

  


Hi

Create a scheduled task with the following script in the step.


-----------------------------------------
backup log DatabaseName with truncate_only
DBCC SHRINKDATABASE (DatabaseName)
-----------------------------------------

Replace "DatabaseName" with the name of your database
Schedule the task to run every night how often you feel fit.

My scheduled task is set to run every night at 12am so that the next I
know things should be fine and I wouldn't have any HHD space issues.


Hope this helps


Regards


-----Original Message-----
From: Nilesh Patil
[mailto:mssqldba-ezmlmshield-x13436054.[Email address protected]
Sent: 27 March 2008 09:13 AM
To: LazyDBA Discussion
Subject: RE: Ldf file size is more then mdf file size -Publisher DB

Best practices for this is run transactional backup, that frees up
commited
Log space. Then only you truncate the log file.

Also incase on replication, transactions which are marked for
replication if
that are not getting posted to Subscriber database then Publisher
database
Log file starts increasing.

For that check your replication status.

Regards,

Nilesh
SQL DBA

-----Original Message-----
From: Bowman Rita A.
[mailto:mssqldba-ezmlmshield-x1610404.[Email address protected]
Sent: Wednesday, March 26, 2008 4:26 PM
To: LazyDBA Discussion
Subject: RE: Ldf file size is more then mdf file size -Publisher DB

We have this happen with our 13G production database weekly. A job (in
my case - reindexing) expands the transaction log. We truncate the log
and immediately run a full backup as part of our process. Haven't had
any issues handling it in this manner.

hth

-----Original Message-----
From: Thakur Vinay (GE Healthcare consultant)
[mailto:mssqldba-ezmlmshield-x27771416.[Email address protected]
Sent: Tuesday, March 25, 2008 10:15 AM
To: LazyDBA Discussion
Subject: Ldf file size is more then mdf file size -Publisher DB



Morning All,

At production on publisher Database, on Friday evening our log reader
job
failed, I checked on Sunday morning, till that time it occupies all the
disk
space, and what I found is
backup size becomes 4 times more then actual. and ldf size becomes 2/3
times
more( it used to be less then mdf size),
After restarting the logreader agent- job, the backup file size becomes
normal, but my ldf file size is still high.... which is a my concern...
this
is occupying most of my disk space.

Please suggest me how to handle this, as replication is going on, and I
think its not good to truncate the log.

thinks are like this:
generally:
mdf: 4GB
ldf: 3.8GB
bak: 4GB

now
ldf file size is : 8.8GB

The output of:
DBCC sqlperf(logspace)
Database 8283.7422 1.110167 0

can I shrink the ldf? ... would it impact on my replication?

*** IT IS A PRODUCTION, PUBLISHER DATABASE

Please suggest. Its critical for me.
--
Thank you.
Regards,
Vinay Thakur







---------------------------------------------------------------------
TO REPLY TO EVERYBODY , PLEASE CLICK REPLY-ALL, NOT JUST REPLY
To post a dba job: http://jobs.lazydba.com
To subscribe : http://www.LazyDBA.com
To unsubscribe: http://www.lazydba.com/unsubscribe.html



---------------------------------------------------------------------
TO REPLY TO EVERYBODY , PLEASE CLICK REPLY-ALL, NOT JUST REPLY
To post a dba job: http://jobs.lazydba.com
To subscribe : http://www.LazyDBA.com
To unsubscribe: http://www.lazydba.com/unsubscribe.html



http://www.patni.com
World-Wide Partnerships. World-Class Solutions.
_____________________________________________________________________

This e-mail message may contain proprietary, confidential or legally
privileged information for the sole use of the person or entity to
whom this message was originally addressed. Any review, e-transmission
dissemination or other use of or taking of any action in reliance upon
this information by persons or entities other than the intended
recipient is prohibited. If you have received this e-mail in error
kindly delete this e-mail from your records. If it appears that this
mail has been forwarded to you without proper authority, please notify
us immediately at [Email address protected] and delete this mail.
_____________________________________________________________________


---------------------------------------------------------------------
TO REPLY TO EVERYBODY , PLEASE CLICK REPLY-ALL, NOT JUST REPLY
To post a dba job: http://jobs.lazydba.com
To subscribe : http://www.LazyDBA.com
To unsubscribe: http://www.lazydba.com/unsubscribe.html


MS Sql Server LazyDBA home page