Portfolio

Wednesday, September 16, 2015

Performing a backup database in SQL Server Management Studio


 Creating backups for all your data is extremely important when working on a particular project.  Especially, when you put in all that time and effort to get your work done for a job, having a backup for all your data is a life saver.  You can't afford to lose anything and waste any time.  Everybody has a time limit, especially your client that you are trying to please. 

I have provided these crucial steps to backing up your database.  It's just an example, but it works.  


Here are some examples of backing up your database in SQL Server Management Studio.

If you have any questions feel free to contact me.





Backing up your databases in SQL Server Management Studio 2014

--How to backup database--
Backup Database Sample2
TO DISK = 'C:\Program Files\Microsoft SQL Server\MSSQL12.MSSQLSERVER\MSSQL\Backup\Sample2.bak';

--How to backup database with name & description to why this was backed up--
BACKUP DATABASE Sample2
TO DISK = 'C:\Program Files\Microsoft SQL Server\MSSQL12.MSSQLSERVER\MSSQL\Backup\Sample2.bak'
WITH INIT,
NAME = 'My video backup',
DESCRIPTION = 'This is an example backup';

--FULL BACKUP WITH ANOTHER COPY--
BACKUP DATABASE Sample2
TO DISK = 'C:\Program Files\Microsoft SQL Server\MSSQL12.MSSQLSERVER\MSSQL\Backup\Sample3.bak';

--LOG BACKUP--
BACKUP LOG Sample2
TO DISK = 'C:\Program Files\Microsoft SQL Server\MSSQL12.MSSQLSERVER\MSSQL\Backup\Sample3.bak';

RESTORE HEADERONLY FROM DISK = 'C:\Program Files\Microsoft SQL Server\MSSQL12.MSSQLSERVER\MSSQL\Backup\Sample2.bak';


No comments:

Post a Comment