Home Database Mysql Tutorial MSSQL 数据库备份和还原的几种方法 图文教程

MSSQL 数据库备份和还原的几种方法 图文教程

Jun 07, 2016 pm 05:59 PM
mssql backup reduction

MSSQL 数据库备份和还原的几种方法小结,配有图文,大家看了就知道了。

一、通过企业管理器进行单个数据库备份。打开SQL SERVER 企业管理器,展开SQL SERVER组LOCAL下的数据库,右键点击你要备份的数据库,在弹出的菜单中选择所有任务下的备份数据库,弹出备份数据库对话框:

点击添加按钮,填写备份文件的路径和文件名,点击确定添加备份文件,点击备份对话框上的备份,开始进行备份。

二、通过企业管理器多数据定时库备份。打开SQL SERVER 企业管理器,展开SQL SERVER组下的管理节点,右键单击数据库维护计划,选择新建维护计划。在弹出的欢迎对话框中选择下一步,然后显示如下对话框:


选择你想要备份的数据库,下一步。在接下来的一步中,我们默认所有选项,下一步。在当前对话框中可以选择是否检查数据库的完整性,这里我们默认就可以进行下一步就行了。对话框入图所示:

选中作为维护计划的一部分来备份数据库,点击更改按钮修改备份数据库的时间,单击下一步,入下图:

在这里,我们可以选择“使用此目录”为备份指定路径,选中“删除早于此时间的文件”可以指定备份文件的保留时间。

下面的几个步骤我们都选择默认设置,最后在完成对话框里为备份起一个名字,点击完成后,数据库会在你指定的时间进行备份。关于数据库维护计划的更多知识请查看其它相关资料。


三、备份数据库文件。打开SQL SERVER 企业管理器,展开SQL SERVER组LOCAL下的数据库,右键点击你要备份的数据库,选择属性。在弹出的对话框中选择数据文件,在这里显示了数据文件的路径,如下图:


打开SQL SERVER 服务管理器,将SQL SERVER 停止。然后打开我的电脑,找到数据文件路径,将其拷贝出来进行备份(注意同时备份.LDF文件)。

最后开启SQL SERVER服务

四、回复数据库备份文件(适用于用企业管理器备份的数据库)。打开SQL SERVER 企业管理器,展开SQL SERVER组LOCAL下的数据库,右键点击你要还原的数据库,选择所有任务下的还原数据库,弹出如下对话框:

选择从设备,点击选择设备,为还原添加备份文件路径,然后进行确定还原。

五、还原数据库备份文件。在企业管理器中对数据库节点右键单击,选择所有任务下的附加数据库,弹出附加数据库对话框。如下图:

选择一个你之前拷贝的数据文件,然后点击确定即可附加成功(注:如果数据库已经存在,请删除数据库后在对其进行附加)。

Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn

Hot AI Tools

Undresser.AI Undress

Undresser.AI Undress

AI-powered app for creating realistic nude photos

AI Clothes Remover

AI Clothes Remover

Online AI tool for removing clothes from photos.

Undress AI Tool

Undress AI Tool

Undress images for free

Clothoff.io

Clothoff.io

AI clothes remover

Video Face Swap

Video Face Swap

Swap faces in any video effortlessly with our completely free AI face swap tool!

Hot Tools

Notepad++7.3.1

Notepad++7.3.1

Easy-to-use and free code editor

SublimeText3 Chinese version

SublimeText3 Chinese version

Chinese version, very easy to use

Zend Studio 13.0.1

Zend Studio 13.0.1

Powerful PHP integrated development environment

Dreamweaver CS6

Dreamweaver CS6

Visual web development tools

SublimeText3 Mac version

SublimeText3 Mac version

God-level code editing software (SublimeText3)

How to backup Google Chrome extensions How to backup Google Chrome extensions Jan 30, 2024 pm 12:36 PM

How to backup Google Chrome extension? For most Google Chrome users, more or less plug-ins are installed during daily use. The existence of plug-ins can improve our usage experience. When we reinstall the system or browser, these plug-ins cannot be retained, and it is troublesome to download and install them again. So is there a way to back up the currently installed plug-ins? Here’s how to do it. The tutorial method of backing up chrome plug-ins first opens Google Chrome, click the menu in the upper right corner, and select More Tools - Extensions. Click Package extension above the extensions page. In C:UsersAdministratorAppDataLocalGoogleChromeUserDataDe

How to delete startup backup in Windows 11's File Explorer How to delete startup backup in Windows 11's File Explorer Feb 18, 2024 pm 05:40 PM

If you wish to hide the "Start Backup" option in Windows 11's File Explorer, here's what you can do. There are several ways to disable or hide the startup backup option in File Explorer, and we'll briefly list some methods to help you accomplish this task quickly. Before you get started, you need to understand that this option is closely tied to OneDrive. Once you open a library folder (such as Document, Pictures, Music, etc.), it will immediately appear in the file explorer's path. How to delete startup backup in Windows 11’s File Explorer To delete startup backup in Windows 11’s File Explorer, follow the steps below

How to use MySQL backup and restore in PHP? How to use MySQL backup and restore in PHP? Jun 03, 2024 pm 12:19 PM

Backing up and restoring a MySQL database in PHP can be achieved by following these steps: Back up the database: Use the mysqldump command to dump the database into a SQL file. Restore database: Use the mysql command to restore the database from SQL files.

How to connect php to mssql database How to connect php to mssql database Oct 23, 2023 pm 12:02 PM

Methods for php to connect to mssql database include using PHP's MSSQL extension, using PDO, etc. Detailed introduction: 1. Use PHP's MSSQL extension method to ensure that PHP has the MSSQL extension installed. You can check whether the mssql extension is enabled in the PHP configuration file (php.ini); 2. Use the PDO method to ensure that PHP has the PDO extension installed. You can check whether the pdo_sqlsrv extension is enabled in the PHP configuration file (php.ini).

How to restore the deleted hosts file How to restore the deleted hosts file Feb 22, 2024 pm 10:48 PM

Title: How to restore the hosts file after deletion Summary: The hosts file is a very important file in the operating system and is used to map domain names to IP addresses. If you accidentally delete the hosts file, you may be unable to access certain websites or have other network problems. This article will introduce how to recover accidentally deleted hosts file in Windows and Mac operating systems. Text: 1. Restore hosts file in Windows operating system. Hosts file in Windows operating system

Detailed guide to install PHP and configure MSSQL connection on Ubuntu Detailed guide to install PHP and configure MSSQL connection on Ubuntu Feb 29, 2024 am 11:15 AM

Ubuntu is a popular open source operating system commonly used to run servers. Installing PHP and configuring MSSQL connections on Ubuntu is one of the operations that many developers and system administrators often need to do. This article will provide readers with a detailed guide, including the steps to install PHP, set up Apache, install MSSQLServer, etc., and attach specific code examples. Step 1: Install PHP and related extensions First, we need to install PHP and related extensions to support PHP connections

How to install, uninstall, and reset Windows server backup How to install, uninstall, and reset Windows server backup Mar 06, 2024 am 10:37 AM

WindowsServerBackup is a function that comes with the WindowsServer operating system, designed to help users protect important data and system configurations, and provide complete backup and recovery solutions for small, medium and enterprise-level enterprises. Only users running Server2022 and higher can use this feature. In this article, we will explain how to install, uninstall or reset WindowsServerBackup. How to Reset Windows Server Backup If you are experiencing problems with your server backup, the backup is taking too long, or you are unable to access stored files, then you may consider resetting your Windows Server backup settings. To reset Windows

How to backup system with ghost-ghost backup tutorial How to backup system with ghost-ghost backup tutorial Mar 06, 2024 pm 04:30 PM

Recently, many friends have asked the editor how to back up the system with ghost. Next, let us learn the tutorial on how to back up the system with ghost. I hope it can help everyone. 1. After running Ghost, click "OK", as shown in the figure. 2. Click "Local" → "Partition" → "ToImage" (meaning: local → partition → to image file), as shown in the figure. 3. The Select Local Hard Disk window appears, click the hard disk where the partition to be backed up is located, and then click "OK", as shown in the figure. 4. The Select Source Partition window appears (the source partition is the partition you want to back up), click on the partition where the system is located (usually Zone 1, be sure to get it right), and then click "OK", as shown in the figure. 5. Play at this time

See all articles