Get the App
SLTechnology News&Howtos  ›  Database  › 

SQL SERVER database file deletion and partition formatting solution

Shulou Source: shulou.com Published: 2022-06-01 11:58:50 10月01日 Update

[fault type]

Delete the database file, format the partition, change the file size to "0", or cover the database when using backup to restore the database.

[typical characteristics]

The ◎ database file (MDF, NDF, or LDF) is missing suspect status

◎ database data recovery to earlier data

◆ detection process

a. Analyze the missing database files through the file system

b. Make a comprehensive analysis of the hard disk according to the internal structure of MDF (or NDF) files.

◆ recovery proc

a. Connect the faulty hard disk to a secure data recovery platform and make a complete mirror image of the hard disk to prevent secondary breakage.

Bad

b. Analyze the original file system format

c. Find file directory index and file index information

d. If the file index cannot be found, the whole file is fragmented through the internal structure of the MDF (or NDF) file.

Analysis.

e. Generate database files by reassembling fragments

f. After attaching the database, do a complete DBCC test on the database.

◆ acceptance process

a. Attach the repaired database file

b. Do DBCC test to the database after attaching

c. Query the important table and verify the last update date of the data.

Possible causes of ◎ failure:

◆ artificial misoperation

The ◆ file system is damaged and the computer automatically detects the disk.

◎ Database Protection Tip:

When deleting files and formatting partitions in ◆, please back up the original data first.

When ◆ restores the database, try not to overwrite the existing database, or make a backup before restoring.

◆ checks the file system on a regular basis.

Tags: Data files databases detection systems analysis formats backups failures processes hard drives indexes a.ref. attachments data recovery fragmentation structure c. important Apple Docker Huawei Linux macOS MariaDB Microsoft MySQL NVidia OPPO Reno Redmi Shulou Technology MariaDB vpn Huawei