Hi,
Sorry for asking such a basic question, but I have ever been in this situation before, and I'm a bit scared of doing anything wrong.
I just discovered that the logfile for one of the databases at a customer site was totaly out of control, and had grown to about 17GB. The size of the database is about 1GB.
They are allmost out of diskspace, and because of that, I cannot take a backup of the transaction log.
I believe the reason for this situation is because the database is in full recovery mode, and they have never done any backup of either the database or the transaction log.
I have enough space to back up the database itself, and I just did.
What would be the safest routine to get out of this situation, and shrink the log file?
I was thinking of:
BACKUP LOG databasename WITH TRUNCATE_ONLY
DBCC SHRINKFILE ('databasename',TRUNCATEONLY)
And run a new database backup.
Would this do it? What would be the risk, if any?
If I make a new maintenance plan for the database including a daily backup of the database and an hourly backup of the transaction log, would the size of the logfile still grow?
On what other databases do I need a maintenance plan to be able to make a full disaster recovery?
Best regards
Jeppedal
Sorry for asking such a basic question, but I have ever been in this situation before, and I'm a bit scared of doing anything wrong.
I just discovered that the logfile for one of the databases at a customer site was totaly out of control, and had grown to about 17GB. The size of the database is about 1GB.
They are allmost out of diskspace, and because of that, I cannot take a backup of the transaction log.
I believe the reason for this situation is because the database is in full recovery mode, and they have never done any backup of either the database or the transaction log.
I have enough space to back up the database itself, and I just did.
What would be the safest routine to get out of this situation, and shrink the log file?
I was thinking of:
BACKUP LOG databasename WITH TRUNCATE_ONLY
DBCC SHRINKFILE ('databasename',TRUNCATEONLY)
And run a new database backup.
Would this do it? What would be the risk, if any?
If I make a new maintenance plan for the database including a daily backup of the database and an hourly backup of the transaction log, would the size of the logfile still grow?
On what other databases do I need a maintenance plan to be able to make a full disaster recovery?
Best regards
Jeppedal