473,804 Members | 2,154 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

WRITELOG lock on databases set to SIMPLE recovery

Hi All,
I have a 2MB database set to SIMPLE recovery. This database is used
only to generate new keys to web users. It has two columns - UID and
LASTDATE. The UID column is only updated when users log in or log out
(INSERT & DELETE). The LASTDATE column is updated every time they
switch between pages.

Please don't ask for the reason why we do it this way, it just IS.

The maximum amount of rows in this table at any given time is about
2000. There is a non-clustered index on the UID column.

My problem is that all throughout the day I have constant blocks by the
WRITELOG waittype. I know my disk I/O is very slow (will be upgraded
soon) but this is the only database on which these blocks occur. What
is writing to the transaction log if I have the DB set for SIMPLE
recovery?

Thanks,
Josh

Jul 23 '05 #1
4 3605
joshsackett (jo*********@gm ail.com) writes:
My problem is that all throughout the day I have constant blocks by the
WRITELOG waittype. I know my disk I/O is very slow (will be upgraded
soon) but this is the only database on which these blocks occur. What
is writing to the transaction log if I have the DB set for SIMPLE
recovery?


Simple recovery is not the same as no recovery. SQL Server always
writes to the transaction. It first write to the transaction log,
and later to the data tables. The point is that if the server
crashes before the data is written to the table, the transaction
can be rolled forward, if commit record was written. Else the
transaction will be rolled back.

The difference to full and bulk-logged recovery, is that in simple
recovery, SQL Server will automatically truncate the transaction
log every now and then. But truncation is never past the point of
the oldest open transaction.

--
Erland Sommarskog, SQL Server MVP, es****@sommarsk og.se

Books Online for SQL Server SP3 at
http://www.microsoft.com/sql/techinf...2000/books.asp
Jul 23 '05 #2
joshsackett (jo*********@gm ail.com) writes:
My problem is that all throughout the day I have constant blocks by the
WRITELOG waittype. I know my disk I/O is very slow (will be upgraded
soon) but this is the only database on which these blocks occur. What
is writing to the transaction log if I have the DB set for SIMPLE
recovery?


Simple recovery is not the same as no recovery. SQL Server always
writes to the transaction. It first write to the transaction log,
and later to the data tables. The point is that if the server
crashes before the data is written to the table, the transaction
can be rolled forward, if commit record was written. Else the
transaction will be rolled back.

The difference to full and bulk-logged recovery, is that in simple
recovery, SQL Server will automatically truncate the transaction
log every now and then. But truncation is never past the point of
the oldest open transaction.

--
Erland Sommarskog, SQL Server MVP, es****@sommarsk og.se

Books Online for SQL Server SP3 at
http://www.microsoft.com/sql/techinf...2000/books.asp
Jul 23 '05 #3
Thanks Erland, I appreciate the help. I reexamined the application and
found that it writes an XML output to the table as well every time a
user changes the page. So my 2000 row table is actually about 6MB in
size and is constantly writing large chunks of data. The 31MB
transaction log gets to about 80% full and then flushes.

I suppose my only recourse is to get the faster disk system in.

Thanks again,
Josh

Jul 23 '05 #4
Thanks Erland, I appreciate the help. I reexamined the application and
found that it writes an XML output to the table as well every time a
user changes the page. So my 2000 row table is actually about 6MB in
size and is constantly writing large chunks of data. The 31MB
transaction log gets to about 80% full and then flushes.

I suppose my only recourse is to get the faster disk system in.

Thanks again,
Josh

Jul 23 '05 #5

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

12
46661
by: Andrew Baker | last post by:
What is the best way to lock an individual row in the following scenerio: --TODO - LOCK THIS ROW -- Return the next id SELECT next_id INTO next_id_out FROM owner.my_id_table WHERE app_id = app_id_in;
0
1329
by: BobC | last post by:
One of Microsoft's VB code samples is a solution called Logger (or WinLogger). It has a file associated with the "Logging" project called ILog.vb. In the module, interface or whatever it's called (haven't really figured that part out yet) is a sub proc called WriteLog. The WriteLog subproceedure has no code associated with it (here anyway). The Writelog sub proc is referenced in the logging project and the winlogger project. Both places...
3
2093
by: RugbyCoach | last post by:
I'm looking for a tool that can extract only the schema from a database in a form that can be used to generate that schema in another empty database. This is to facilitate our disaster recovery processes where we need the objects only, not the data, and need to replicate this to our disaster recovery site over the WAN. There are plenty of tools that can handle a single database, but does anyone know of any tools that could handle...
2
3691
by: Trent | last post by:
Hello, all. I have the following production DB2 environment. DB2 8.1.4 (fp4) WG edition with 2 production databases on Windows 2003 standard edition. My first question is regard with locking. I found some escalations for X lock on some tables. How do I work out an appropriate MAXLOCK & LOCKTIMEOUT settings to optimize the lock escalation issue.
8
6815
by: Roy Padgett | last post by:
I have a combo box where users select the customer name and can either go to the customer's info or open a list of the customer's orders. The RowSource for the combo box was a simple pass-through query: SELECT DISTINCT , , ,City, Region FROM Customers ORDER BY Customers.; This was working fine until a couple of weeks ago. Now whenever someone has the form open, this statement locks the entire Customers table.
1
3352
by: com | last post by:
Extreme Web Reports 2005 - Soft30.com The wizard scans the specified MS Access database and records information such as report names, parameters and subqueries. ... www.soft30.com/download-1-11975.htm - 31k - Cached - Similar pages MDBSecure 1.0.8.0 - Soft30.com Utility which makes it easy to create secure MS Access Databases, ... MS Access 2000/2003 format. 30 day money back guarantee, 30 day trial. ...
6
6967
by: Marek Wierzbicki | last post by:
Hi In my server (MSSQL 2000 sp4) very often I see long time of executing query with waittype=WRITELOG Recovery is set to SIMPLE and there is no autoShrink. Auto increment file size (log) is set to 10% What can be the reason of this problem?
3
2105
by: peterc | last post by:
I have an existing database with approx 500,000 rows and accessed by a few hundred users per day creating approx 1,000 new records per day plus typical reporting - relatively low volume stuff for SQL Server. I'm about to add a process that will be importing data daily from legacy databases and summarizing it for reporting purposes, integrating it with the existing database. This volume of data will be considerably higher, perhaps...
7
2246
by: Troels Arvin | last post by:
Hello, Some users are frustrated by DB2 locking their database operations (most recently: a table drop took forever, probably because of a lock). The natural and sane question I'm being asked: Is there a way for a user to see if a query is stuck waiting for a lock, or if it's simply taking a while to execute? As far as I can see, an ordinary user cannot get this kind of
0
9712
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
10343
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
10341
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
10089
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
1
7634
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
6862
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
1
4308
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
3831
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
3001
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.