Home Database Mysql Tutorial SQL server 2008数据库的备份与还原(转)

SQL server 2008数据库的备份与还原(转)

Jun 07, 2016 pm 03:30 PM
server sql backup database reduction

一、SQL数据库的备份 : 1、依次打开 开始菜单 → 程序 → Microsoft SQL Server 2008 → SQL Server Management Studio → 数据库:Dsideal_school_db既是我们需要备份的学籍数据库 图(1) 2、选择要备份的数据库“Dsideal_school_db”,点击鼠标右键 →

一、SQL数据库的备份

1、依次打开 开始菜单 → 程序 → Microsoft SQL Server 2008 → SQL Server Management Studio → 数据库:Dsideal_school_db既是我们需要备份的学籍数据库

SQL server 2008数据库的备份与还原(转)

图(1)

2、选择要备份的数据库“Dsideal_school_db”,点击鼠标右键 → 任务 → 备份,如图(2):

SQL server 2008数据库的备份与还原(转)

图(2)

3、在打开的“备份数据库 —Dsideal_school_db”对话框中,先点击删除,然后点击“添加”,如图(3):

SQL server 2008数据库的备份与还原(转)

图(3)

4、在弹出的“选择备份目标”对话框中,如图(4)

SQL server 2008数据库的备份与还原(转)

图(4)

5、选择好备份的路径(如D盘的江西-学籍-数据库备份文件夹中),文件类型选择“所有文件”,“文件名”那个位置填写上您要备份的数据库的名字(最好在您备份的数据库的名字后面加上日期,以方便以后查找),之后连续点击“确定”按钮即可完成数据库的备份操作,如图(5):

SQL server 2008数据库的备份与还原(转)

图(5

二、SQL数据库的还原

1、选择您要还原的数据库“Dsideal_school_db”,点击鼠标右键 → 任务 → 还原 → 数据库,如图(6):

SQL server 2008数据库的备份与还原(转)

图(6)

2、在出现的“还原数据库 — school_web_db”对话框中选择“源设备”,然后点击后面的“…”按钮,如图(7):

SQL server 2008数据库的备份与还原(转)

图(7)

3、在出现的“指定备份”对话框中,点击“添加”按钮,如图(8):

SQL server 2008数据库的备份与还原(转)

图(8)

4、找到数据库备份的路径,选择您所要还原的数据库“Dsideal_school_db”(注意:文件类型选择所有文件),然后连续“两次”点击“确定”按钮,如图(9):

SQL server 2008数据库的备份与还原(转)

图(9)

5、在出现的“还原数据库 — Dsideal_school_db”对话框中,勾选上“选择用户还原的备份集”下的数据库前的复选框,如图(10)

SQL server 2008数据库的备份与还原(转)

图(10)

6、然后选择“选项”,勾选上“覆盖现有数据库”,如图(11):

SQL server 2008数据库的备份与还原(转)

图(11)

三、还原数据库问题解决方案

SQL server 2008数据库的备份与还原(转)

在还原数据库“Dsideal_school_db”时,有时会遇见上图中的问题“因为数据库正在使用,所以无法获得对数据库的独占访问权”,此时我们可以按照以下步骤解决此问题

1、右键数据库“Dsideal_school_db”,然后选择“属性”,如下图

SQL server 2008数据库的备份与还原(转)

2、在出现的“数据库属性 — Dsideal_school_db ”对话框中,选择“选项”,在“其他选项”下的“状态”中找到“限制访问”。选择“SINGLE_USER”,点击“确定”按钮,如下图:

SQL server 2008数据库的备份与还原(转)

3、按照正常还原数据库的步骤,还原数据库。

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

AI Hentai Generator

AI Hentai Generator

Generate AI Hentai for free.

Hot Article

R.E.P.O. Energy Crystals Explained and What They Do (Yellow Crystal)
1 months ago By 尊渡假赌尊渡假赌尊渡假赌
R.E.P.O. Best Graphic Settings
1 months ago By 尊渡假赌尊渡假赌尊渡假赌
R.E.P.O. How to Fix Audio if You Can't Hear Anyone
1 months ago By 尊渡假赌尊渡假赌尊渡假赌
R.E.P.O. Chat Commands and How to Use Them
1 months ago By 尊渡假赌尊渡假赌尊渡假赌

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)

What is the difference between HQL and SQL in Hibernate framework? What is the difference between HQL and SQL in Hibernate framework? Apr 17, 2024 pm 02:57 PM

HQL and SQL are compared in the Hibernate framework: HQL (1. Object-oriented syntax, 2. Database-independent queries, 3. Type safety), while SQL directly operates the database (1. Database-independent standards, 2. Complex executable queries and data manipulation).

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.

iOS 18 adds a new 'Recovered' album function to retrieve lost or damaged photos iOS 18 adds a new 'Recovered' album function to retrieve lost or damaged photos Jul 18, 2024 am 05:48 AM

Apple's latest releases of iOS18, iPadOS18 and macOS Sequoia systems have added an important feature to the Photos application, designed to help users easily recover photos and videos lost or damaged due to various reasons. The new feature introduces an album called "Recovered" in the Tools section of the Photos app that will automatically appear when a user has pictures or videos on their device that are not part of their photo library. The emergence of the "Recovered" album provides a solution for photos and videos lost due to database corruption, the camera application not saving to the photo library correctly, or a third-party application managing the photo library. Users only need a few simple steps

Detailed tutorial on establishing a database connection using MySQLi in PHP Detailed tutorial on establishing a database connection using MySQLi in PHP Jun 04, 2024 pm 01:42 PM

How to use MySQLi to establish a database connection in PHP: Include MySQLi extension (require_once) Create connection function (functionconnect_to_db) Call connection function ($conn=connect_to_db()) Execute query ($result=$conn->query()) Close connection ( $conn->close())

How to handle database connection errors in PHP How to handle database connection errors in PHP Jun 05, 2024 pm 02:16 PM

To handle database connection errors in PHP, you can use the following steps: Use mysqli_connect_errno() to obtain the error code. Use mysqli_connect_error() to get the error message. By capturing and logging these error messages, database connection issues can be easily identified and resolved, ensuring the smooth running of your application.

How to connect to remote database using Golang? How to connect to remote database using Golang? Jun 01, 2024 pm 08:31 PM

Through the Go standard library database/sql package, you can connect to remote databases such as MySQL, PostgreSQL or SQLite: create a connection string containing database connection information. Use the sql.Open() function to open a database connection. Perform database operations such as SQL queries and insert operations. Use defer to close the database connection to release resources.

How to use database callback functions in Golang? How to use database callback functions in Golang? Jun 03, 2024 pm 02:20 PM

Using the database callback function in Golang can achieve: executing custom code after the specified database operation is completed. Add custom behavior through separate functions without writing additional code. Callback functions are available for insert, update, delete, and query operations. You must use the sql.Exec, sql.QueryRow, or sql.Query function to use the callback function.

How to handle database connections and operations using C++? How to handle database connections and operations using C++? Jun 01, 2024 pm 07:24 PM

Use the DataAccessObjects (DAO) library in C++ to connect and operate the database, including establishing database connections, executing SQL queries, inserting new records and updating existing records. The specific steps are: 1. Include necessary library statements; 2. Open the database file; 3. Create a Recordset object to execute SQL queries or manipulate data; 4. Traverse the results or update records according to specific needs.

See all articles