Notifications
Clear all

Attach file mdf SQL không cần file log (LDF)

khaibl
(@khaibl)
Estimable Member Admin

Step to delete LDF file of database:

1. Detach the database using script.

sp_detach_db ‘Your-Database-Name’

2. Delete the LDF file from disk.

3. Execute following script to recreate the LDF file and attach database

EXEC sp_attach_single_file_db @dbname = ‘Your-DB-Name’ , @physname = ‘Existing-MDF-Full-Path’

Quote
Topic starter Posted : 31/08/2020 10:05 am
Share: