Backup and Restore Database in SQL Server
Описание
Backup Database From SQL Script
USE [master];
GO
BACKUP DATABASE [SQLTestDB]
TO DISK = N'C:\Program Files\Microsoft SQL Server\MSSQL14.MSSQLSERVER\MSSQL\Backup\Demo.bak'
WITH NOFORMAT, NOINIT,
NAME = N'SQLTestDB-Full Database Backup', SKIP, NOREWIND, NOUNLOAD, STATS = 10;
GO
Restore Database From SQL Script
USE [master];
GO
RESTORE DATABASE [SQLTestDB]
FROM DISK = N'C:\Program Files\Microsoft SQL Server\MSSQL14.MSSQLSERVER\MSSQL\Backup\SQLTestDB.bak' WITH FILE = 1, NOUNLOAD, STATS = 5;
GO
Now,
We are presenting the demo on how up backup and restore databases from the ms SQL server. For more details, you can see our blog site: https://www.findandsolve.com.the
Launch SQL Server Management Studio (SSMS) and connect to your SQL Server instance.
Expand the Databases node in Object Explorer.
Right-click the database, hover over Tasks and select Back up...
Under Destination, confirm that the path for your backup is correct. If you need to change the path, select Remove to remove the existing path, and then Add to type in a new path. You can use the ellipses to navigate to a specific file.
Select OK to take a backup of your database.
Рекомендуемые видео



















