10-04-2020 06:48 PM
I wonder if there's any way to backup SQL database using LabView?
10-05-2020 01:33 AM
This depends on the database system.
10-05-2020 08:57 AM
If you have SQL Server you can send a SQL command to perform a backup.
10-06-2020 02:43 AM
What do you mean by database system?
I am using SQL Express server. I am writing a program to backup the database periodically and save it to a shared folder.
10-06-2020 02:47 AM
The backup need to be daily.
The database name is same as the PC name and it needs to be run on multiple mchine.
in in other words one program to be run on multiple machines.
The link that you sent assumes the database name does not change.
10-06-2020 03:17 AM - edited 10-06-2020 03:19 AM
@LV2020 wrote:
The backup need to be daily.
The database name is same as the PC name and it needs to be run on multiple mchine.
in in other words one program to be run on multiple machines.
The link that you sent assumes the database name does not change.
I'm pretty sure you can figure out how to change the name dynamically ...
Also, why would you have different DB names? That's quite unusual.
10-06-2020 04:12 AM
As said, every database system has its own SQL commands to backup.
For MS SQL:
Get list of all databases from server by executing
SELECT name FROM master.sys.databases
This will also include some system databases you do not want to backup, so choose the desired ones, and run the backup for each separately by executing:
BACKUP DATABASE <YourDbName> TO DISK = '<YourFileName>'
Note that the destination is a file on the machine where the server is running, not from where the commands are sent.
I don't know for MS SQL, but e.g. MariaDB does not allow to overwrite an existing backup file for security reasons, so make sure to chose new file names every time.
10-06-2020 06:26 AM
@LV2020 wrote:
What do you mean by database system?
What you are using ... MySQL, PostgreSQL, MS SQL Server, Oracle, SQLite, MS Access, MongoDB, IBM DB2, Cassandra, MariaDB or any other database
12-03-2020 02:35 PM
I am using my SQL