Hello, I'm wondering if there is some hard core way to drop a view. Somehow I have three views that I'm not able to drop. I can issue drop statement several times and it returns success. Here is log from mclient: ceos@lux-drmax-ana:/u01/ceosdata/database/monetdb/drmax/crm$ mclient -d zkdev1 -u drmaxtst password: Welcome to mclient, the MonetDB/SQL interactive terminal (Jan2014-SP2) Database: MonetDB v11.17.17 (Jan2014-SP2), 'mapi:monetdb://lux-drmax-ana:50000/zkdev1' Type \q to quit, \? for a list of available commands auto commit mode: on sql>\dv VIEW drmaxtst.all_constraints VIEW drmaxtst.all_tab_columns VIEW drmaxtst.mmtest_v VIEW drmaxtst.pohyby_prodeje_v VIEW drmaxtst.prijmy_2012_v_mr_tmp VIEW drmaxtst.prijmy_v VIEW drmaxtst.prodeje_2011_v VIEW drmaxtst.prodeje_2012_v VIEW drmaxtst.prodeje_2012_v_mr_tmp VIEW drmaxtst.prodeje_2013_v VIEW drmaxtst.prodeje_2014_v VIEW drmaxtst.prodeje_v VIEW drmaxtst.stav_skladu_historie sql>drop view drmaxtst.prodeje_v; operation successful (3.168ms) sql>drop view drmaxtst.prodeje_v; operation successful (3.004ms) sql>drop view drmaxtst.prodeje_v; operation successful (7.501ms) sql>drop view drmaxtst.prodeje_v; operation successful (4.154ms) sql>drop view drmaxtst.prodeje_v; operation successful (2.351ms) sql>drop view drmaxtst.prodeje_v; operation successful (2.410ms) sql>drop view drmaxtst.prodeje_v; operation successful (2.355ms) sql>drop view drmaxtst.prodeje_v; operation successful (2.685ms) sql>drop view drmaxtst.prodeje_v; operation successful (2.646ms) sql>drop view drmaxtst.prodeje_v; operation successful (2.695ms) sql>drop view drmaxtst.prodeje_v; operation successful (2.390ms) sql>drop view drmaxtst.prodeje_v; operation successful (2.399ms) sql>drop view drmaxtst.prodeje_v; DROP VIEW: unknown view 'prodeje_v' sql>drop view drmaxtst.prodeje_v; DROP VIEW: unknown view 'prodeje_v' sql>\dv VIEW drmaxtst.all_constraints VIEW drmaxtst.all_tab_columns VIEW drmaxtst.mmtest_v VIEW drmaxtst.pohyby_prodeje_v VIEW drmaxtst.prijmy_2012_v_mr_tmp VIEW drmaxtst.prijmy_v VIEW drmaxtst.prodeje_2011_v VIEW drmaxtst.prodeje_2012_v VIEW drmaxtst.prodeje_2012_v_mr_tmp VIEW drmaxtst.prodeje_2013_v VIEW drmaxtst.prodeje_2014_v VIEW drmaxtst.prodeje_v VIEW drmaxtst.stav_skladu_historie sql> I guess my only option is to dump a reload the database. :( Radovan
Hello, I tried to dump the database and received following error: table drmaxtst.stav_skladu_historie is not unique, corrupt catalog ? Any tips how to dump the database will be highly appreciated. Thank you, Radovan On 09/05/2014 02:49 PM, Radovan Bičiště wrote:
Hello, I'm wondering if there is some hard core way to drop a view. Somehow I have three views that I'm not able to drop. I can issue drop statement several times and it returns success. Here is log from mclient: ceos@lux-drmax-ana:/u01/ceosdata/database/monetdb/drmax/crm$ mclient -d zkdev1 -u drmaxtst password: Welcome to mclient, the MonetDB/SQL interactive terminal (Jan2014-SP2) Database: MonetDB v11.17.17 (Jan2014-SP2), 'mapi:monetdb://lux-drmax-ana:50000/zkdev1' Type \q to quit, \? for a list of available commands auto commit mode: on sql>\dv VIEW drmaxtst.all_constraints VIEW drmaxtst.all_tab_columns VIEW drmaxtst.mmtest_v VIEW drmaxtst.pohyby_prodeje_v VIEW drmaxtst.prijmy_2012_v_mr_tmp VIEW drmaxtst.prijmy_v VIEW drmaxtst.prodeje_2011_v VIEW drmaxtst.prodeje_2012_v VIEW drmaxtst.prodeje_2012_v_mr_tmp VIEW drmaxtst.prodeje_2013_v VIEW drmaxtst.prodeje_2014_v VIEW drmaxtst.prodeje_v VIEW drmaxtst.stav_skladu_historie sql>drop view drmaxtst.prodeje_v; operation successful (3.168ms) sql>drop view drmaxtst.prodeje_v; operation successful (3.004ms) sql>drop view drmaxtst.prodeje_v; operation successful (7.501ms) sql>drop view drmaxtst.prodeje_v; operation successful (4.154ms) sql>drop view drmaxtst.prodeje_v; operation successful (2.351ms) sql>drop view drmaxtst.prodeje_v; operation successful (2.410ms) sql>drop view drmaxtst.prodeje_v; operation successful (2.355ms) sql>drop view drmaxtst.prodeje_v; operation successful (2.685ms) sql>drop view drmaxtst.prodeje_v; operation successful (2.646ms) sql>drop view drmaxtst.prodeje_v; operation successful (2.695ms) sql>drop view drmaxtst.prodeje_v; operation successful (2.390ms) sql>drop view drmaxtst.prodeje_v; operation successful (2.399ms) sql>drop view drmaxtst.prodeje_v; DROP VIEW: unknown view 'prodeje_v' sql>drop view drmaxtst.prodeje_v; DROP VIEW: unknown view 'prodeje_v' sql>\dv VIEW drmaxtst.all_constraints VIEW drmaxtst.all_tab_columns VIEW drmaxtst.mmtest_v VIEW drmaxtst.pohyby_prodeje_v VIEW drmaxtst.prijmy_2012_v_mr_tmp VIEW drmaxtst.prijmy_v VIEW drmaxtst.prodeje_2011_v VIEW drmaxtst.prodeje_2012_v VIEW drmaxtst.prodeje_2012_v_mr_tmp VIEW drmaxtst.prodeje_2013_v VIEW drmaxtst.prodeje_2014_v VIEW drmaxtst.prodeje_v VIEW drmaxtst.stav_skladu_historie sql>
I guess my only option is to dump a reload the database. :(
Radovan
-- __________________________ Radovan Bičiště ceos data s.r.o. Pouchovská 153 500 03 Hradec Králové Czech Republic mobil CZ: +420 601 563 014 skype: rbiciste
On Sun, Sep 07, 2014 at 01:39:19PM +0200, Radovan Bičiště wrote:
Hello, I tried to dump the database and received following error: table drmaxtst.stav_skladu_historie is not unique, corrupt catalog ? By dropping the unique constraint, you may be able to dump the db.
Niels
Any tips how to dump the database will be highly appreciated. Thank you, Radovan
On 09/05/2014 02:49 PM, Radovan Bičiště wrote:
Hello, I'm wondering if there is some hard core way to drop a view. Somehow I have three views that I'm not able to drop. I can issue drop statement several times and it returns success. Here is log from mclient: ceos@lux-drmax-ana:/u01/ceosdata/database/monetdb/drmax/crm$ mclient -d zkdev1 -u drmaxtst password: Welcome to mclient, the MonetDB/SQL interactive terminal (Jan2014-SP2) Database: MonetDB v11.17.17 (Jan2014-SP2), 'mapi:monetdb://lux-drmax-ana:50000/zkdev1' Type \q to quit, \? for a list of available commands auto commit mode: on sql>\dv VIEW drmaxtst.all_constraints VIEW drmaxtst.all_tab_columns VIEW drmaxtst.mmtest_v VIEW drmaxtst.pohyby_prodeje_v VIEW drmaxtst.prijmy_2012_v_mr_tmp VIEW drmaxtst.prijmy_v VIEW drmaxtst.prodeje_2011_v VIEW drmaxtst.prodeje_2012_v VIEW drmaxtst.prodeje_2012_v_mr_tmp VIEW drmaxtst.prodeje_2013_v VIEW drmaxtst.prodeje_2014_v VIEW drmaxtst.prodeje_v VIEW drmaxtst.stav_skladu_historie sql>drop view drmaxtst.prodeje_v; operation successful (3.168ms) sql>drop view drmaxtst.prodeje_v; operation successful (3.004ms) sql>drop view drmaxtst.prodeje_v; operation successful (7.501ms) sql>drop view drmaxtst.prodeje_v; operation successful (4.154ms) sql>drop view drmaxtst.prodeje_v; operation successful (2.351ms) sql>drop view drmaxtst.prodeje_v; operation successful (2.410ms) sql>drop view drmaxtst.prodeje_v; operation successful (2.355ms) sql>drop view drmaxtst.prodeje_v; operation successful (2.685ms) sql>drop view drmaxtst.prodeje_v; operation successful (2.646ms) sql>drop view drmaxtst.prodeje_v; operation successful (2.695ms) sql>drop view drmaxtst.prodeje_v; operation successful (2.390ms) sql>drop view drmaxtst.prodeje_v; operation successful (2.399ms) sql>drop view drmaxtst.prodeje_v; DROP VIEW: unknown view 'prodeje_v' sql>drop view drmaxtst.prodeje_v; DROP VIEW: unknown view 'prodeje_v' sql>\dv VIEW drmaxtst.all_constraints VIEW drmaxtst.all_tab_columns VIEW drmaxtst.mmtest_v VIEW drmaxtst.pohyby_prodeje_v VIEW drmaxtst.prijmy_2012_v_mr_tmp VIEW drmaxtst.prijmy_v VIEW drmaxtst.prodeje_2011_v VIEW drmaxtst.prodeje_2012_v VIEW drmaxtst.prodeje_2012_v_mr_tmp VIEW drmaxtst.prodeje_2013_v VIEW drmaxtst.prodeje_2014_v VIEW drmaxtst.prodeje_v VIEW drmaxtst.stav_skladu_historie sql>
I guess my only option is to dump a reload the database. :(
Radovan
-- __________________________
Radovan Bičiště ceos data s.r.o. Pouchovská 153 500 03 Hradec Králové Czech Republic
mobil CZ: +420 601 563 014 skype: rbiciste _______________________________________________ users-list mailing list users-list@monetdb.org https://www.monetdb.org/mailman/listinfo/users-list
-- Niels Nes, Centrum Wiskunde & Informatica (CWI) Science Park 123, 1098 XG Amsterdam, The Netherlands room L3.14, phone ++31 20 592-4098 sip:4098@sip.cwi.nl url: http://www.cwi.nl/~niels e-mail: Niels.Nes@cwi.nl
Hello Niels, Thank for the tip. But the object drmaxtst.stav_skladu_historie is actually a view. There is no unique constraint on underlaying tables. Is there a way how to modify the data dictionary directly? Thank you, Radovan On 09/07/2014 03:49 PM, Niels Nes wrote:
On Sun, Sep 07, 2014 at 01:39:19PM +0200, Radovan Bičiště wrote:
Hello, I tried to dump the database and received following error: table drmaxtst.stav_skladu_historie is not unique, corrupt catalog ? By dropping the unique constraint, you may be able to dump the db.
Niels
Any tips how to dump the database will be highly appreciated. Thank you, Radovan
On 09/05/2014 02:49 PM, Radovan Bičiště wrote:
Hello, I'm wondering if there is some hard core way to drop a view. Somehow I have three views that I'm not able to drop. I can issue drop statement several times and it returns success. Here is log from mclient: ceos@lux-drmax-ana:/u01/ceosdata/database/monetdb/drmax/crm$ mclient -d zkdev1 -u drmaxtst password: Welcome to mclient, the MonetDB/SQL interactive terminal (Jan2014-SP2) Database: MonetDB v11.17.17 (Jan2014-SP2), 'mapi:monetdb://lux-drmax-ana:50000/zkdev1' Type \q to quit, \? for a list of available commands auto commit mode: on sql>\dv VIEW drmaxtst.all_constraints VIEW drmaxtst.all_tab_columns VIEW drmaxtst.mmtest_v VIEW drmaxtst.pohyby_prodeje_v VIEW drmaxtst.prijmy_2012_v_mr_tmp VIEW drmaxtst.prijmy_v VIEW drmaxtst.prodeje_2011_v VIEW drmaxtst.prodeje_2012_v VIEW drmaxtst.prodeje_2012_v_mr_tmp VIEW drmaxtst.prodeje_2013_v VIEW drmaxtst.prodeje_2014_v VIEW drmaxtst.prodeje_v VIEW drmaxtst.stav_skladu_historie sql>drop view drmaxtst.prodeje_v; operation successful (3.168ms) sql>drop view drmaxtst.prodeje_v; operation successful (3.004ms) sql>drop view drmaxtst.prodeje_v; operation successful (7.501ms) sql>drop view drmaxtst.prodeje_v; operation successful (4.154ms) sql>drop view drmaxtst.prodeje_v; operation successful (2.351ms) sql>drop view drmaxtst.prodeje_v; operation successful (2.410ms) sql>drop view drmaxtst.prodeje_v; operation successful (2.355ms) sql>drop view drmaxtst.prodeje_v; operation successful (2.685ms) sql>drop view drmaxtst.prodeje_v; operation successful (2.646ms) sql>drop view drmaxtst.prodeje_v; operation successful (2.695ms) sql>drop view drmaxtst.prodeje_v; operation successful (2.390ms) sql>drop view drmaxtst.prodeje_v; operation successful (2.399ms) sql>drop view drmaxtst.prodeje_v; DROP VIEW: unknown view 'prodeje_v' sql>drop view drmaxtst.prodeje_v; DROP VIEW: unknown view 'prodeje_v' sql>\dv VIEW drmaxtst.all_constraints VIEW drmaxtst.all_tab_columns VIEW drmaxtst.mmtest_v VIEW drmaxtst.pohyby_prodeje_v VIEW drmaxtst.prijmy_2012_v_mr_tmp VIEW drmaxtst.prijmy_v VIEW drmaxtst.prodeje_2011_v VIEW drmaxtst.prodeje_2012_v VIEW drmaxtst.prodeje_2012_v_mr_tmp VIEW drmaxtst.prodeje_2013_v VIEW drmaxtst.prodeje_2014_v VIEW drmaxtst.prodeje_v VIEW drmaxtst.stav_skladu_historie sql>
I guess my only option is to dump a reload the database. :(
Radovan
On Mon, Sep 08, 2014 at 08:30:59AM +0200, Radovan Bičiště wrote:
Hello Niels, Thank for the tip. But the object drmaxtst.stav_skladu_historie is actually a view. There is no unique constraint on underlaying tables. Is there a way how to modify the data dictionary directly? Then the message must indicate the table name (view or not) isn't unique. Somehow old table definitions were left behind. This can be seen using select * from tables. If so we can remove them (as monetdb user). But first we need to find out which tables (and id's) weren't properly dropped.
Niels
Thank you, Radovan
On 09/07/2014 03:49 PM, Niels Nes wrote:
On Sun, Sep 07, 2014 at 01:39:19PM +0200, Radovan Bičiště wrote:
Hello, I tried to dump the database and received following error: table drmaxtst.stav_skladu_historie is not unique, corrupt catalog ? By dropping the unique constraint, you may be able to dump the db.
Niels
Any tips how to dump the database will be highly appreciated. Thank you, Radovan
On 09/05/2014 02:49 PM, Radovan Bičiště wrote:
Hello, I'm wondering if there is some hard core way to drop a view. Somehow I have three views that I'm not able to drop. I can issue drop statement several times and it returns success. Here is log from mclient: ceos@lux-drmax-ana:/u01/ceosdata/database/monetdb/drmax/crm$ mclient -d zkdev1 -u drmaxtst password: Welcome to mclient, the MonetDB/SQL interactive terminal (Jan2014-SP2) Database: MonetDB v11.17.17 (Jan2014-SP2), 'mapi:monetdb://lux-drmax-ana:50000/zkdev1' Type \q to quit, \? for a list of available commands auto commit mode: on sql>\dv VIEW drmaxtst.all_constraints VIEW drmaxtst.all_tab_columns VIEW drmaxtst.mmtest_v VIEW drmaxtst.pohyby_prodeje_v VIEW drmaxtst.prijmy_2012_v_mr_tmp VIEW drmaxtst.prijmy_v VIEW drmaxtst.prodeje_2011_v VIEW drmaxtst.prodeje_2012_v VIEW drmaxtst.prodeje_2012_v_mr_tmp VIEW drmaxtst.prodeje_2013_v VIEW drmaxtst.prodeje_2014_v VIEW drmaxtst.prodeje_v VIEW drmaxtst.stav_skladu_historie sql>drop view drmaxtst.prodeje_v; operation successful (3.168ms) sql>drop view drmaxtst.prodeje_v; operation successful (3.004ms) sql>drop view drmaxtst.prodeje_v; operation successful (7.501ms) sql>drop view drmaxtst.prodeje_v; operation successful (4.154ms) sql>drop view drmaxtst.prodeje_v; operation successful (2.351ms) sql>drop view drmaxtst.prodeje_v; operation successful (2.410ms) sql>drop view drmaxtst.prodeje_v; operation successful (2.355ms) sql>drop view drmaxtst.prodeje_v; operation successful (2.685ms) sql>drop view drmaxtst.prodeje_v; operation successful (2.646ms) sql>drop view drmaxtst.prodeje_v; operation successful (2.695ms) sql>drop view drmaxtst.prodeje_v; operation successful (2.390ms) sql>drop view drmaxtst.prodeje_v; operation successful (2.399ms) sql>drop view drmaxtst.prodeje_v; DROP VIEW: unknown view 'prodeje_v' sql>drop view drmaxtst.prodeje_v; DROP VIEW: unknown view 'prodeje_v' sql>\dv VIEW drmaxtst.all_constraints VIEW drmaxtst.all_tab_columns VIEW drmaxtst.mmtest_v VIEW drmaxtst.pohyby_prodeje_v VIEW drmaxtst.prijmy_2012_v_mr_tmp VIEW drmaxtst.prijmy_v VIEW drmaxtst.prodeje_2011_v VIEW drmaxtst.prodeje_2012_v VIEW drmaxtst.prodeje_2012_v_mr_tmp VIEW drmaxtst.prodeje_2013_v VIEW drmaxtst.prodeje_2014_v VIEW drmaxtst.prodeje_v VIEW drmaxtst.stav_skladu_historie sql>
I guess my only option is to dump a reload the database. :(
Radovan
users-list mailing list users-list@monetdb.org https://www.monetdb.org/mailman/listinfo/users-list
-- Niels Nes, Centrum Wiskunde & Informatica (CWI) Science Park 123, 1098 XG Amsterdam, The Netherlands room L3.14, phone ++31 20 592-4098 sip:4098@sip.cwi.nl url: http://www.cwi.nl/~niels e-mail: Niels.Nes@cwi.nl
Hi Niels, There are 3 views that have multiple definition in the data dictionary. For example: select * from sys.tables where name='stav_skladu_historie' returns 11 rows like this: id name schema_id query type system commit_action readonly temporary 16884 stav_skladu_historie 5899 create view stav_skladu_historie as select * from stav_skladu_historie_2011 union all select * from stav_skladu_historie_2012 union all select * from stav_skladu_historie_2013_01 union all select * from stav_skladu_historie_2013_02 union all select * from stav_skladu_historie_2013_03 union all select * from stav_skladu_historie_2013_04 union all select * from stav_skladu_historie_2013_05 union all select * from stav_skladu_historie_2013_06 union all select * from stav_skladu_historie_2013_07 union all select * from stav_skladu_historie_2013_08 union all select * from stav_skladu_historie_2013_09 union all select * from stav_skladu_historie_2013_10 union all select * from stav_skladu_historie_2013_11 union all select * from stav_skladu_historie_2013_12 union all select * from stav_skladu_historie_2014_01 union all select * from stav_skladu_historie_2014_02 union all select * from stav_skladu_historie_2014_03 union all select * from stav_skladu_historie_2014_04 union all select * from stav_skladu_historie_2014_05 union all select * from stav_skladu_historie_2014_06 union all select * from stav_skladu_historie_2014_07; 1 false 0 false 0 17461 stav_skladu_historie 5899 create view stav_skladu_historie as select * from stav_skladu_historie_2011 union all select * from stav_skladu_historie_2012 union all select * from stav_skladu_historie_2013_01 union all select * from stav_skladu_historie_2013_02 union all select * from stav_skladu_historie_2013_03 union all select * from stav_skladu_historie_2013_04 union all select * from stav_skladu_historie_2013_05 union all select * from stav_skladu_historie_2013_06 union all select * from stav_skladu_historie_2013_07 union all select * from stav_skladu_historie_2013_08 union all select * from stav_skladu_historie_2013_09 union all select * from stav_skladu_historie_2013_10 union all select * from stav_skladu_historie_2013_11 union all select * from stav_skladu_historie_2013_12 union all select * from stav_skladu_historie_2014_01 union all select * from stav_skladu_historie_2014_02 union all select * from stav_skladu_historie_2014_03 union all select * from stav_skladu_historie_2014_04 union all select * from stav_skladu_historie_2014_05 union all select * from stav_skladu_historie_2014_06 union all select * from stav_skladu_historie_2014_07; 1 false 0 false 0 17691 stav_skladu_historie 5899 create view stav_skladu_historie as select * from stav_skladu_historie_2011 union all select * from stav_skladu_historie_2012 union all select * from stav_skladu_historie_2013_01 union all select * from stav_skladu_historie_2013_02 union all select * from stav_skladu_historie_2013_03 union all select * from stav_skladu_historie_2013_04 union all select * from stav_skladu_historie_2013_05 union all select * from stav_skladu_historie_2013_06 union all select * from stav_skladu_historie_2013_07 union all select * from stav_skladu_historie_2013_08 union all select * from stav_skladu_historie_2013_09 union all select * from stav_skladu_historie_2013_10 union all select * from stav_skladu_historie_2013_11 union all select * from stav_skladu_historie_2013_12 union all select * from stav_skladu_historie_2014_01 union all select * from stav_skladu_historie_2014_02 union all select * from stav_skladu_historie_2014_03 union all select * from stav_skladu_historie_2014_04 union all select * from stav_skladu_historie_2014_05 union all select * from stav_skladu_historie_2014_06 union all select * from stav_skladu_historie_2014_07; 1 false 0 false 0 17847 stav_skladu_historie 5899 create view stav_skladu_historie as select * from stav_skladu_historie_2011 union all select * from stav_skladu_historie_2012 union all select * from stav_skladu_historie_2013_01 union all select * from stav_skladu_historie_2013_02 union all select * from stav_skladu_historie_2013_03 union all select * from stav_skladu_historie_2013_04 union all select * from stav_skladu_historie_2013_05 union all select * from stav_skladu_historie_2013_06 union all select * from stav_skladu_historie_2013_07 union all select * from stav_skladu_historie_2013_08 union all select * from stav_skladu_historie_2013_09 union all select * from stav_skladu_historie_2013_10 union all select * from stav_skladu_historie_2013_11 union all select * from stav_skladu_historie_2013_12 union all select * from stav_skladu_historie_2014_01 union all select * from stav_skladu_historie_2014_02 union all select * from stav_skladu_historie_2014_03 union all select * from stav_skladu_historie_2014_04 union all select * from stav_skladu_historie_2014_05 union all select * from stav_skladu_historie_2014_06 union all select * from stav_skladu_historie_2014_07; 1 false 0 false 0 17951 stav_skladu_historie 5899 create view stav_skladu_historie as select * from stav_skladu_historie_2011 union all select * from stav_skladu_historie_2012 union all select * from stav_skladu_historie_2013_01 union all select * from stav_skladu_historie_2013_02 union all select * from stav_skladu_historie_2013_03 union all select * from stav_skladu_historie_2013_04 union all select * from stav_skladu_historie_2013_05 union all select * from stav_skladu_historie_2013_06 union all select * from stav_skladu_historie_2013_07 union all select * from stav_skladu_historie_2013_08 union all select * from stav_skladu_historie_2013_09 union all select * from stav_skladu_historie_2013_10 union all select * from stav_skladu_historie_2013_11 union all select * from stav_skladu_historie_2013_12 union all select * from stav_skladu_historie_2014_01 union all select * from stav_skladu_historie_2014_02 union all select * from stav_skladu_historie_2014_03 union all select * from stav_skladu_historie_2014_04 union all select * from stav_skladu_historie_2014_05 union all select * from stav_skladu_historie_2014_06 union all select * from stav_skladu_historie_2014_07; 1 false 0 false 0 18020 stav_skladu_historie 5899 create view stav_skladu_historie as select * from stav_skladu_historie_2011 union all select * from stav_skladu_historie_2012 union all select * from stav_skladu_historie_2013_01 union all select * from stav_skladu_historie_2013_02 union all select * from stav_skladu_historie_2013_03 union all select * from stav_skladu_historie_2013_04 union all select * from stav_skladu_historie_2013_05 union all select * from stav_skladu_historie_2013_06 union all select * from stav_skladu_historie_2013_07 union all select * from stav_skladu_historie_2013_08 union all select * from stav_skladu_historie_2013_09 union all select * from stav_skladu_historie_2013_10 union all select * from stav_skladu_historie_2013_11 union all select * from stav_skladu_historie_2013_12 union all select * from stav_skladu_historie_2014_01 union all select * from stav_skladu_historie_2014_02 union all select * from stav_skladu_historie_2014_03 union all select * from stav_skladu_historie_2014_04 union all select * from stav_skladu_historie_2014_05 union all select * from stav_skladu_historie_2014_06 union all select * from stav_skladu_historie_2014_07 union all select * from stav_skladu_historie_2014_08; 1 false 0 false 0 18115 stav_skladu_historie 5899 create view stav_skladu_historie as select * from stav_skladu_historie_2011 union all select * from stav_skladu_historie_2012 union all select * from stav_skladu_historie_2013_01 union all select * from stav_skladu_historie_2013_02 union all select * from stav_skladu_historie_2013_03 union all select * from stav_skladu_historie_2013_04 union all select * from stav_skladu_historie_2013_05 union all select * from stav_skladu_historie_2013_06 union all select * from stav_skladu_historie_2013_07 union all select * from stav_skladu_historie_2013_08 union all select * from stav_skladu_historie_2013_09 union all select * from stav_skladu_historie_2013_10 union all select * from stav_skladu_historie_2013_11 union all select * from stav_skladu_historie_2013_12 union all select * from stav_skladu_historie_2014_01 union all select * from stav_skladu_historie_2014_02 union all select * from stav_skladu_historie_2014_03 union all select * from stav_skladu_historie_2014_04 union all select * from stav_skladu_historie_2014_05 union all select * from stav_skladu_historie_2014_06 union all select * from stav_skladu_historie_2014_07; 1 false 0 false 0 18219 stav_skladu_historie 5899 create view stav_skladu_historie as select * from stav_skladu_historie_2011 union all select * from stav_skladu_historie_2012 union all select * from stav_skladu_historie_2013_01 union all select * from stav_skladu_historie_2013_02 union all select * from stav_skladu_historie_2013_03 union all select * from stav_skladu_historie_2013_04 union all select * from stav_skladu_historie_2013_05 union all select * from stav_skladu_historie_2013_06 union all select * from stav_skladu_historie_2013_07 union all select * from stav_skladu_historie_2013_08 union all select * from stav_skladu_historie_2013_09 union all select * from stav_skladu_historie_2013_10 union all select * from stav_skladu_historie_2013_11 union all select * from stav_skladu_historie_2013_12 union all select * from stav_skladu_historie_2014_01 union all select * from stav_skladu_historie_2014_02 union all select * from stav_skladu_historie_2014_03 union all select * from stav_skladu_historie_2014_04 union all select * from stav_skladu_historie_2014_05 union all select * from stav_skladu_historie_2014_06 union all select * from stav_skladu_historie_2014_07; 1 false 0 false 0 18373 stav_skladu_historie 5899 create view stav_skladu_historie as select * from stav_skladu_historie_2011 union all select * from stav_skladu_historie_2012 union all select * from stav_skladu_historie_2013_01 union all select * from stav_skladu_historie_2013_02 union all select * from stav_skladu_historie_2013_03 union all select * from stav_skladu_historie_2013_04 union all select * from stav_skladu_historie_2013_05 union all select * from stav_skladu_historie_2013_06 union all select * from stav_skladu_historie_2013_07 union all select * from stav_skladu_historie_2013_08 union all select * from stav_skladu_historie_2013_09 union all select * from stav_skladu_historie_2013_10 union all select * from stav_skladu_historie_2013_11 union all select * from stav_skladu_historie_2013_12 union all select * from stav_skladu_historie_2014_01 union all select * from stav_skladu_historie_2014_02 union all select * from stav_skladu_historie_2014_03 union all select * from stav_skladu_historie_2014_04 union all select * from stav_skladu_historie_2014_05 union all select * from stav_skladu_historie_2014_06 union all select * from stav_skladu_historie_2014_07; 1 false 0 false 0 18442 stav_skladu_historie 5899 create view stav_skladu_historie as select * from stav_skladu_historie_2011 union all select * from stav_skladu_historie_2012 union all select * from stav_skladu_historie_2013_01 union all select * from stav_skladu_historie_2013_02 union all select * from stav_skladu_historie_2013_03 union all select * from stav_skladu_historie_2013_04 union all select * from stav_skladu_historie_2013_05 union all select * from stav_skladu_historie_2013_06 union all select * from stav_skladu_historie_2013_07 union all select * from stav_skladu_historie_2013_08 union all select * from stav_skladu_historie_2013_09 union all select * from stav_skladu_historie_2013_10 union all select * from stav_skladu_historie_2013_11 union all select * from stav_skladu_historie_2013_12 union all select * from stav_skladu_historie_2014_01 union all select * from stav_skladu_historie_2014_02 union all select * from stav_skladu_historie_2014_03 union all select * from stav_skladu_historie_2014_04 union all select * from stav_skladu_historie_2014_05 union all select * from stav_skladu_historie_2014_06 union all select * from stav_skladu_historie_2014_07 union all select * from stav_skladu_historie_2014_08; 1 false 0 false 0 18537 stav_skladu_historie 5899 create view stav_skladu_historie as select * from stav_skladu_historie_2011 union all select * from stav_skladu_historie_2012 union all select * from stav_skladu_historie_2013_01 union all select * from stav_skladu_historie_2013_02 union all select * from stav_skladu_historie_2013_03 union all select * from stav_skladu_historie_2013_04 union all select * from stav_skladu_historie_2013_05 union all select * from stav_skladu_historie_2013_06 union all select * from stav_skladu_historie_2013_07 union all select * from stav_skladu_historie_2013_08 union all select * from stav_skladu_historie_2013_09 union all select * from stav_skladu_historie_2013_10 union all select * from stav_skladu_historie_2013_11 union all select * from stav_skladu_historie_2013_12 union all select * from stav_skladu_historie_2014_01 union all select * from stav_skladu_historie_2014_02 union all select * from stav_skladu_historie_2014_03 union all select * from stav_skladu_historie_2014_04 union all select * from stav_skladu_historie_2014_05 union all select * from stav_skladu_historie_2014_06 union all select * from stav_skladu_historie_2014_07 union all select * from stav_skladu_historie_2014_08; 1 false 0 false 0 Thank you, Radovan On 09/08/2014 08:46 AM, Niels Nes wrote:
On Mon, Sep 08, 2014 at 08:30:59AM +0200, Radovan Bičiště wrote:
Hello Niels, Thank for the tip. But the object drmaxtst.stav_skladu_historie is actually a view. There is no unique constraint on underlaying tables. Is there a way how to modify the data dictionary directly? Then the message must indicate the table name (view or not) isn't unique. Somehow old table definitions were left behind. This can be seen using select * from tables. If so we can remove them (as monetdb user). But first we need to find out which tables (and id's) weren't properly dropped.
Niels
Thank you, Radovan
On 09/07/2014 03:49 PM, Niels Nes wrote:
On Sun, Sep 07, 2014 at 01:39:19PM +0200, Radovan Bičiště wrote:
Hello, I tried to dump the database and received following error: table drmaxtst.stav_skladu_historie is not unique, corrupt catalog ? By dropping the unique constraint, you may be able to dump the db.
Niels
Any tips how to dump the database will be highly appreciated. Thank you, Radovan
On 09/05/2014 02:49 PM, Radovan Bičiště wrote:
Hello, I'm wondering if there is some hard core way to drop a view. Somehow I have three views that I'm not able to drop. I can issue drop statement several times and it returns success. Here is log from mclient: ceos@lux-drmax-ana:/u01/ceosdata/database/monetdb/drmax/crm$ mclient -d zkdev1 -u drmaxtst password: Welcome to mclient, the MonetDB/SQL interactive terminal (Jan2014-SP2) Database: MonetDB v11.17.17 (Jan2014-SP2), 'mapi:monetdb://lux-drmax-ana:50000/zkdev1' Type \q to quit, \? for a list of available commands auto commit mode: on sql>\dv VIEW drmaxtst.all_constraints VIEW drmaxtst.all_tab_columns VIEW drmaxtst.mmtest_v VIEW drmaxtst.pohyby_prodeje_v VIEW drmaxtst.prijmy_2012_v_mr_tmp VIEW drmaxtst.prijmy_v VIEW drmaxtst.prodeje_2011_v VIEW drmaxtst.prodeje_2012_v VIEW drmaxtst.prodeje_2012_v_mr_tmp VIEW drmaxtst.prodeje_2013_v VIEW drmaxtst.prodeje_2014_v VIEW drmaxtst.prodeje_v VIEW drmaxtst.stav_skladu_historie sql>drop view drmaxtst.prodeje_v; operation successful (3.168ms) sql>drop view drmaxtst.prodeje_v; operation successful (3.004ms) sql>drop view drmaxtst.prodeje_v; operation successful (7.501ms) sql>drop view drmaxtst.prodeje_v; operation successful (4.154ms) sql>drop view drmaxtst.prodeje_v; operation successful (2.351ms) sql>drop view drmaxtst.prodeje_v; operation successful (2.410ms) sql>drop view drmaxtst.prodeje_v; operation successful (2.355ms) sql>drop view drmaxtst.prodeje_v; operation successful (2.685ms) sql>drop view drmaxtst.prodeje_v; operation successful (2.646ms) sql>drop view drmaxtst.prodeje_v; operation successful (2.695ms) sql>drop view drmaxtst.prodeje_v; operation successful (2.390ms) sql>drop view drmaxtst.prodeje_v; operation successful (2.399ms) sql>drop view drmaxtst.prodeje_v; DROP VIEW: unknown view 'prodeje_v' sql>drop view drmaxtst.prodeje_v; DROP VIEW: unknown view 'prodeje_v' sql>\dv VIEW drmaxtst.all_constraints VIEW drmaxtst.all_tab_columns VIEW drmaxtst.mmtest_v VIEW drmaxtst.pohyby_prodeje_v VIEW drmaxtst.prijmy_2012_v_mr_tmp VIEW drmaxtst.prijmy_v VIEW drmaxtst.prodeje_2011_v VIEW drmaxtst.prodeje_2012_v VIEW drmaxtst.prodeje_2012_v_mr_tmp VIEW drmaxtst.prodeje_2013_v VIEW drmaxtst.prodeje_2014_v VIEW drmaxtst.prodeje_v VIEW drmaxtst.stav_skladu_historie sql>
I guess my only option is to dump a reload the database. :(
Radovan
users-list mailing list users-list@monetdb.org https://www.monetdb.org/mailman/listinfo/users-list
Hi Niels, There are 3 views that have multiple definition in the data dictionary. For example: select * from sys.tables where name='stav_skladu_historie'
On Mon, Sep 08, 2014 at 08:52:29AM +0200, Radovan Bičiště wrote: likely the last (highest id) is the one to keep. so a delete from _tables where id in (16884, ..); should do the trick. Niels ps first backup!
returns 11 rows like this: id name schema_id query type system commit_action readonly temporary 16884 stav_skladu_historie 5899 create view stav_skladu_historie as select * from stav_skladu_historie_2011 union all select * from stav_skladu_historie_2012 union all select * from stav_skladu_historie_2013_01 union all select * from stav_skladu_historie_2013_02 union all select * from stav_skladu_historie_2013_03 union all select * from stav_skladu_historie_2013_04 union all select * from stav_skladu_historie_2013_05 union all select * from stav_skladu_historie_2013_06 union all select * from stav_skladu_historie_2013_07 union all select * from stav_skladu_historie_2013_08 union all select * from stav_skladu_historie_2013_09 union all select * from stav_skladu_historie_2013_10 union all select * from stav_skladu_historie_2013_11 union all select * from stav_skladu_historie_2013_12 union all select * from stav_skladu_historie_2014_01 union all select * from stav_skladu_historie_2014_02 union all select * from stav_skladu_historie_2014_03 union all select * from stav_skladu_historie_2014_04 union all select * from stav_skladu_historie_2014_05 union all select * from stav_skladu_historie_2014_06 union all select * from stav_skladu_historie_2014_07; 1 false 0 false 0 17461 stav_skladu_historie 5899 create view stav_skladu_historie as select * from stav_skladu_historie_2011 union all select * from stav_skladu_historie_2012 union all select * from stav_skladu_historie_2013_01 union all select * from stav_skladu_historie_2013_02 union all select * from stav_skladu_historie_2013_03 union all select * from stav_skladu_historie_2013_04 union all select * from stav_skladu_historie_2013_05 union all select * from stav_skladu_historie_2013_06 union all select * from stav_skladu_historie_2013_07 union all select * from stav_skladu_historie_2013_08 union all select * from stav_skladu_historie_2013_09 union all select * from stav_skladu_historie_2013_10 union all select * from stav_skladu_historie_2013_11 union all select * from stav_skladu_historie_2013_12 union all select * from stav_skladu_historie_2014_01 union all select * from stav_skladu_historie_2014_02 union all select * from stav_skladu_historie_2014_03 union all select * from stav_skladu_historie_2014_04 union all select * from stav_skladu_historie_2014_05 union all select * from stav_skladu_historie_2014_06 union all select * from stav_skladu_historie_2014_07; 1 false 0 false 0 17691 stav_skladu_historie 5899 create view stav_skladu_historie as select * from stav_skladu_historie_2011 union all select * from stav_skladu_historie_2012 union all select * from stav_skladu_historie_2013_01 union all select * from stav_skladu_historie_2013_02 union all select * from stav_skladu_historie_2013_03 union all select * from stav_skladu_historie_2013_04 union all select * from stav_skladu_historie_2013_05 union all select * from stav_skladu_historie_2013_06 union all select * from stav_skladu_historie_2013_07 union all select * from stav_skladu_historie_2013_08 union all select * from stav_skladu_historie_2013_09 union all select * from stav_skladu_historie_2013_10 union all select * from stav_skladu_historie_2013_11 union all select * from stav_skladu_historie_2013_12 union all select * from stav_skladu_historie_2014_01 union all select * from stav_skladu_historie_2014_02 union all select * from stav_skladu_historie_2014_03 union all select * from stav_skladu_historie_2014_04 union all select * from stav_skladu_historie_2014_05 union all select * from stav_skladu_historie_2014_06 union all select * from stav_skladu_historie_2014_07; 1 false 0 false 0 17847 stav_skladu_historie 5899 create view stav_skladu_historie as select * from stav_skladu_historie_2011 union all select * from stav_skladu_historie_2012 union all select * from stav_skladu_historie_2013_01 union all select * from stav_skladu_historie_2013_02 union all select * from stav_skladu_historie_2013_03 union all select * from stav_skladu_historie_2013_04 union all select * from stav_skladu_historie_2013_05 union all select * from stav_skladu_historie_2013_06 union all select * from stav_skladu_historie_2013_07 union all select * from stav_skladu_historie_2013_08 union all select * from stav_skladu_historie_2013_09 union all select * from stav_skladu_historie_2013_10 union all select * from stav_skladu_historie_2013_11 union all select * from stav_skladu_historie_2013_12 union all select * from stav_skladu_historie_2014_01 union all select * from stav_skladu_historie_2014_02 union all select * from stav_skladu_historie_2014_03 union all select * from stav_skladu_historie_2014_04 union all select * from stav_skladu_historie_2014_05 union all select * from stav_skladu_historie_2014_06 union all select * from stav_skladu_historie_2014_07; 1 false 0 false 0 17951 stav_skladu_historie 5899 create view stav_skladu_historie as select * from stav_skladu_historie_2011 union all select * from stav_skladu_historie_2012 union all select * from stav_skladu_historie_2013_01 union all select * from stav_skladu_historie_2013_02 union all select * from stav_skladu_historie_2013_03 union all select * from stav_skladu_historie_2013_04 union all select * from stav_skladu_historie_2013_05 union all select * from stav_skladu_historie_2013_06 union all select * from stav_skladu_historie_2013_07 union all select * from stav_skladu_historie_2013_08 union all select * from stav_skladu_historie_2013_09 union all select * from stav_skladu_historie_2013_10 union all select * from stav_skladu_historie_2013_11 union all select * from stav_skladu_historie_2013_12 union all select * from stav_skladu_historie_2014_01 union all select * from stav_skladu_historie_2014_02 union all select * from stav_skladu_historie_2014_03 union all select * from stav_skladu_historie_2014_04 union all select * from stav_skladu_historie_2014_05 union all select * from stav_skladu_historie_2014_06 union all select * from stav_skladu_historie_2014_07; 1 false 0 false 0 18020 stav_skladu_historie 5899 create view stav_skladu_historie as select * from stav_skladu_historie_2011 union all select * from stav_skladu_historie_2012 union all select * from stav_skladu_historie_2013_01 union all select * from stav_skladu_historie_2013_02 union all select * from stav_skladu_historie_2013_03 union all select * from stav_skladu_historie_2013_04 union all select * from stav_skladu_historie_2013_05 union all select * from stav_skladu_historie_2013_06 union all select * from stav_skladu_historie_2013_07 union all select * from stav_skladu_historie_2013_08 union all select * from stav_skladu_historie_2013_09 union all select * from stav_skladu_historie_2013_10 union all select * from stav_skladu_historie_2013_11 union all select * from stav_skladu_historie_2013_12 union all select * from stav_skladu_historie_2014_01 union all select * from stav_skladu_historie_2014_02 union all select * from stav_skladu_historie_2014_03 union all select * from stav_skladu_historie_2014_04 union all select * from stav_skladu_historie_2014_05 union all select * from stav_skladu_historie_2014_06 union all select * from stav_skladu_historie_2014_07 union all select * from stav_skladu_historie_2014_08; 1 false 0 false 0 18115 stav_skladu_historie 5899 create view stav_skladu_historie as select * from stav_skladu_historie_2011 union all select * from stav_skladu_historie_2012 union all select * from stav_skladu_historie_2013_01 union all select * from stav_skladu_historie_2013_02 union all select * from stav_skladu_historie_2013_03 union all select * from stav_skladu_historie_2013_04 union all select * from stav_skladu_historie_2013_05 union all select * from stav_skladu_historie_2013_06 union all select * from stav_skladu_historie_2013_07 union all select * from stav_skladu_historie_2013_08 union all select * from stav_skladu_historie_2013_09 union all select * from stav_skladu_historie_2013_10 union all select * from stav_skladu_historie_2013_11 union all select * from stav_skladu_historie_2013_12 union all select * from stav_skladu_historie_2014_01 union all select * from stav_skladu_historie_2014_02 union all select * from stav_skladu_historie_2014_03 union all select * from stav_skladu_historie_2014_04 union all select * from stav_skladu_historie_2014_05 union all select * from stav_skladu_historie_2014_06 union all select * from stav_skladu_historie_2014_07; 1 false 0 false 0 18219 stav_skladu_historie 5899 create view stav_skladu_historie as select * from stav_skladu_historie_2011 union all select * from stav_skladu_historie_2012 union all select * from stav_skladu_historie_2013_01 union all select * from stav_skladu_historie_2013_02 union all select * from stav_skladu_historie_2013_03 union all select * from stav_skladu_historie_2013_04 union all select * from stav_skladu_historie_2013_05 union all select * from stav_skladu_historie_2013_06 union all select * from stav_skladu_historie_2013_07 union all select * from stav_skladu_historie_2013_08 union all select * from stav_skladu_historie_2013_09 union all select * from stav_skladu_historie_2013_10 union all select * from stav_skladu_historie_2013_11 union all select * from stav_skladu_historie_2013_12 union all select * from stav_skladu_historie_2014_01 union all select * from stav_skladu_historie_2014_02 union all select * from stav_skladu_historie_2014_03 union all select * from stav_skladu_historie_2014_04 union all select * from stav_skladu_historie_2014_05 union all select * from stav_skladu_historie_2014_06 union all select * from stav_skladu_historie_2014_07; 1 false 0 false 0 18373 stav_skladu_historie 5899 create view stav_skladu_historie as select * from stav_skladu_historie_2011 union all select * from stav_skladu_historie_2012 union all select * from stav_skladu_historie_2013_01 union all select * from stav_skladu_historie_2013_02 union all select * from stav_skladu_historie_2013_03 union all select * from stav_skladu_historie_2013_04 union all select * from stav_skladu_historie_2013_05 union all select * from stav_skladu_historie_2013_06 union all select * from stav_skladu_historie_2013_07 union all select * from stav_skladu_historie_2013_08 union all select * from stav_skladu_historie_2013_09 union all select * from stav_skladu_historie_2013_10 union all select * from stav_skladu_historie_2013_11 union all select * from stav_skladu_historie_2013_12 union all select * from stav_skladu_historie_2014_01 union all select * from stav_skladu_historie_2014_02 union all select * from stav_skladu_historie_2014_03 union all select * from stav_skladu_historie_2014_04 union all select * from stav_skladu_historie_2014_05 union all select * from stav_skladu_historie_2014_06 union all select * from stav_skladu_historie_2014_07; 1 false 0 false 0 18442 stav_skladu_historie 5899 create view stav_skladu_historie as select * from stav_skladu_historie_2011 union all select * from stav_skladu_historie_2012 union all select * from stav_skladu_historie_2013_01 union all select * from stav_skladu_historie_2013_02 union all select * from stav_skladu_historie_2013_03 union all select * from stav_skladu_historie_2013_04 union all select * from stav_skladu_historie_2013_05 union all select * from stav_skladu_historie_2013_06 union all select * from stav_skladu_historie_2013_07 union all select * from stav_skladu_historie_2013_08 union all select * from stav_skladu_historie_2013_09 union all select * from stav_skladu_historie_2013_10 union all select * from stav_skladu_historie_2013_11 union all select * from stav_skladu_historie_2013_12 union all select * from stav_skladu_historie_2014_01 union all select * from stav_skladu_historie_2014_02 union all select * from stav_skladu_historie_2014_03 union all select * from stav_skladu_historie_2014_04 union all select * from stav_skladu_historie_2014_05 union all select * from stav_skladu_historie_2014_06 union all select * from stav_skladu_historie_2014_07 union all select * from stav_skladu_historie_2014_08; 1 false 0 false 0 18537 stav_skladu_historie 5899 create view stav_skladu_historie as select * from stav_skladu_historie_2011 union all select * from stav_skladu_historie_2012 union all select * from stav_skladu_historie_2013_01 union all select * from stav_skladu_historie_2013_02 union all select * from stav_skladu_historie_2013_03 union all select * from stav_skladu_historie_2013_04 union all select * from stav_skladu_historie_2013_05 union all select * from stav_skladu_historie_2013_06 union all select * from stav_skladu_historie_2013_07 union all select * from stav_skladu_historie_2013_08 union all select * from stav_skladu_historie_2013_09 union all select * from stav_skladu_historie_2013_10 union all select * from stav_skladu_historie_2013_11 union all select * from stav_skladu_historie_2013_12 union all select * from stav_skladu_historie_2014_01 union all select * from stav_skladu_historie_2014_02 union all select * from stav_skladu_historie_2014_03 union all select * from stav_skladu_historie_2014_04 union all select * from stav_skladu_historie_2014_05 union all select * from stav_skladu_historie_2014_06 union all select * from stav_skladu_historie_2014_07 union all select * from stav_skladu_historie_2014_08; 1 false 0 false 0
Thank you, Radovan
On 09/08/2014 08:46 AM, Niels Nes wrote:
On Mon, Sep 08, 2014 at 08:30:59AM +0200, Radovan Bičiště wrote:
Hello Niels, Thank for the tip. But the object drmaxtst.stav_skladu_historie is actually a view. There is no unique constraint on underlaying tables. Is there a way how to modify the data dictionary directly? Then the message must indicate the table name (view or not) isn't unique. Somehow old table definitions were left behind. This can be seen using select * from tables. If so we can remove them (as monetdb user). But first we need to find out which tables (and id's) weren't properly dropped.
Niels
Thank you, Radovan
On 09/07/2014 03:49 PM, Niels Nes wrote:
On Sun, Sep 07, 2014 at 01:39:19PM +0200, Radovan Bičiště wrote:
Hello, I tried to dump the database and received following error: table drmaxtst.stav_skladu_historie is not unique, corrupt catalog ? By dropping the unique constraint, you may be able to dump the db.
Niels
Any tips how to dump the database will be highly appreciated. Thank you, Radovan
On 09/05/2014 02:49 PM, Radovan Bičiště wrote:
Hello, I'm wondering if there is some hard core way to drop a view. Somehow I have three views that I'm not able to drop. I can issue drop statement several times and it returns success. Here is log from mclient: ceos@lux-drmax-ana:/u01/ceosdata/database/monetdb/drmax/crm$ mclient -d zkdev1 -u drmaxtst password: Welcome to mclient, the MonetDB/SQL interactive terminal (Jan2014-SP2) Database: MonetDB v11.17.17 (Jan2014-SP2), 'mapi:monetdb://lux-drmax-ana:50000/zkdev1' Type \q to quit, \? for a list of available commands auto commit mode: on sql>\dv VIEW drmaxtst.all_constraints VIEW drmaxtst.all_tab_columns VIEW drmaxtst.mmtest_v VIEW drmaxtst.pohyby_prodeje_v VIEW drmaxtst.prijmy_2012_v_mr_tmp VIEW drmaxtst.prijmy_v VIEW drmaxtst.prodeje_2011_v VIEW drmaxtst.prodeje_2012_v VIEW drmaxtst.prodeje_2012_v_mr_tmp VIEW drmaxtst.prodeje_2013_v VIEW drmaxtst.prodeje_2014_v VIEW drmaxtst.prodeje_v VIEW drmaxtst.stav_skladu_historie sql>drop view drmaxtst.prodeje_v; operation successful (3.168ms) sql>drop view drmaxtst.prodeje_v; operation successful (3.004ms) sql>drop view drmaxtst.prodeje_v; operation successful (7.501ms) sql>drop view drmaxtst.prodeje_v; operation successful (4.154ms) sql>drop view drmaxtst.prodeje_v; operation successful (2.351ms) sql>drop view drmaxtst.prodeje_v; operation successful (2.410ms) sql>drop view drmaxtst.prodeje_v; operation successful (2.355ms) sql>drop view drmaxtst.prodeje_v; operation successful (2.685ms) sql>drop view drmaxtst.prodeje_v; operation successful (2.646ms) sql>drop view drmaxtst.prodeje_v; operation successful (2.695ms) sql>drop view drmaxtst.prodeje_v; operation successful (2.390ms) sql>drop view drmaxtst.prodeje_v; operation successful (2.399ms) sql>drop view drmaxtst.prodeje_v; DROP VIEW: unknown view 'prodeje_v' sql>drop view drmaxtst.prodeje_v; DROP VIEW: unknown view 'prodeje_v' sql>\dv VIEW drmaxtst.all_constraints VIEW drmaxtst.all_tab_columns VIEW drmaxtst.mmtest_v VIEW drmaxtst.pohyby_prodeje_v VIEW drmaxtst.prijmy_2012_v_mr_tmp VIEW drmaxtst.prijmy_v VIEW drmaxtst.prodeje_2011_v VIEW drmaxtst.prodeje_2012_v VIEW drmaxtst.prodeje_2012_v_mr_tmp VIEW drmaxtst.prodeje_2013_v VIEW drmaxtst.prodeje_2014_v VIEW drmaxtst.prodeje_v VIEW drmaxtst.stav_skladu_historie sql>
I guess my only option is to dump a reload the database. :(
Radovan
users-list mailing list users-list@monetdb.org https://www.monetdb.org/mailman/listinfo/users-list
users-list mailing list users-list@monetdb.org https://www.monetdb.org/mailman/listinfo/users-list
-- Niels Nes, Centrum Wiskunde & Informatica (CWI) Science Park 123, 1098 XG Amsterdam, The Netherlands room L3.14, phone ++31 20 592-4098 sip:4098@sip.cwi.nl url: http://www.cwi.nl/~niels e-mail: Niels.Nes@cwi.nl
Thank you Niels, Delete seems to work. Radovan On 09/08/2014 09:04 AM, Niels Nes wrote:
Hi Niels, There are 3 views that have multiple definition in the data dictionary. For example: select * from sys.tables where name='stav_skladu_historie'
On Mon, Sep 08, 2014 at 08:52:29AM +0200, Radovan Bičiště wrote: likely the last (highest id) is the one to keep. so a delete from _tables where id in (16884, ..); should do the trick.
Niels ps first backup!
Addition of constraints and views over a database creates a Directed Acyclic Graph of dependencies. This information is stored in the dependencies table in the catalog. Removing an element should not break this, which calls for reverse execution of the statements that created them. Direct update of catalogue tables is prone to be erroneous and not allowed. Why the system does not report an error is unclear. Martin On 08/09/14 08:30, Radovan Bičiště wrote:
Hello Niels, Thank for the tip. But the object drmaxtst.stav_skladu_historie is actually a view. There is no unique constraint on underlaying tables. Is there a way how to modify the data dictionary directly?
Thank you, Radovan
On 09/07/2014 03:49 PM, Niels Nes wrote:
On Sun, Sep 07, 2014 at 01:39:19PM +0200, Radovan Bičiště wrote:
Hello, I tried to dump the database and received following error: table drmaxtst.stav_skladu_historie is not unique, corrupt catalog ? By dropping the unique constraint, you may be able to dump the db.
Niels
Any tips how to dump the database will be highly appreciated. Thank you, Radovan
On 09/05/2014 02:49 PM, Radovan Bičiště wrote:
Hello, I'm wondering if there is some hard core way to drop a view. Somehow I have three views that I'm not able to drop. I can issue drop statement several times and it returns success. Here is log from mclient: ceos@lux-drmax-ana:/u01/ceosdata/database/monetdb/drmax/crm$ mclient -d zkdev1 -u drmaxtst password: Welcome to mclient, the MonetDB/SQL interactive terminal (Jan2014-SP2) Database: MonetDB v11.17.17 (Jan2014-SP2), 'mapi:monetdb://lux-drmax-ana:50000/zkdev1' Type \q to quit, \? for a list of available commands auto commit mode: on sql>\dv VIEW drmaxtst.all_constraints VIEW drmaxtst.all_tab_columns VIEW drmaxtst.mmtest_v VIEW drmaxtst.pohyby_prodeje_v VIEW drmaxtst.prijmy_2012_v_mr_tmp VIEW drmaxtst.prijmy_v VIEW drmaxtst.prodeje_2011_v VIEW drmaxtst.prodeje_2012_v VIEW drmaxtst.prodeje_2012_v_mr_tmp VIEW drmaxtst.prodeje_2013_v VIEW drmaxtst.prodeje_2014_v VIEW drmaxtst.prodeje_v VIEW drmaxtst.stav_skladu_historie sql>drop view drmaxtst.prodeje_v; operation successful (3.168ms) sql>drop view drmaxtst.prodeje_v; operation successful (3.004ms) sql>drop view drmaxtst.prodeje_v; operation successful (7.501ms) sql>drop view drmaxtst.prodeje_v; operation successful (4.154ms) sql>drop view drmaxtst.prodeje_v; operation successful (2.351ms) sql>drop view drmaxtst.prodeje_v; operation successful (2.410ms) sql>drop view drmaxtst.prodeje_v; operation successful (2.355ms) sql>drop view drmaxtst.prodeje_v; operation successful (2.685ms) sql>drop view drmaxtst.prodeje_v; operation successful (2.646ms) sql>drop view drmaxtst.prodeje_v; operation successful (2.695ms) sql>drop view drmaxtst.prodeje_v; operation successful (2.390ms) sql>drop view drmaxtst.prodeje_v; operation successful (2.399ms) sql>drop view drmaxtst.prodeje_v; DROP VIEW: unknown view 'prodeje_v' sql>drop view drmaxtst.prodeje_v; DROP VIEW: unknown view 'prodeje_v' sql>\dv VIEW drmaxtst.all_constraints VIEW drmaxtst.all_tab_columns VIEW drmaxtst.mmtest_v VIEW drmaxtst.pohyby_prodeje_v VIEW drmaxtst.prijmy_2012_v_mr_tmp VIEW drmaxtst.prijmy_v VIEW drmaxtst.prodeje_2011_v VIEW drmaxtst.prodeje_2012_v VIEW drmaxtst.prodeje_2012_v_mr_tmp VIEW drmaxtst.prodeje_2013_v VIEW drmaxtst.prodeje_2014_v VIEW drmaxtst.prodeje_v VIEW drmaxtst.stav_skladu_historie sql>
I guess my only option is to dump a reload the database. :(
Radovan
users-list mailing list users-list@monetdb.org https://www.monetdb.org/mailman/listinfo/users-list
On Mon, Sep 08, 2014 at 08:48:34AM +0200, Martin Kersten wrote:
Addition of constraints and views over a database creates a Directed Acyclic Graph of dependencies. This information is stored in the dependencies table in the catalog. Removing an element should not break this, which calls for reverse execution of the statements that created them.
Direct update of catalogue tables is prone to be erroneous and not allowed.
Why the system does not report an error is unclear. Martin Martin
I think Radovan want to 'dump/restore' his data. The idea is to have a 'clean' dump. After the restore the catalog should be correct again. Indeed directly manipulating the catalogue is bad (don't do it if you do not have a proper backup), but given the corrupt catalog seems the only way. Niels
On 08/09/14 08:30, Radovan Bičiště wrote:
Hello Niels, Thank for the tip. But the object drmaxtst.stav_skladu_historie is actually a view. There is no unique constraint on underlaying tables. Is there a way how to modify the data dictionary directly?
Thank you, Radovan
On 09/07/2014 03:49 PM, Niels Nes wrote:
On Sun, Sep 07, 2014 at 01:39:19PM +0200, Radovan Bičiště wrote:
Hello, I tried to dump the database and received following error: table drmaxtst.stav_skladu_historie is not unique, corrupt catalog ? By dropping the unique constraint, you may be able to dump the db.
Niels
Any tips how to dump the database will be highly appreciated. Thank you, Radovan
On 09/05/2014 02:49 PM, Radovan Bičiště wrote:
Hello, I'm wondering if there is some hard core way to drop a view. Somehow I have three views that I'm not able to drop. I can issue drop statement several times and it returns success. Here is log from mclient: ceos@lux-drmax-ana:/u01/ceosdata/database/monetdb/drmax/crm$ mclient -d zkdev1 -u drmaxtst password: Welcome to mclient, the MonetDB/SQL interactive terminal (Jan2014-SP2) Database: MonetDB v11.17.17 (Jan2014-SP2), 'mapi:monetdb://lux-drmax-ana:50000/zkdev1' Type \q to quit, \? for a list of available commands auto commit mode: on sql>\dv VIEW drmaxtst.all_constraints VIEW drmaxtst.all_tab_columns VIEW drmaxtst.mmtest_v VIEW drmaxtst.pohyby_prodeje_v VIEW drmaxtst.prijmy_2012_v_mr_tmp VIEW drmaxtst.prijmy_v VIEW drmaxtst.prodeje_2011_v VIEW drmaxtst.prodeje_2012_v VIEW drmaxtst.prodeje_2012_v_mr_tmp VIEW drmaxtst.prodeje_2013_v VIEW drmaxtst.prodeje_2014_v VIEW drmaxtst.prodeje_v VIEW drmaxtst.stav_skladu_historie sql>drop view drmaxtst.prodeje_v; operation successful (3.168ms) sql>drop view drmaxtst.prodeje_v; operation successful (3.004ms) sql>drop view drmaxtst.prodeje_v; operation successful (7.501ms) sql>drop view drmaxtst.prodeje_v; operation successful (4.154ms) sql>drop view drmaxtst.prodeje_v; operation successful (2.351ms) sql>drop view drmaxtst.prodeje_v; operation successful (2.410ms) sql>drop view drmaxtst.prodeje_v; operation successful (2.355ms) sql>drop view drmaxtst.prodeje_v; operation successful (2.685ms) sql>drop view drmaxtst.prodeje_v; operation successful (2.646ms) sql>drop view drmaxtst.prodeje_v; operation successful (2.695ms) sql>drop view drmaxtst.prodeje_v; operation successful (2.390ms) sql>drop view drmaxtst.prodeje_v; operation successful (2.399ms) sql>drop view drmaxtst.prodeje_v; DROP VIEW: unknown view 'prodeje_v' sql>drop view drmaxtst.prodeje_v; DROP VIEW: unknown view 'prodeje_v' sql>\dv VIEW drmaxtst.all_constraints VIEW drmaxtst.all_tab_columns VIEW drmaxtst.mmtest_v VIEW drmaxtst.pohyby_prodeje_v VIEW drmaxtst.prijmy_2012_v_mr_tmp VIEW drmaxtst.prijmy_v VIEW drmaxtst.prodeje_2011_v VIEW drmaxtst.prodeje_2012_v VIEW drmaxtst.prodeje_2012_v_mr_tmp VIEW drmaxtst.prodeje_2013_v VIEW drmaxtst.prodeje_2014_v VIEW drmaxtst.prodeje_v VIEW drmaxtst.stav_skladu_historie sql>
I guess my only option is to dump a reload the database. :(
Radovan
users-list mailing list users-list@monetdb.org https://www.monetdb.org/mailman/listinfo/users-list
_______________________________________________ users-list mailing list users-list@monetdb.org https://www.monetdb.org/mailman/listinfo/users-list
-- Niels Nes, Centrum Wiskunde & Informatica (CWI) Science Park 123, 1098 XG Amsterdam, The Netherlands room L3.14, phone ++31 20 592-4098 sip:4098@sip.cwi.nl url: http://www.cwi.nl/~niels e-mail: Niels.Nes@cwi.nl
Hello, i'm getting the following error when running my generated MAL code: MAPI = (monetdb) /tmp/.s.monetdb.50000 QUERY = sql.init(); mvc := sql.mvc(); (r_4:bat[:oid,:int]) := sql.bind(mvc,"sys","customer","c_custkey",0); f_1 := sql.resultSet(1,1,r_4); sql.rsColumn(f_1, "table1", "pos", "int",32,0,r_4); out1 := io.stdout(); sql.exportResult(out1, f_1); ERROR = !SyntaxException:parseError:Xclose 0 !SyntaxException:parseError: ^';' expected This happens after 100 tupels already got printed. To print the results that my generated MAL code computed I use the sql.resultSet function. I am always giving a qtype of 1 since I have not found documentation about what that is and my experiments with EXPLAIN have shown that 1 seems to be what is always used. I then use sql.rsColumn(f_1, "table1", "pos", "varchar",0,0,r_4);. For digits and scale I always use 0. For digits I have tried higher numbers and have found that it doesn't make any difference and I have not found documentation about what scale is and in all the experiments I did using EXPLAIN it was always set to 0. Setting digits to a higher number will not solve the problem :(. Can you please help me with this problem? How am I supposed to print out the results? I am using: 'MonetDB 5 server v11.17.13 "Jan2014-SP1" (64-bit, 64-bit oids)' 'mclient, the MonetDB interactive terminal (Jan2014-SP1)' Best regards steffen
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Xclose is something the client sends to the server to close a result set. The server keeps result sets so that the client can ask for results in batches. Once the client is done, it sends the Xclose command to tell the server that it can free the resources. If I remember right, this only works when the server is expecting SQL commands. On 06/10/14 14:21, steffen@stephensmiles.com wrote:
Hello,
i'm getting the following error when running my generated MAL code:
MAPI = (monetdb) /tmp/.s.monetdb.50000 QUERY = sql.init(); mvc := sql.mvc(); (r_4:bat[:oid,:int]) := sql.bind(mvc,"sys","customer","c_custkey",0); f_1 := sql.resultSet(1,1,r_4); sql.rsColumn(f_1, "table1", "pos", "int",32,0,r_4); out1 := io.stdout(); sql.exportResult(out1, f_1);
ERROR = !SyntaxException:parseError:Xclose 0 !SyntaxException:parseError: ^';' expected
This happens after 100 tupels already got printed.
To print the results that my generated MAL code computed I use the sql.resultSet function.
I am always giving a qtype of 1 since I have not found documentation about what that is and my experiments with EXPLAIN have shown that 1 seems to be what is always used.
I then use sql.rsColumn(f_1, "table1", "pos", "varchar",0,0,r_4);. For digits and scale I always use 0.
For digits I have tried higher numbers and have found that it doesn't make any difference and I have not found documentation about what scale is and in all the experiments I did using EXPLAIN it was always set to 0.
Setting digits to a higher number will not solve the problem :(.
Can you please help me with this problem? How am I supposed to print out the results?
I am using: 'MonetDB 5 server v11.17.13 "Jan2014-SP1" (64-bit, 64-bit oids)' 'mclient, the MonetDB interactive terminal (Jan2014-SP1)'
Best regards
steffen
_______________________________________________ users-list mailing list users-list@monetdb.org https://www.monetdb.org/mailman/listinfo/users-list
- -- Sjoerd Mullender -----BEGIN PGP SIGNATURE----- Version: GnuPG v1 iQCVAwUBVDKfBj7g04AjvIQpAQI1UAQAw2hMg0Eo6Oi0Tslfm6kMkJh94zqEUYJ8 z11g50LK7pdRwt+JqpkkrnwS5l4XPGfxI+szYnlbpeUo5ppLgOYEJqWaZwqXf5z5 yxLSExS2VQupkXXWO/zqRj1c1LSAUVocKKIVI0BltzqFfRR1/GCY2Bn2zuMYSStu j0i6DlFvul8= =icS9 -----END PGP SIGNATURE-----
participants (5)
-
Martin Kersten
-
Niels Nes
-
Radovan Bičiště
-
Sjoerd Mullender
-
steffen@stephensmiles.com