Reputation: 59284
How can I run .SQL
files from other .SQL
files using MonetDB?
I went through the whole documentation but had no success finding it.
For instance, in MySql
I could do something like
use mydatabase;
source child1.sql
source child2.sql
SELECT * from Products;
SELECT * from Orders;
How can I do that (or something similar) using MonetDB
?
Upvotes: 3
Views: 769
Reputation: 437
To dump the SQL database, start the MonetDB SQL Client program and type the command
\>...\databasedump.sql
\D
\>
The path after > should be an absolute path name (i.e. start with a drive letter) and be in a save location. By default the database is located in %APPDATA%\MonetDB5. After having made a database dump it can be removed. This folder is located inside the dbfarm\demofolder.
Restoring the SQL database can be done using the MonetDB SQL Client program with the following command
\<...\databasedump.sql
Source: https://www.monetdb.org/Documentation/UserGuide/DumpRestore
Upvotes: 0