Re: [MonetDB-users] Database dump does not support schemas
On 24-03-2008 01:01:14 -0400, McKennirey.Matthew wrote:
Forgot environment: built 2008-03-22 from nightly=stable on Linux (OpenSusue 10.2)
# MonetDB server v5.4.0, based on kernel v1.220 # Compiled for i686-pc-linux-gnu/32bit with 32bit OIDs dynamically linked
The database dump command does not appear to support schemas
As workaround for the moment you could try the jdbcclient's dump feature, which does handle schemas, but fails to properly dump all constraints on tables. You can find jdbcclient here: http://homepages.cwi.nl/~fabian/troep/jdbcclient.jar
./monetdb create TESTDB
successfully created database 'TESTDB'
./monetdb start TESTDB
./mclient --database=TESTDB --user=monetdb --passwd=monetdb -lsql
sql>CREATE SCHEMA abc;
sql>CREATE TABLE abc.T1 (col1 VARCHAR (32));
sql>CREATE TABLE abc.T2 (col1 VARCHAR (32));
sql>\q;
./mclient -lsql --database=TESTDB --dump >/local/monetdb/test-dump.sql
Table sys.t1 does not exist.
Table sys.t2 does not exist.
cat /local/monetdb/test-dump.sql
START TRANSACTION;
COMMIT;
Thanks. I am running the jar, connecting to the database, and have looked at the Javadoc, but I am not sure what command to use to create the dump. When presented with the monetdb-> prompt is there a 'command line' way to create a dump, or is doDump() only available programmatically? ------------------------- Welcome to the MonetDB interactive JDBC terminal! Database: MonetDB v5.4.1, 'TESTDB' Driver: MonetDB Native Driver v1.7 (Canephora_p2 20080221 based on MCL v1.2) Type \q to quit, \h for a list of available commands auto commit mode: on monetdb-> \h Available commands: \q quits this program \h this help screen \d list available tables and views \d<obj> describes the given table or view \l<uri> executes the contents of the given file or URL \i<uri> batch executes the inserts from the given file or URL monetdb-> ---------------------------- On Monday 24 March 2008 04:35:27 Fabian Groffen wrote:
On 24-03-2008 01:01:14 -0400, McKennirey.Matthew wrote:
Forgot environment: built 2008-03-22 from nightly=stable on Linux (OpenSusue 10.2)
# MonetDB server v5.4.0, based on kernel v1.220 # Compiled for i686-pc-linux-gnu/32bit with 32bit OIDs dynamically linked
The database dump command does not appear to support schemas
As workaround for the moment you could try the jdbcclient's dump feature, which does handle schemas, but fails to properly dump all constraints on tables. You can find jdbcclient here: http://homepages.cwi.nl/~fabian/troep/jdbcclient.jar
On 24-03-2008 10:35:51 -0400, McKennirey.Matthew wrote:
Thanks. I am running the jar, connecting to the database, and have looked at the Javadoc, but I am not sure what command to use to create the dump.
When presented with the monetdb-> prompt is there a 'command line' way to create a dump, or is doDump() only available programmatically?
use jdbcclient --help to find the exact details, off the top of my head, use -D <table> (or --dump <table>). Without an argument, everything is dumped.
Welcome to the MonetDB interactive JDBC terminal! Database: MonetDB v5.4.1, 'TESTDB' Driver: MonetDB Native Driver v1.7 (Canephora_p2 20080221 based on MCL v1.2) Type \q to quit, \h for a list of available commands auto commit mode: on monetdb-> \h Available commands: \q quits this program \h this help screen \d list available tables and views \d<obj> describes the given table or view \l<uri> executes the contents of the given file or URL \i<uri> batch executes the inserts from the given file or URL monetdb->
I fixed the dump code to be aware of schemas. You can find it in tonight's nightly builds (if building succeeds, which it usually does). On 2008-03-24 06:01, McKennirey.Matthew wrote:
Forgot environment: built 2008-03-22 from nightly=stable on Linux (OpenSusue 10.2)
# MonetDB server v5.4.0, based on kernel v1.220 # Compiled for i686-pc-linux-gnu/32bit with 32bit OIDs dynamically linked
The database dump command does not appear to support schemas
----------------------------
./monetdb create TESTDB
successfully created database 'TESTDB'
./monetdb start TESTDB
./mclient --database=TESTDB --user=monetdb --passwd=monetdb -lsql
sql>CREATE SCHEMA abc;
sql>CREATE TABLE abc.T1 (col1 VARCHAR (32));
sql>CREATE TABLE abc.T2 (col1 VARCHAR (32));
sql>\q;
./mclient -lsql --database=TESTDB --dump >/local/monetdb/test-dump.sql
Table sys.t1 does not exist.
Table sys.t2 does not exist.
cat /local/monetdb/test-dump.sql
START TRANSACTION;
COMMIT;
-------------------------------------------------------------------
-- Matthew McKennirey mmckennirey@dpfuture.biz home office 301 841 7690 cell 703 868 8234
------------------------------------------------------------------------
------------------------------------------------------------------------- This SF.net email is sponsored by: Microsoft Defy all challenges. Microsoft(R) Visual Studio 2008. http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
------------------------------------------------------------------------
_______________________________________________ MonetDB-users mailing list MonetDB-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/monetdb-users
-- Sjoerd Mullender
Thank you. That seems to be working fine. On Tuesday 25 March 2008 15:36:32 Sjoerd Mullender wrote:
I fixed the dump code to be aware of schemas. You can find it in tonight's nightly builds (if building succeeds, which it usually does).
On 2008-03-24 06:01, McKennirey.Matthew wrote:
Forgot environment: built 2008-03-22 from nightly=stable on Linux (OpenSusue 10.2)
# MonetDB server v5.4.0, based on kernel v1.220 # Compiled for i686-pc-linux-gnu/32bit with 32bit OIDs dynamically linked
The database dump command does not appear to support schemas
participants (3)
-
Fabian Groffen
-
McKennirey.Matthew
-
Sjoerd Mullender