I've been looking at getting some disk space back on some of our development machines.
These are machines that are not being backed up, not being developed on directly, and not being maintained particularly well.
Any recovery is done from PRD or PRE-PRD to the DEV environment, nothing on this particular DEV environment is critical.
The recovery models on these databases has to remain on FULL because it was so ordained (despite no actual backups being taken).
As these databases in some cases have been around for quite some time without backups, I'm looking into a proper way to shrink their logs.
I've found two approaches that might serve the purpose:
BACKUP LOG [databasename] TO DISK=’NUL:’
Followed by shrinking the log.
Or:
ALTER DATABASE [databasename] SET RECOVERY SIMPLE;
ALTER DATABASE [databasename] SET RECOVERY FULL;
Followed by shrinking the log.
My actual questions:
What are the differences between these two approaches?
Is there something I'm missing / overlooking?