Notifications
Clear all

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

1 Posts
1 Users
0 Reactions
1,473 Views
khaibl
(@khaibl)
Posts: 91
Member Admin
Topic starter
 
[#268]

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’


 
Posted : 31/08/2020 10:05 am
Share: