MySQL --- Database replication and deletion

Copy database: The database is transferred from one server to another server or on the same server. When the database is not needed, we need to delete the database instance and database files.

1. Copy the database

① Before copying the database, you need to open the SQL Sever agent

Note that before ② replicate database operations are SQL Server Agent 's built-in account to select Local system 

Expand the database, click on the database to be copied, select "task", and select "copy database" in the task

2. Delete the database (Before deleting the database, the deleted database is operated offline, otherwise it will prompt: the database is currently in use.)

Expand the database, click on the database to be deleted, right-click and select "Delete"

Use SQL to delete the database (before deleting the database, the deleted database is offline, otherwise it will prompt: the database is currently in use.)

3. Offline and online database

Offline and online are based on the current state of the database. When a database is in an operational and queryable state, it is online . When a database sees its name in the database node, but cannot perform any effective database operations on it, it is offline .

Significance of offline and online databases: In the process of database management and software development, migration operations to the current database often occur. In the online state, SQL 2008 does not allow copying of database files. For example, synchronizing the database of the current development version to the database of the product version can be completed by this operation.

Expand "database", right-click and select "task", select "offline" in the task

Guess you like

Origin blog.csdn.net/C_huid/article/details/103777901