473,396 Members | 1,748 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,396 software developers and data experts.

Truncating or shrinking a 65GB Log File with available 2.8GB harddisk space

khickyphutz
Good day!

I would like to ask for a technical advice regarding transaction logs. Right now, our server only have 2.8GB due to the transaction log of our database which is 65GB now. Its database size is around 1.8GB. There is an approximate growth of 1GB+ per day in the transaction log.

I have tried backing up the transaction log with the option of remove inactive transaction logs but it wont work, as well as backing up completely the database.

I have tried shrinking the transaction log to a specified size but the smallest size I can reduce it is 64GB.

What should I do in order for me to reduce the size of the transaction log?



Thank you and God bless.
Nov 28 '06 #1
7 3956
willakawill
1,646 1GB
Good day!

I would like to ask for a technical advice regarding transaction logs. Right now, our server only have 2.8GB due to the transaction log of our database which is 65GB now. Its database size is around 1.8GB. There is an approximate growth of 1GB+ per day in the transaction log.

I have tried backing up the transaction log with the option of remove inactive transaction logs but it wont work, as well as backing up completely the database.

I have tried shrinking the transaction log to a specified size but the smallest size I can reduce it is 64GB.

What should I do in order for me to reduce the size of the transaction log?



Thank you and God bless.
hold your breath and delete it after you copy it over to another disk.
Nov 28 '06 #2
hold your breath and delete it after you copy it over to another disk.
???

I already have copied the DATA and LOG file to my hardisk through Remote Desktop. Now, How will I be able to use the DATA and LOG? Assuming the database name is AgriMrpPrd and the Files are: AgriMrpPrd.mdf and AgriMrpPrd_Log.ldf.

Sowee to the nooby question...

Take care and God Bless
Nov 28 '06 #3
WayneW
9
Try
truncate log {databasename} with truncate_only
Nov 28 '06 #4
This is what I have entered in SQL Analyzer:

truncate log AgriMrpPrd with truncate_only

Where AgriMrpPrd is the name of the database.


The error is:
Server: Msg 170, Level 15, State 1, Line 1
Line 1: Incorrect syntax near 'log'.
Nov 29 '06 #5
WayneW
9
backup log AgriMrpPrd with truncate_only
Nov 29 '06 #6
I already have run the script and it compiled successfully but there was no change in the size of my transaction log.

the transaction log file size is still the same and it continues to grow every day.
any other alternative way to reduce its size?Ü

thank you and god bless
Nov 30 '06 #7
Good day wayne,

after running the script you gave me, I tried to shrink the database this time and I can already set its minimum size from 64GB to 5GB now. after shrinking the transaction log, the size now of my transaction log is only 5GB.

Thank's a lot manÜ Thank you so much, It really helps.

Take care and God Bless.



MaDz
Nov 30 '06 #8

Sign in to post your reply or Sign up for a free account.

Similar topics

7
by: Patrick Useldinger | last post by:
Hi, I think I found a bug in the write method of file objects. It seems as if before writing each block, a check was done in order to verifiy that there is enough space left for the *whole*...
1
by: John Mosey | last post by:
A huge (and never used) database log was taking up about 4 GB of HD space. We want the data for historical capacity, however, don't care about the transactions log. After a bit of research I ran...
13
by: Ron L | last post by:
I have an application we are building that will be used by a number of different users on shared PCs. I want to be able to store a number of user settings in a location that is unique for each...
1
by: jeffreyv | last post by:
Hi! I'm studying to have my MCSE 70-228 certification and I'm trying some things with backing up transaction logs and shrinking it. Here's what I do: There is no activity in the database by...
3
by: Zvonko | last post by:
Hi guys. I have a huge database file. When I run sp_spaceused this are the results: db_size 1337,31 Mb unallocated 14,62 Mb reserved ...
2
by: William | last post by:
I've been tasked with taking over the support for a client's SQL Server database. I'm not a DBA by profession, I'm a software developer who uses SQL Server as a database designer. The clients...
3
by: sifrah | last post by:
Hi All, My SQL server transaction log is getting bigger every day and my HDD if running out of space. So i follow the MS KB about how to Shrinking the Transaction Log. After doing so the log is...
0
by: kazper | last post by:
Good day, I have some problems regarding my Hard disk space for my logs in SQL Server 2005. When I try shrinking the database it returns an error not letting me to do anything about the size of...
28
by: n00m | last post by:
Both codes below read the same huge(~35MB) text file. In the file 1000000 lines, the length of each line < 99 chars. Stable result: Python runs ~0.65s C : ~0.70s Any thoughts?
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
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,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
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...
0
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...

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.