Sunday, January 8, 2017

How to take database Backup and restore using command T-Sql

In this article I am going to explain how to take database Backup and restore using command T-Sql.


Description:
We have only 2 commands for database backup, backup database and backup log. Backup database takes backs up the full database and backup log backs up transaction log.

Backup database
Backup database [demo] to disk='D:\demo.bak'

Backup log
backup log [demo] to disk='D:\demolog.bak'

Restore database
restore database [demo] from disk='D:\demo.bak' 









No comments:

Post a Comment