June 17, 2010 at 8:56 am
I am user 2005 with SP3, and try to shrink the database, db is in simple mode. even I stop the distributor agent job but db is not shrink including log file.
June 17, 2010 at 8:59 am
how much free space is in the database file?
June 17, 2010 at 9:02 am
still I have 35GB free space, but the log file increasing very fast. I already add two files
June 17, 2010 at 9:11 am
Sounds like you have a runaway process.
If there is that much transaction occurring in your database, you should consider implementing Full Backups.
Also, you need to find the process causing such growth.
Here is an article to help find the cause of your growth.
http://www.sqlservercentral.com/articles/Log+growth/69476/
Jason...AKA CirqueDeSQLeil
_______________________________________________
I have given a name to my pain...MCM SQL Server, MVP
SQL RNNR
Posting Performance Based Questions - Gail Shaw[/url]
Learn Extended Events
June 17, 2010 at 9:15 am
I do not mind the growth, but want to shrink the log file, that is not happening
June 17, 2010 at 9:17 am
you wont be able to shrink it if there are open transactions.
June 17, 2010 at 9:22 am
I want to shrink the log file, I try to stop the distributor agent job, so tran going on, but when I run this
select name,log_reuse_wait, log_reuse_wait_desc from sys.databases
I can see db is use for replication
DB_Replicated 6REPLICATION
June 17, 2010 at 10:11 am
MAK-1128556 (6/17/2010)
I do not mind the growth, but want to shrink the log file, that is not happening
If you shrink it, it will just grow again. That can be extremely detrimental to performance. You need to be careful of vlfs and io that can cause poor performance when the log grows.
Jason...AKA CirqueDeSQLeil
_______________________________________________
I have given a name to my pain...MCM SQL Server, MVP
SQL RNNR
Posting Performance Based Questions - Gail Shaw[/url]
Learn Extended Events
June 17, 2010 at 11:16 am
Is this the publisher? Is the log reader running? If not, the log will not be cleared and will grow.
Gail Shaw
Microsoft Certified Master: SQL Server, MVP, M.Sc (Comp Sci)
SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability
June 17, 2010 at 11:40 am
this db is subscription db, i stop the log reader job and then run the shrink the db but it is not shrinking the log file.
June 17, 2010 at 11:43 am
Don't stop the log reader. It has to be running (and running without error) to mark log space as reusable.
Are you sure (100% sure) that this is the subscriber, not the publisher? A subscriber shouldn't have a log reader. What does the following return?
DBCC OPENTRAN
Gail Shaw
Microsoft Certified Master: SQL Server, MVP, M.Sc (Comp Sci)
SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability
June 17, 2010 at 11:48 am
I am 110% sure this db is a subscriber
Transaction information for database 'DB_Replicated '.
Oldest active transaction:
Replicated Transaction Information:
Oldest distributed LSN : (318309:27942:217)
Oldest non-distributed LSN : (318310:16285:1)
DBCC execution completed. If DBCC printed error messages, contact your system administrator.
ALSO when I ran this
select name,log_reuse_wait, log_reuse_wait_desc from sys.databases
CRS5_OLTP_Replicated 6REPLICATION
June 17, 2010 at 11:52 am
MAK-1128556 (6/17/2010)
I am 110% sure this db is a subscriberReplicated Transaction Information:
Oldest distributed LSN : (318309:27942:217)
Oldest non-distributed LSN : (318310:16285:1)
There is no way that this database is not published. It's configured as a transactional replication publisher and there have been transactions distributed in the past. It may be a subscriber, but it's also a publisher. Check that the log reader is running correctly.
Gail Shaw
Microsoft Certified Master: SQL Server, MVP, M.Sc (Comp Sci)
SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability
June 17, 2010 at 12:52 pm
Thanks Gail,
somehow(by mistake) this db is also use as publisher too, but I am not replication any data for that database.
June 17, 2010 at 12:59 pm
Then drop the publication. By having it there (and I assume not having the log reader running) the log cannot be reused because it's marked for replication.
Once you've dropped the publication(s), run DBCC OPENTRAN again.
Gail Shaw
Microsoft Certified Master: SQL Server, MVP, M.Sc (Comp Sci)
SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability
Viewing 15 posts - 1 through 15 (of 15 total)
You must be logged in to reply to this topic. Login to reply