I have log file which is grown to 1TB. I have no need of log file. Just want to delete the old log file and create a new one instead of old log file.
How can I achieve that ? will it cause any other problem? pleas help.
Right mouse button on the database and
TASKS -> SHRINK -> FILES
Then choose the option that interests you
More :
https://docs.microsoft.com/en-us/sql/relational-databases/databases/shrink-a-file?view=sql-server-2017
I made a backup of the database (very important just in case something fails or trying something else you brake up things!) and then I detached and reatached the database, but deleting the ldf file from the reataching window. This creates a new ldf file as expected in the original database but empty.
More details here: https://inapp.com/delete-sql-server-database-transaction-log-file/
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With