Looking for breakthrough ideas for innovation challenges? Try Patsnap Eureka!

Method for making only MDF attached to restore database

A database and file technology, applied in the field of SQL Server database, can solve the problems of restoring the database without the ldf file attached, reporting errors, etc.

Inactive Publication Date: 2015-03-25
G CLOUD TECH
View PDF3 Cites 3 Cited by
  • Summary
  • Abstract
  • Description
  • Claims
  • Application Information

AI Technical Summary

Problems solved by technology

[0004] The technical problem that the present invention solves is to provide a kind of method that has only MDF file to restore the database additionally, has solved the problem that only has mdf file, does not have the problem of restoring database of ldf file additionally or has mdf, ldf file but adds the problem that reports an error

Method used

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
View more

Image

Smart Image Click on the blue labels to locate them in the text.
Viewing Examples
Smart Image
  • Method for making only MDF attached to restore database

Examples

Experimental program
Comparison scheme
Effect test

Embodiment Construction

[0020] In SQL Server (a relational database management system), complete database files include main data files (extension .mdf) and transaction logs (extension .ldf). In the absence of ldf log files, only mdf files cannot work normally. Attach the restored database. Such as figure 1 As shown, the present invention adopts the following steps to realize additionally restoring the database when there is only the mdf file.

[0021] Step 1. Find the backed up mdf database file;

[0022] Step 2: Create a new database with the same name in the enterprise manager;

[0023] Step 3. Stop the sql server, delete the newly created mdf and log files, and replace the newly created database files with the original backup files;

[0024] Step 4: Start the database, and right-click on the database server of the enterprise manager to find properties, and select Allow direct modification of the system directory in the server settings.

[0025] Step 5, change the database to emergency mode, e...

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
Login to View More

PUM

No PUM Login to View More

Abstract

The invention relates to the technical field of SQL Server databases, in particular to a method for making only an MDF attached to a restore database. The method includes the steps of firstly, finding a backup MDF database file; secondly, creating a new database with the same name in an enterprise manager; thirdly, stopping an SQL server, and deleting the created new MDF and log files; fourthly, starting the database, setting the server to a state that a system catalog can be directly modified; fifthly, changing the mode of the database into an emergency mode; sixthly, restoring the emergency state of the database by executing update sysdatabases set status=0where name='database name'; seventhly, setting the server to a state that the system catalog can be directly modified and deleted. By means of the method, the technical problem that report errors happen when only the MDF without an LDF is attached to the restore database is solved; the method can be used for restoring the SQL Server database.

Description

technical field [0001] The invention relates to the technical field of SQL Server databases, in particular to a method for additionally restoring a database with only MDF files. Background technique [0002] SQL Server is a relational database management system. Each database of SQL Server is stored in two files, one with the suffix of mdf, which is a data file; the other with a suffix of ldf, which is a log file. Therefore, as long as these two files are copied regularly, the effect of backup can be achieved. [0003] Due to various reasons, if we only backed up the mdf file at that time, it would be very troublesome to restore it. There are only mdf files and no ldf files, it is difficult to attach and restore the database, and an error will be reported when attaching directly. Contents of the invention [0004] The technical problem to be solved by the present invention is to provide a method for restoring the database with only MDF files attached, which solves the pr...

Claims

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
Login to View More

Application Information

Patent Timeline
no application Login to View More
Patent Type & Authority Applications(China)
IPC IPC(8): G06F17/30G06F11/14
CPCG06F16/2379G06F2216/09
Inventor 张来卿徐震宇孙傲冰季统凯
Owner G CLOUD TECH
Who we serve
  • R&D Engineer
  • R&D Manager
  • IP Professional
Why Patsnap Eureka
  • Industry Leading Data Capabilities
  • Powerful AI technology
  • Patent DNA Extraction
Social media
Patsnap Eureka Blog
Learn More
PatSnap group products