DBA Fundamentals: Maintenance: Shrinking Files

  Рет қаралды 17,124

Brent Ozar Unlimited

Brent Ozar Unlimited

Күн бұрын

Пікірлер: 17
@kelleyprebil8571
@kelleyprebil8571 2 жыл бұрын
Great explanation! I accidentally shrunk the log file on one of my Production servers as I was trying to shrink it on my sandbox server actually and didn't realize I was connected to the wrong server. Oops. I've only had to shrink that Production server's log file once when someone decided to do a massive delete + insert instead of just updating the data which blew up the log file size to WAY bigger than normal and WAY bigger than the data file. Tripled the size of the backups too.
@totanlj18
@totanlj18 Жыл бұрын
Thanks God you do only a Shrink on that server!
@Ренат-ц8ж
@Ренат-ц8ж 3 жыл бұрын
Thanks for the interesting story about the architecture of hard drives.
@ntobergta
@ntobergta 27 күн бұрын
In the situation where I have 1.7TB free.. I love that your Gotta Shrink solution is exactly what I came up with except my anal retentiveness makes me want to move them back to have clean, happy files 🙂
@ssousa97
@ssousa97 12 күн бұрын
We have a specific ( i think) scenario where we have sharded tables over days. Think of it as a history log for events that happend on that day. So each day we have a new table (shard) Some events are non-persistent, so we have jobs that delete them after X amount of days. So what happens is that we are "freeing up" space on tables that won't be used again, other than querying for historical analysis. So the cycle is: delete non-persistent events, reorganize indexes and then shrink the database file to regain the space. How bad is it ? Or that's "ok" considering that we won't be inserting data in the past tables ?
@clasmir5281
@clasmir5281 3 жыл бұрын
Great content! Almost done with this bag of popcorn!
@kennethgardzinski
@kennethgardzinski 2 жыл бұрын
Good information as usual. Thank you 😊.
@samdani870
@samdani870 3 жыл бұрын
Much clear on shrink. Can you make a video of lock, block, and deadlock with a bunch of real examples please.
@BrentOzarUnlimited
@BrentOzarUnlimited 3 жыл бұрын
Sure, I have - check out my Mastering Index Tuning and Mastering Query Tuning classes where we spend about 3 hours in total on blocking and deadlocking. To learn more, go to BrentOzar.com and click Training at the top.
@Vibestr
@Vibestr Жыл бұрын
Hello Brent Thank you for the explanation. It helped me understand why shrinking paired w/ rebuilding indexes is a fruitless cause. Is the shrinking that you describe an example of notruncate because i was reading a truncate shrink doesn't move any files over but simply drops ("deallocates") the space at the end (and henceforth it is much more faster process)? Would using a truncate shrink be good since it doesn't reshuffle the database and perhaps there would be no need to perform a defrag? Or is having that extra unused allocated space not such a bad thing since it can make future inserts easier?
@JyotiYadav-gq1fs
@JyotiYadav-gq1fs Ай бұрын
Hi. Can you please tell me is it right to schedule shrink command in ssms...because i was planning to do. My manger asked me to fix
@BrentOzarUnlimited
@BrentOzarUnlimited Ай бұрын
Watch the video. Cheers!
@paulntumbong9568
@paulntumbong9568 Жыл бұрын
Good analysis sir, what script can you use to know what exactly is causing the log file growing big
@TheBrentOzar
@TheBrentOzar Жыл бұрын
Thanks! I cover that in my How I Use the First Responder Kit class.
@lirusme2461
@lirusme2461 10 ай бұрын
How about tempdb datafile that continue growth because of verrion store? how to identification what transaction process and query that running?
@BrentOzarUnlimited
@BrentOzarUnlimited 10 ай бұрын
Check out my class Fundamentals of TempDB.
@avanthasiriwardana
@avanthasiriwardana 2 жыл бұрын
perfecto :)
DBA Fundamentals: Patching SQL Server
23:26
Brent Ozar Unlimited
Рет қаралды 14 М.
DBA Fundamentals   Configuring TempDB
16:46
Brent Ozar Unlimited
Рет қаралды 19 М.
Lessons I learnt running my business for 8 Years, Episode 2
10:02
SQL Server Log File is HUGE!
11:18
Kevin Hill
Рет қаралды 110 М.
DBA Fundamentals - Backups 3 - Setting Up Maintenance Plans
22:35
Brent Ozar Unlimited
Рет қаралды 17 М.
Fragmentation Explained in 20 Minutes
18:40
SQLBits
Рет қаралды 15 М.
DBA Fundamentals: Maintenance: Agent Jobs
12:22
Brent Ozar Unlimited
Рет қаралды 7 М.
Learn Database Normalization - 1NF, 2NF, 3NF, 4NF, 5NF
28:34
Decomplexify
Рет қаралды 2,2 МЛН
A Little About Fill Factor And Fragmentation In SQL Server
26:26
Erik Darling (Erik Darling Data)
Рет қаралды 1,4 М.
Should We Defragment Indexes?
19:24
SQLBits
Рет қаралды 547
Senior DBA Class   High Availability and Disaster Recovery Part 2
20:50
Brent Ozar Unlimited
Рет қаралды 10 М.
DBA Fundamentals: Corruption: Checking for Corruption
40:52
Brent Ozar Unlimited
Рет қаралды 11 М.