Link to home
Create AccountLog in
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
Avatar of Rajkumar Gs
Rajkumar Gs
Flag of India image

Avatar of 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
Avatar of orbhot
orbhot
Flag of United States of America image

Link to home
membership
Create an account to see this answer
Signing up is free. No credit card required.
Create Account
Avatar of marrowyung
marrowyung

ASKER

angelIII,

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

DBA100.
You don't have to watch it manually if you properly implement the stored proc I posted.
I will try it.
I find the script has some problem, let me look for help