0

My QT program is connected to a sql server which contains with many databases. How can I back up a specific database and all its tables and existing entries to my local drive? I am trying to make a button backup to the database I want to a file and also be able to restore.If there is no way to do this, is there a 3rd party tool I could use at least?

I am giving this a try using QProcess

SqlCmd -S myserver.com -U username -P password –Q “BACKUP DATABASE [Name_of_Database] 
    TO DISK=’C:/Backup/[Name_of_Database].bak’
jww
  • 97,681
  • 90
  • 411
  • 885
  • This question appears to be off-topic because it does not show what has been tried. – László Papp Apr 04 '14 at 05:48
  • did you use MSSQL Management Studio so far? – Rezoan Apr 04 '14 at 06:46
  • MSSQL comes with command-line programs that you can use. Google "backup MSSQL from the command-line" and then execute those instructions from inside your Qt program using `QProcess`. – RobbieE Apr 04 '14 at 07:02

0 Answers0