How can I back up a database on a VM to a local machine? Or sometimes we want to restore the local database to the database on the VM. What should we do? Many cainiao like me have bought dozens of dollars for software such as porters, but I don't think it's worth it.
In the past, when we used SQL Server 2000 for connection, the database backup, restoration, import, and export of the virtual host were generally unavailable, however, I found that SQL Server 2005 can be directly imported and exported as long as you know the database account and password, which is very convenient. The following describes the specific operation steps:
1. How to back up the database on the remote server to a local machine? First, create a local database named backup1, and then use the SQL Server 2005 Manager to remotely connect to the remote database, right-click your database, select "task =" export data = ", and enter the server name in the IP address of the server. Use sqlserver for identity authentication, enter the user name and password (the user name and password given to you by the carrier), select your database => next => server name select the name or IP address of the local server, use SQL Server identity authentication to enter the account and password, and select backup1 database = to copy data from one or more tables and views =... I will not talk about the following.
2. How can I restore the database on the remote server? The method is similar to creating a local database named backup2, restoring the backup file to backup2, and remotely connecting to your remote database (using SQL Server 2005 ), right-click your database, select "task =" import data = ", correctly set backup2 database information =" Next step = "correctly configure your remote database information =", and then follow the prompts to proceed..
In this way, we have no need to find third-party tools again...