Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2005 Forums
 SQL Server Administration (2005)
 How to prevent logging to transaction log?

Author  Topic 

kenpachi
Starting Member

5 Posts

Posted - 2009-02-25 : 01:45:23
Hi, I have a website that uses a SQL Server 2005 database. I am allotted about 1GB for space, but when my transaction log hits 10MB I get a transaction log full error on my site.

Is there some sort of command I could put in my stored procedures to stop those queries from being logged? Or is there a way to minimize or get rid of the transaction log. For my application I don't really need a transaction log. I mainly use the db for caching files.

Thanks!

soonyu
Starting Member

13 Posts

Posted - 2009-02-25 : 04:47:56
Make you initial transaction log much larger, I guess the transaction log no fast enough to expand.

When we create new database, the initial log file = 1mb and file growth rate = 10 % where when expand only 0.1mb and need expand few time if to take my transaction.

I put 500 mb for small database, some database i put the intial size 2 gb and some database log even more larger.

Enterprise manager - > database -> transaction log file, just change the file size.

Go to Top of Page

sodeep
Master Smack Fu Yak Hacker

7174 Posts

Posted - 2009-02-25 : 07:32:15
quote:
Originally posted by kenpachi

Hi, I have a website that uses a SQL Server 2005 database. I am allotted about 1GB for space, but when my transaction log hits 10MB I get a transaction log full error on my site.

Is there some sort of command I could put in my stored procedures to stop those queries from being logged? Or is there a way to minimize or get rid of the transaction log. For my application I don't really need a transaction log. I mainly use the db for caching files.

Thanks!



You need Transaction Log no matter what recovery model you are using.Are you doing transactional log backup frequently? what is the recovery model of DB?
Go to Top of Page

kenpachi
Starting Member

5 Posts

Posted - 2009-02-25 : 13:05:31
Hi, I right-clicked on the name of my database and selected properties and found the following options:

General -> Size = 56.19MB
General -> Size Available = 0.59MB
Options -> Recovery Model = full

The first two options don't make sense, my host should allow for 1000MB of storage on MS SQL Server 2005 not 57MB... Am I interpreting that correctly? I couldn't find any options relating to transaction logs. Where exactly are those options located? Thanks.
Go to Top of Page

tkizer
Almighty SQL Goddess

38200 Posts

Posted - 2009-02-25 : 13:09:19
Sounds like your hosting provider didn't configure your database properly.

Tara Kizer
Microsoft MVP for Windows Server System - SQL Server
http://weblogs.sqlteam.com/tarad/

Subscribe to my blog
Go to Top of Page

kenpachi
Starting Member

5 Posts

Posted - 2009-02-25 : 18:00:14
Hi tkizer, I want to email their support and notify them of this issue. Which options are not configured properly from the above and what should they be? I'm not very familiar with SQL Server configuration/administration. Thanks!
Go to Top of Page

tkizer
Almighty SQL Goddess

38200 Posts

Posted - 2009-02-25 : 18:07:41
Show us what this returns:

EXEC yourDatabaseNameGoesHere..sp_spaceused

Also show us what it says in the database properties, File page, Autogrowth...for both files.

Tara Kizer
Microsoft MVP for Windows Server System - SQL Server
http://weblogs.sqlteam.com/tarad/

Subscribe to my blog
Go to Top of Page

kenpachi
Starting Member

5 Posts

Posted - 2009-02-25 : 18:57:25
For the stored procedure, it returned the following:

database_name: databasename
database_size: 59.19 MB
unallocated_space: 0.84 MB

reserved: 58720 KB
data: 57920 KB
index_size: 624 KB
unused: 176 KB

In the Database properties (right-clicked on databse name)" -> "Files" section there are no files or options. It just has the database name and owner.

Go to Top of Page

tkizer
Almighty SQL Goddess

38200 Posts

Posted - 2009-02-25 : 19:15:11
I meant right click on database, go to properties, click on files in the "select a page" section, that show us what you've got under autogrowth.

You have a very tiny database, so you are definitely not using anywhere near what your maximum is. Once we see the autogrowth settings, we may have a better idea of what is going on.

Tara Kizer
Microsoft MVP for Windows Server System - SQL Server
http://weblogs.sqlteam.com/tarad/

Subscribe to my blog
Go to Top of Page

kenpachi
Starting Member

5 Posts

Posted - 2009-02-25 : 19:48:18
There are no database files listed in the "Files" section. It just shows the database name, and owner.
Go to Top of Page

tkizer
Almighty SQL Goddess

38200 Posts

Posted - 2009-02-25 : 20:07:12
Perhaps you don't have permission to view that information then.

Tara Kizer
Microsoft MVP for Windows Server System - SQL Server
http://weblogs.sqlteam.com/tarad/

Subscribe to my blog
Go to Top of Page
   

- Advertisement -