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

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

Transaction Log Management issue

Posted By:      Posted Date: September 15, 2010    Points: 0   Category :Sql Server
I'm trying to load A LOT of data to a table, -- about 64million records.  The load process itself will take hours to run and every time I tried it, I got "log is full" error.  I've set the max size to 80G now for the transaction log.  I also scheduled a job to run every 10 mins to shrink the log file.  But it doesn't help at all.  Here are my questions: 1. how to estimate the max size of the log file?  I don't want it to grow unlimited. 2. how to keep the log file as small as possible during the load process?  It'll be the best to me if it can be turned off.  Because I don't need the transaction log at all.   Please help.  It's pretty urgent as I'm very frustrated because of this log issue.  I've tried many times, and the job failed every time.  I'm getting nowhere. Thanks.

View Complete Post

More Related Resource Links

Custom controls and ViewState management issue



I want to know that when we create custom controls, then is there State Management through ViewState done automatically or we have to handle it explicitely ?Since i have created Custom Controls that is behaving as if it is not maintaining its state on PostBack.

Memory Management issue while calling COM method from .Net component

Hi all,  The Com Component Method say(GetChildresponse) requires Byte pointer as input. From .Net Component, while calling GetChildResponse  I am creating IntPtr and passing it to Component.  I am only creating the pointer in my .Net Component but allocation of bytes(CoTaskMemAlloc) happens at COM Method. After populating the pointer buffer, I am transferring to memory buffer in .Net method and Free the memorry of the pointer using "Marshal.FreeCoTaskMem" method.  Still I am not sure, whether it is deallocating the memory since the Garbarge collector wont happen immediately.  We are hitting on performance issue while doing load testing and we suspect this might be due to memory allocation that is not getting deallocated properly. Any pointers would be helpful. Thanks, Nithya Sample Code: unsafe {   // Get the physical memory address ocpHeaderBufferPointer = new IntPtr((void*)&ocpHeaderBufferPointer); temporaryResponseBufferPointer = new IntPtr((void*)&temporaryResponseBufferPointer); }   try {   try {   // Call the GetResponse of the pass through ocpChannel   new OCPChannelDSClass().GetResponse((uint)transactionId, ocpHeaderBufferPointer, out ocpHeaderBufferSize, temporaryResponseBufferPointer, out temporaryResponseBufferSize, (uint)timeout); }   catch (Exception ex) { &nbs

A transaction sql issue, Please see and suggest,,,,,,,,


There is a table

ID        Grade

1            a

1           b

2           a

3          a

3          b

4          a

4          b


I want to retrive the data and output as

ID      Grade

1         a|b

2          a

3         a|b

4         a|b

It looks that the data can not be  [group by] and join the string  in the same group by any existing system function,

We can use cursor to join those data by comparing the id

Do you have any better solution?


Time card management template issue


We installed Time card management template in share point 2007. But punch in, punch out time log is not working

how to solve this issue

Time card management template workflow issue


If we installed Time card management template in share point 2007 By default it will be working (work flow) right?

Otherwise we have to configure anything?

If i try this workflow message is failed to start

Issue with non-replicated transaction in Log file


Hi All,

I'm trying to shrink my Transaction log. Its taking 8 GB of space and I'm getting out of space on this drive. The database is in SIMPLE recovery model.

The problem is that when I see the log info using DBCC LogInfo() it shows 2723 rows with Status of 2. I issued the Checkpoint command many times as well. There are very few rows with Status 0 which are removed when I shrink the file. But these 2723 rows with Status of active-tran are taking up the most space and are not getting cleared.

I had restared the sql server service manytimes (just for experimenting). Eventually, I exectued the DBCC OPENTRANS command; which tells me that there is a non-distributed transaction in T.Log. This transaction is the very first transaction in T.Log file with Status 2 and Parity 128.

This server used to work as Publisher few months back. All the Subscriptions have been deleted and the relavant Distributor and Subscriber have been re-formatted and re-installed since then. Now when I try to drop the Local Publications from this local server it gives me error for relevant Distributor or Subscribor machines which do not exist any more.

How should I truncate this Log file and unmark this pending non-distributed transaction from T.Log.

Kindly help me out with this :(.

Issue with CKS:FBA Self Management


I download and Implemented Forms Based Authentication Windows Solution Package  from codeplex successfully. Everything seems to be working. But whenever I try to activate the FBA Self Managment feature, I am getting following error

Dependency feature with id 01aa8d8b-000a-4c35-8f4f-5d1280377650 for feature 'FBAManagementSelf' (id: 23c44729-fb03-4882-a0bf-c6fb3ddd81fd) is not installed

Please let me know Am I missing anything


microsoft management console issue in SQL Server 2000


Hi Team,

I have an issue starting the management console (enterprise manager), Installed SQL Server 2000 and when i try to open the enterprise manager got a pop-up Microsoft management console the selected file cannot be found.

more info installed using my username but am not the admin of the machine is this causing the issue, though i didn't face any issue in the installation and i haven't restarted the server after installation.

Any help would be greatly appreciated!!



Transaction issue with WCF call


Hi I am facing a strange issue. Its really strange for me. I have a Slef hosted WCF Service. I have multiple clients. My service is executing a lengthy database operation which involved a open transaction, and close transaction methods in c# code requested by one client. Now another client request for a dataabase operation which does not have a open transaction code. Here my code fails with message given below.

ERR  : System.InvalidOperationException: The transaction is either not associated with the current connection or has been completed.
at System.Data.SqlClient.SqlCommand.ValidateCommand(String method, Boolean async)
at System.Data.SqlClient.SqlCommand.RunExecuteReader(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, String method, DbAsyncResult result)
at System.Data.SqlClient.SqlCommand.RunExecuteReader(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, String method)
at System.Data.SqlClient.SqlCommand.ExecuteReader(CommandBehavior behavior, String method)
at System.Data.SqlClient.SqlCommand.ExecuteDbDataReader(CommandBehavior behavior)
at System.Data.Common.DbCommand.System.Data.IDbCommand.ExecuteReader(CommandBehavior behavior)
at System.Data.Common.DbDataAdapter.FillInternal(DataSet dataset, DataTable[] datatables, Int32 startRecord, Int32 maxRecords, String srcTable,

SQL Server Database Transaction

A transaction is a group of SQL commands executed together as a single component of work to be accomplished. If all of these commands succeed, then a transaction is committed - the changes to the data are made final. If any of the commands within a transaction fail, then the entire transaction is cancelled, or in SQL Server terms, the transaction will be rolled back.

Transactions are one of the things that keep your data safe, but they're not necessarily easy to understand. Here's some help:

IsapiModule Error 500 Issue


I am about exhausted trying to figure out this error:

HTTP Error 500.0 - Internal Server Error

Description: The page cannot be displayed because an internal server error has occurred.

Error Code: 0x8007007b

Notification: ExecuteRequestHandler

Module: IsapiModule

Requested URL: http://localhost:80/ReportServer

Physical Path: c:\Program Files\Microsoft SQL Server\MSSQL.2\Reporting Services\ReportServer

When I enable Failed Request Tracing Rules and view the log output I am supposing that the actual problem is in the 2nd call where there are 2 backslashes before the actual filename in the specified path:


CALL_ISAPI_EXTENSION DllName="C:\Windows\Microsoft.NET\Framework\v2.0.50727\\aspnet_isapi.dll"


MVC2 issue - Stuck. Trying to create a cms with nested partials


I am currently trying to display multiple items on a single page. I am not sure as to how to tackle this. What I have is a database table that has all the page data in. I have this run as a PagesController and this works fine. However what I would like to do is, if say the Products page is selected via the menu, I want to pull back not only the Products page html but also get all the products, and even be able to pull them through via category. I was trying to use a partial view, but I can't get it to work. The same would be for other pages, having partial views to display the other content, ie if Gallery is selected, the page html for Gallery shows and it then can push to a partial view that pulls all the gallery images from the gallery db table and so on. 

Maybe I am tackling this the wrong way. I have the pages stored in the db to allow for a CMS system I have setup. Maybe I need to use models for all the other items(Products, Gallery, Videos and such) and use the partial for the page html?

Any help would be greatly appreciated as I am confused.

xpath issue


Hi i am using xpath to loop through each node,

the xml is below i can get the value of "link" but i cant get the thumbnail value, have you got any ideas how i can do this, my code is below.



     <link>test 1</link>
     <media:thumbnail url="http://test.com/image.jpg" height="75" width="75" />



     <link>test 2</link>
     <media:thumbnail url="http://test.com/image.jpg" height="75" width="75" />


public void FindLinks(XPathNavigator p_xPathNav, DataTable dt)
            //run the XPath query
            XPathNodeIterator xPathIt = p_xPathNav.Select("//item");

            //use the

User validation Issue in xlsx file



I am validating user from Login.xlsx file. It was working fine by validating email and password from that file. For testing i got new file same contents of file but added some more user names.

So after that when i validating the user i am getting the following error "Data type mismatch in criteria expression".

But when i replaced the new to old one it is working fine. The contens of both files are the same. So why this kind of error happened.


Multiple Paramatized Threading issue


I need the funcitonality to have two methods run concurrently of each other and the parent thread (aka the method that makes these two calls) to halt until BOTH are done. After the threads are done, I need to perform logic on the returns of the method, so it is essential for both of them to be complete before the parent thread continues. I have searched the internet and tried varous attacks, and I always come up with the same result, this being the parent thread continues operation after the first thread finishes, leaving the second thread running.  Can someone show me a quick example of how I can do this. I have tried checking states of the threads, halting the threads, but I always end up with the same thing. Any help would be great. Thanks.

Data Truncation issue with Enterprise Library Logging WriteLog stored Proc


Hi ,

I'm using Enterprise Library Logging  feature for logging. The issue i am facing is when the Logging message is too large(more than 65534 chars) ,complete data  is not logged in the Formatted Mesage column which is  of data Type nText .

I am able insert complete data if i try inserting from Sql insert Query from sql management studio. Do i need to add any attributes to data base listener or do i need to change the sp.

 Is there any way to increase the WriteLog stored proc param size in EnterpriseLibrary.Logging config file ? . Please let me know.


Thanks In Advance.

Multiple web methods in one transaction


Hi everyone

Sorry I am kinda new in web services, so it may sound a bit newbish question.

We have a web service that comunicates with the database and exposes web methods that enables the application to access the database. Each method does only one operation (Insert, Update or Delete). What I need to do is create a transaction that will be consisted of multiple calls to the database, meaning multiple calls of more then one web methods. Can I do that? (I read that if the web method does not throw exception - or ContextUtil.SetAbort() is not called - the transaction will be commited automatically when the web method finishes executing, which I don't want to happen because I want to call another web method in the same transaction, and then manually commit the transaction)

Thank you in advance.

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