Innovative Tech Experts are here to help you in your IT transformation journey. We specialize in Cloud Computing (Azure), Process Automation (RPA, UIPath and others.) and entire Microsoft Stack. As a side project, this website is also a technical blog where you can find some of the blog posts related to SQL Server, Azure Portal, Virtual Reality, RPA, Mobile Technology, Cloud computing, Mobile App Development and much more. No matter who you are and what your age is, if you are interested in technology then you always find our blogs helpful and interesting as well.
Lets talk about a very common but complex/tricky problem when your production SQL database starts having performance issues. Some of these are related to huge database size both mdf (data) and ldf (log).
I have recently been part of problem where one of our dataabase had mdf file which was about 400Gb and ldf (Log file) was about 200GB. Now it was getting difficult to manage the backups, ability to quickly restore in case of need and all other associated problems.
The business was keen to find a workable solution as soon as possible. And after a few attempts I was able to get the database size reduced to ~200GB. Obviously there was no magic and I was able to free up a large ammount of data by deleting/archiving records from an Audit table which gets hit by record inserts for every user action in the application.
But interstingly SQL does not free up the space automatically after you delete data/records from the database. It still occupies the same disk space on the file system. But I just deleted large amount of data from my database and I know there is free space in the database. So I thought I’ll document the steps that I went through in a blog post for a ready ref. to anyone having a similar problem statement.
There are couple of ways to achive your desired outcome. But as always there are certain limitations and drawbacks of each option that you chosse.
FOR MORE INFO VISIT
https://innovativetechexperts.com/


0 comments:
Post a Comment