To take backup and restore sql express by cmd

How to take backup of Microsoft SQL express by command prompt (CMD)?


Now going to share experience about that how to take backup and restore of Microsoft SQL express by command prompt (cmd). As we know about Microsoft SQL express edition it's totally free that's why it has limited feature. In Microsoft SQL express edition  have not feature to create job for backup. We have another option to take backup of Microsoft SQL express by command prompt (cmd).




To take backup of Microsoft SQL express :

SQLCMD -E -S Sql_instanceName –Q "BACKUP DATABASE [Name_of_Database] TO DISK='PathOfDestination\[Name_of_Database].bak'"



For Instance:

SQLCMD -E -S .\SQLEXPRESS -Q "BACKUP DATABASE TEST TO DISK='E:\Backup\test\test.bak'"





To restore backup of Microsoft SQL express :

SQLCMD -E -S Sql_instanceName –Q “RESTORE DATABASE [Name_of_Database] FROM DISK='PathOfDestination\[Name_of_Database].bak'"


For Instance:

SQLCMD -E -S .\SQLEXPRESS -Q "RESTORE DATABASE TEST FROM DISK='E:\Backup\test\test.bak'"



Hope this will help to all of you and resolved your all query if you have any query or question so you may ask to send email on our email account (onlinenetworkssolution@gmail.com) or leave comment on page.

Share:

0 comments

Please leave your comments...... Thanks