Various management methods of SQL Server database

Time:2020-10-27

The scope of application of this paper: a comprehensive description of SQL Server database operations, divided into virtual host and server two cases.

This is a long article. Please use the outline below to access it.

outline

1、 Virtual host

Enterprise manager online installation
2. Register remote enterprise manager (SQL2000)
3. Register remote enterprise manager (SQL2005 / 2008)
4. Use the management panel to backup and restore

2、 Server or VPS

1. Create a new database
2. Additional database
3. Backup database
4. Restore the database

Virtual host

In this case, we only have the database IP address, user name and password provided by the space provider (some space providers also provide online management panel).

1. Install online enterprise manager

This method can not backup and restore the database as a whole. It is generally used to modify the imported database in a small scale. The database products of morning and evening data are all equipped with this tool. The following is the operation screenshot:

 

[back to top]

2. Register remote enterprise manager (SQL2000)

1) This method requires us to install Microsoft SQL Server software on our own computer. Open the Start Menu > programs > Microsoft SQL Server > Enterprise Manager, expand Microsoft SQL servers > sql server group – > (local), and right-clickSQL Server Group, and then clickNew SQL Server registration

2) In the register SQL Server Wizard, click next. Then enter the IP address of the database under the available server and clickadd to, and then clicknext step

3) Next, chooseSQL server login information assigned to me by the administrator, and then click next. Then enter the user name and password, or clicknext step, and finally click finish.

4) If the IP address, user name and password are correct, and the space provider has opened the remote access rights, the connection can be successful. Then click the + next to the new registration database, and a prompt will pop up. ClickyesConnect.

5) Expand each item in turn. If you see other database accounts, don’t be surprised. They are opened to other customers by space merchants. You don’t have access rights. You can only see them.

6) Next, right-click the database name and selectAll tasks, and then clickBackup databaseorRestore database。 For the specific operation method of backup and restore, please see the instructions in the following independent server.

 

[back to top]

3. Register remote enterprise manager (SQL2005 / 2008)

1) After the SQL Server 2005 / 2008 database is installed on the local computer, open the Start Menu > programs > Microsoft SQL Server 2005 / 2008 > SQL Server Management Studio, and the following dialog box will automatically pop up.

2) Enter the IP address on the server name, select SQL server authentication for authentication, and then enter the database user name and password, and clickconnectThat’s fine. The next steps are similar to those of SQL Server 2000.

 

[back to top]

4. Backup restore using management panel

Here are the morning and evening data www.zhaomu.com The management panel of SQL server is used as an example to demonstrate the backup and restore of SQL Server database (i.e. export and import).

1) ClickDatabase management, find the database to be managed, and then clickAdministrationLinks.

2) ClickbackupsButton, the system will back up the database to the corresponding space. We connect to the space through FTP, and there are database backup files in the root directory of the space, and the file name is sq_ ***.bak。

3) Restoring the database is also simple. First name the backup file as shown in the above figure (for example, SQ_ ***Bak), then upload it to the root directory of the corresponding space, and then clickreductionButton.

 

[back to top]

Server or VPS

In this case, you have the remote permission of server or VPS, and you need to create, attach, backup, restore SQL Server database, etc.

1. New database

1) Open the Start Menu > programs > Microsoft SQL Server > Enterprise Manager, expand Microsoft SQL servers > sql server group > (local) – > database, and right-clickdatabase, and then clickNew database

2) In the database properties dialog box, in theroutineTab, enter the database name, and then in thedata fileandlog fileYou can also specify the maximum size of the database.

 

[back to top]

2. Additional database

Attached databases are especially useful when you have only the database source files on hand, that is, MDF and LDF files.

1) Open the Start Menu > programs > Microsoft SQL Server > Enterprise Manager, expand Microsoft SQL servers > sql server group > (local) – > database, right-click the database name and selectAll tasks, and then clickAttach database

2) Then enter the specific path of the MDF file and clickverificationWhen you see two green check marks below, the document is complete, then fill in the database name (attached as this item), and then clickdetermine, the attachment is successful.

 

[back to top]

3. Backup database

1) Open the Start Menu > programs > Microsoft SQL Server > Enterprise Manager, expand Microsoft SQL servers > sql server group > (local) – > database, right-click the database name and selectAll tasks, and then clickBackup database

2) On the General tab, clickadd to, then enter the backup file name and clickdetermineThat’s fine.

 

[back to top]

4. Restore database

1) Open the Start Menu > programs > Microsoft SQL Server > Enterprise Manager, expand Microsoft SQL servers > sql server group > (local) – > database, right-click the database name and selectAll tasks, and then clickRestore database

2) On the General tab, clickSlave device, and then clickSelect device

3) Then clickadd to, enter the path of the backup file, and clickdetermine, and then clickdetermine, return to the General tab.

Recommended Today

Android power consumption (1) — Android power analysis method and optimization

1. Bottom current optimization The bottom current is debugged in the mobile phone flight mode. The bottom current data of each platform may be different. For details, please refer to the current consumption data document or release note from the release. In general, the upper limit of bottom current reference data is: The bottom current […]