Avatar of marrowyung
marrowyung
 asked on

shrink database

Dear all,

Is there anyway that we can set the SQL server in a way that when the Database size is growth and the disk is full, the SQL server will automatically shink the DB growthing ?


DBA100
Microsoft SQL Server 2005

Avatar of undefined
Last Comment
marrowyung

8/22/2022 - Mon
Rajkumar Gs

Guy Hengel [angelIII / a3]

no.

you have to monitor the db growth, and act accordingly to the reason of the db growing.
if it's just the transaction log file, the issue could be that transaction log backups are not in place, or a replication not working.
if it's the data files, you might need to either ensure more disk space in time, or delete/move data, or ....

ASKER CERTIFIED SOLUTION
orbhot

THIS SOLUTION ONLY AVAILABLE TO MEMBERS.
View this solution by signing up for a free trial.
Members can start a 7-Day free trial and enjoy unlimited access to the platform.
See Pricing Options
Start Free Trial
GET A PERSONALIZED SOLUTION
Ask your own question & get feedback from real experts
Find out why thousands trust the EE community with their toughest problems.
marrowyung

ASKER
angelIII,

You say "you have to monitor the db growth", so this means I still have to watch it manually, right?

DBA100.
Experts Exchange has (a) saved my job multiple times, (b) saved me hours, days, and even weeks of work, and often (c) makes me look like a superhero! This place is MAGIC!
Walt Forbes
orbhot

You don't have to watch it manually if you properly implement the stored proc I posted.
marrowyung

ASKER
I will try it.
marrowyung

ASKER
I find the script has some problem, let me look for help
⚡ FREE TRIAL OFFER
Try out a week of full access for free.
Find out why thousands trust the EE community with their toughest problems.