Forums65
Topics76,366
Posts1,033,331
Members14,588
|
Most Online16,551 Feb 2nd, 2024
|
|
13 members (2 invisible),
10,008
guests, and
901
robots. |
Key:
Admin,
Global Mod,
Mod
|
|
M |
T |
W |
T |
F |
S |
S |
1
|
2
|
3
|
4
|
5
|
6
|
7
|
8
|
9
|
10
|
11
|
12
|
13
|
14
|
15
|
16
|
17
|
18
|
19
|
20
|
21
|
22
|
23
|
24
|
25
|
26
|
27
|
28
|
29
|
30
|
|
|
|
|
|
|
|
Joined: Nov 2003
Posts: 3,793
Forum Guardian
|
OP
Forum Guardian
Joined: Nov 2003
Posts: 3,793 |
I have a database that was setup far before my time in my current employment. The log file has grown to 40GB, i have set limits on it to stop it growing any more. I really need to shrink this log file quite consideribly. The database has a full backup every week and an incremental backup every night.
My knowledge of MS SQL server isn't amazing, but i was under the impression this might purge the logfiles like it does with MS Exchange when that is backed up.
The database is only about 300mb and is currently only used for reference. Should i delete the log file and start again with restricted log file sizes?
I am a signature virus, copy me into your signature to help me spread.
|
|
|
|
Joined: Nov 2003
Posts: 12,002
Wiki Master
|
Wiki Master
Joined: Nov 2003
Posts: 12,002 |
Can you not create a cron to purge the old files at the end of each day?
What If There Were No Hypothetical Questions?
|
|
|
|
Joined: Nov 2003
Posts: 3,793
Forum Guardian
|
OP
Forum Guardian
Joined: Nov 2003
Posts: 3,793 |
Already tried that
I am a signature virus, copy me into your signature to help me spread.
|
|
|
|
Joined: Nov 2003
Posts: 21,269 Likes: 4
Wiki Master
|
Wiki Master
Joined: Nov 2003
Posts: 21,269 Likes: 4 |
Is this on a windows or Linx Server as they can behave different even if its the same version of mysql. As there log files, i assume for tracking, you should be able to back them up, and then delete them. As you say starting a fresh with a max log size. I don't know for sure as the versions and platform can be important. But even if you answer those questions, i don't think i could give you a 100% Answer. Don't forget, if its not broken dont fix it
|
|
|
|
Joined: Nov 2003
Posts: 3,793
Forum Guardian
|
OP
Forum Guardian
Joined: Nov 2003
Posts: 3,793 |
windows 2000
Well, the disk is 60GB and this log is 45gb. I have now stopped the log from growing any more, there is not enough space to back it up locally. I am doing an online backup this weekend. Hopefully this might do it.
I am a signature virus, copy me into your signature to help me spread.
|
|
|
|
Joined: Aug 2004
Posts: 22,315
Wiki Master
|
Wiki Master
Joined: Aug 2004
Posts: 22,315 |
Is this on a windows or Linx Server as they can behave different even if its the same version of mysql. MSSQL is Windows NT only hence the name Microsoft SQL, and has very little to do with MySQL and absolutely nothing to so with Linux. The same as ASP. Talking about MySQL in a topic that is about MSSQL is just confusing matters. As much as I work with servers I havent a clue about MSSQL lmao! Linux all the way for me unfortuantly sorry I cant offer much help.
|
|
|
|
Joined: Nov 2003
Posts: 21,269 Likes: 4
Wiki Master
|
Wiki Master
Joined: Nov 2003
Posts: 21,269 Likes: 4 |
1 log file of 45gb Sorry i cant help, as MYSQL is where i have more knowledge. Let us know how you get on, if you would, you never know when it may come in handy. Sorry i looked too quick, as i work with mysql my eyes seen mysql and not mssql.
|
|
|
|
Joined: Aug 2004
Posts: 22,315
Wiki Master
|
Wiki Master
Joined: Aug 2004
Posts: 22,315 |
Lol easy enough mistake to make to be honest.
|
|
|
|
Joined: Nov 2003
Posts: 3,793
Forum Guardian
|
OP
Forum Guardian
Joined: Nov 2003
Posts: 3,793 |
Solution, for anyone that is interested
1.DBCC SHRINKFILE(Pubs_log, 100)
2.BACKUP log Pubs WITH TRUNCATE_ONLY
3.DBCC SHRINKFILE(Pubs_log, 100)
I am a signature virus, copy me into your signature to help me spread.
|
|
|
Click to View Topic.
|
|
Posts: 2,283
Joined: December 2010
|
|
There are no members with birthdays on this day. |
|
|
|