.NET Tutorials, Forums, Interview Questions And Answers
Welcome :Guest
Sign In
Win Surprise Gifts!!!

Top 5 Contributors of the Month
Gaurav Pal
Post New Web Links

Tricky situation - Logs full and can't truncate **because of replication**, other similar posts do

Posted By:      Posted Date: April 14, 2011    Points: 0   Category :


   I'm in a situation where my backup failed and went unnoticed long enough for the log to consume the disk.  I've added additional log space on another drive, not desirable but either is a crashed db.  The issue seems to be that I have rouge transactions in the sys.dm_tran_active_transactions and can't get rid of them.

There a 6 rows that are named worktable and have a time stamp of 1-24-11 which is before I setup replication and I believe these are preventing the log from releasing it's space.  Can these rows be deleted if I can find the underlying sql table that's behind the sys.dm_tran_active_transactions view?  Well providing connecting to ADMIN:<dbname> puts me in a mode to do so.

SQL Server 2008 R2

Windows 2008 R2

Thanks for any help


View Complete Post

More Related Resource Links

Replication Failing, because log file is full


I am having a problem with replication between 2 databases.  Here is some context on the setup.

I have 2 database servers, which are both running SQL Server 2005.  Each database server contains a database called CRIS_TEST_ARCHIVE, these databases are setup as replication subscriber and publisher and replication has been running flawlessly so far.

As part of a project, we are archiving a lot of data, ie, removing it from the CRIS_TEST_ARCHIVE database and putting it into a different database.  the export went fine, and I am partway through the step of deleting the redundant data from the current database.  This involves deleting a lot of rows from the source database and then running replication to ensure that the deleted rows also get deleted from the other replicated database.

I am running the deletes for each table one by one, and then running replication manually.

After one particularly large delete (about 9 million rows) i again started replication and got the following error in the replication manager:


Error messages:
The Merge Agent was unable to update information about the last synchronization at the Subscriber. Ensure that the subscription exists at the Subscriber, and restart the Merge Agent.  (Source: MSSQL_REPL, Error number: MSSQL_REPL-2147199481)

Couldn't Truncate the log because of replication is pending

I want to truncate the transaction log.I got the error "The log was not truncated because records at the beginning of the log are pending replication or Change Data Capture. Ensure the Log Reader Agent or capture job is running or use sp_repldone to mark transactions as distributed or captured." I'm replicating from this server to two subscribers.But temporally i have stop the replication agents.How can i truncate the log file ?Please give the technical explanation for this message and solution with explanation.

ListBox tricky to set in a DataGrid/GridView

Listboxes are very tricky to set selected items in grid - there is no real nice way to do it. It would have been great if Microsoft included a property that accepts an array or comma separated values - or anything! But they only allow each item in the list to be selected individually. The way to do this in a grid is a bit messy, but it is fairly simple to implement. When a row is created (as per the event), select the items of the listbox as per the datagrid source data:

PDA Keyboard v1.0 Light Edition - Full Screen Keyboard

The default keypad on Windows Mobile is not at all finger friendly, there is no way you can use it with your fingers. I have trouble using the stylus with it too. But there are many freeware option available to make the SIP ( Software Input Panel - check the Glossary ) finger friendly. Some of these are HTC Diamond keyboard, Blimkeys, PocketCM Keyboard and then now we have PDA Keyboard v1.0 Light Edition from pdamedia.biz. When you hit the blue button it goes into fullscreen mode , then you can use both your hands for typing.

How do I preserve __viewstate between cross domain posts or how do I get a __viewstate of a Remote S


Here is what I want to do:
I have a local site in which I want to display data from a remote site
Lets say: I want to display data of http://www.abc.com/Default.aspx on my localhost

Now Default.aspx requires some post-data which it sends to itself. Thus the __viewstate and __eventvalidation are posted back to it by itself. I want to directly post the data to Default.aspx from localhost without opening Default.aspx and display the Default.aspx's response on my localhost.

The WebApp on http://www.abc.com is configured for __eventvalidation i.e. I cannot post-data to it from my localhost without getting a __viewstate from it. I also have to post the current __viewstate of http://www.abc.com/Default.aspx to itself

How can I accomplish it?

Is this load full or matching one only... coz of need to know performance



This my Two Table i have one doubt...

For my first table i have select Top 2 from Employee_info 

and second table itz just selct * from MDEp..

What my doubt is on loading the above report?

Is this load all the record from MDep or just matching one based on Employee_info..?

Toolbox: Database Audit Logs, Joel on Software, Code Handouts, and More


This month the Toolbox column takes a look at database logging, Joel Spolsky's blog, printing code projects, and ASP.NET reading.

Scott Mitchell

MSDN Magazine May 2008

Toolbox: Generate Office Documents, Monitor Event Logs, and More


Most data-driven Web sites are used as interfaces to collect, process, and summarize information. Reports that summarize the data can be presented to the user in a variety of formats-the most common way is to display the report directly in a Web page.

Scott Mitchell

MSDN Magazine June 2006

Office: Relive the Moment by Searching Your IM Logs with Custom Research Services


Often, IM conversations contain important information you'd like to keep and reuse. Fortunately, MSN Messenger 6.2 has a feature to keep a conversation history permanently in XML format. This article shows you how to leverage that conversation history by consolidating IM exchanges so they are indexed, searchable, and ultimately reusable using the Microsoft Office 2003 Research and Reference task pane.

John R. Durant

MSDN Magazine February 2005

implementing a search similar to what you have in google when you type in a word


Dear all;

I have a textbox and what I would like to implement is basically a situation similar to what you have in google when you type in a word. In otherwords,

in the textbox when you type in J, it should generate a list of names that starts with O in alphabetical order, then next when you type in o, so that now you have Jo, it should generate a list of names instead that now starts with Jo in alphabetical order, then again when you type in h, it should generate a list of names that starts with Joh and so on. A sample code could be helpful. Thank you. No Javascript of Jquery please. All help will be greatly appreciated.

Full text search in a Word document



  I´m currently programming a web search application in ASP.Net and having problem with full text searching. My requirements are:

1. Save a byte array from SQL server to word document as a temp file in a server side?

2. How to highlight the string I am currently searching in the Word document and return to the user the sentence with the highlighted string (like on Bing or any other search engines)? Is it possible to fullfill this requirement with full-text search integrated in SQL Server 2008?

Thanks in advance,




Change part of a page without full postback


I have a page with two columns. Initially, the left column will contain a list of links that are article titles. Clicking on one of the links will display the text of the article in the right column, keeping the list of titles in the left column. Clicking on another title will clear the text of the first article and display the second. Is there a way to accomplish this without having to repaint the whole page? I would rather not have the whole page resent each time a title is clicked, but rather have the page stay as is and only the contents of the right column get cleared and redisplayed. I assume there's a way to do this with JavaScript, but I don't know how and would appreciate some help. Thanks!

How to display recent blog posts in marquee up tag?


I need to display recent blog post in the blog site to the right panel.

i am able to display all the title of the posts using dataview. What i need is that it should scroll up, that is all the contents should be in the : Marquee direction="up" tag.

how can i scroll the recent post's?


Blog site Restrictions -- How to set an expiration date on blog posts

I just created a new Blog site in Sharepoint 2007, and set permisions to the users and admins.
Now, I have a question on how to set the post life time. Is there any setting to contral how many days that the posts can last in the blog? We want the post include the comments kept in the site for one month.

Please help.


How to see full navigation for Blogs in SharePoint?




   I want to customize the blogs ,  provided by  sharepoint .

  In the list of blogs I should be able to see the navigation

  as follows

  1)Blog Title and Date and Replies

  2) and navigation as Category of Post >Subcategory of Post > Title of Post

How to achieve this navigation  in sharepoint


Swati Jain



ASP.NetWindows Application  .NET Framework  C#  VB.Net  ADO.Net  
Sql Server  SharePoint  Silverlight  Others  All   

Hall of Fame    Twitter   Terms of Service    Privacy Policy    Contact Us    Archives   Tell A Friend