Re: What is LOP_SHRINK_NOOP
- From: "Greg D. Moore \(Strider\)" <mooregr_deleteth1s@xxxxxxxxxxx>
- Date: Sun, 12 Apr 2009 09:30:27 -0400
"Thomas Yan" <yantaotime@xxxxxxxxx> wrote in message news:grros9$k5f$1@xxxxxxxxxxxxxxxx
Well,the situation is that I was using MSDE 2000 with SP4 on a PC, and the database is small. The original mdf is 20Mb and the ldf file is 5Mb. The original system is developed by other guy with the settings:
1, Recovery Model: FULL
2, Auto-Shrink: ON
3, No nightly backup
The system works normally. The ldf file is about 100Mb after months and never grows large. Yes,indeed,there are fragments on hard disk.
Now, I add nightly backup to the system using DBCC backup.
Umm, not sure what you mean here. DBCC has no backup command.
I backuped the mdf file and didn't backup the ldf file. The other settings are not changed.
Then, I encounter the big log issue, the ldf file grows to 60Gb after months and full of 'LOP_SHRINK_NOOPS' records.
Yes, the log file grows because you're not backing it up.
Basically EVERYTHING that changes data in the DB is recorded to the log file. This includes not only INSERTS, DELETES and UPDATES, but schema changes and index updates/defrags, etc.
So you need to use the T-SQL backup command to back up the log to a safe place periodically. Note, you need to have every transaction log backup since the last FULL (or FULL+Differential) Backup in order to successfully recover the database.
If this is data is important I would recommend a couple of things:
Upgrade to SQL 2005 Express (I don't believe MSDE 2000 is still supported).
Setup a task to do a FULL backup nightly using the T-SQL BACKUP DATABASE command.
Setup a task to do an hourly or so transaction log backup command. Store these and the other backup in a safe place.
I want to know why this happened,because of I didn't backup the ldf file?
Basically yes.
BTW, my personal opinion is you made a mistake that many people are guilty of. They focus on the MDF file since that's where all the data is. They greatly underestimate exactly how important the LDF file is. Don't worry, it's a common mistake.
(Think of it this way, in theory, if you had every transaction log backup since the moment the database was created, you could not only recreate the DB to the point of failure, you could with a little effort recreate ANY previous state.)
Or any other reasons?
Thanks.
--
Greg Moore
Ask me about lily, an RPI based CMC.
.
- References:
- Re: What is LOP_SHRINK_NOOP
- From: Ed Murphy
- Re: What is LOP_SHRINK_NOOP
- From: Greg D. Moore \(Strider\)
- Re: What is LOP_SHRINK_NOOP
- Prev by Date: paging, I know theres loads of articles on this but...
- Next by Date: Re: paging, I know theres loads of articles on this but...
- Previous by thread: Re: What is LOP_SHRINK_NOOP
- Next by thread: Re: What is LOP_SHRINK_NOOP
- Index(es):
Relevant Pages
|