The following SQL statements are executed successfully:
SELECT count(*) FROM sys.users WHERE name = 'kxn_user'
DROP SCHEMA IF EXISTS kxn_schema CASCADE
CREATE USER kxn_user WITH UNENCRYPTED PASSWORD 'monetdb' NAME 'Dbseeder User' SCHEMA sys
CREATE SCHEMA kxn_schema AUTHORIZATION kxn_user
ALTER USER kxn_user SET SCHEMA kxn_schema
CREATE TABLE COUNTRY (
PK_COUNTRY_ID BIGINT NOT NULL
PRIMARY KEY,
COUNTRY_MAP BLOB,
CREATED TIMESTAMP NOT NULL,
ISO3166 VARCHAR(50),
MODIFIED TIMESTAMP,
NAME VARCHAR(100) NOT NULL
UNIQUE
)
The following SQL statement produces an error message:
DROP USER kxn_user
java.sql.SQLException: DROP USER: 'kxn_user' owns a schema
at nl.cwi.monetdb.jdbc.MonetConnection$ResponseList.executeQuery(Unknown Source)
at nl.cwi.monetdb.jdbc.MonetConnection$ResponseList.processQuery(Unknown Source)
at nl.cwi.monetdb.jdbc.MonetStatement.internalExecute(Unknown Source)
at nl.cwi.monetdb.jdbc.MonetStatement.execute(Unknown Source)
at ch.konnexions.db_seeder.jdbc.AbstractJdbcSeeder.dropUser(AbstractJdbcSeeder.java:814)
at ch.konnexions.db_seeder.jdbc.monetdb.MonetdbSeeder.setupDatabase(MonetdbSeeder.java:103)
at ch.konnexions.db_seeder.jdbc.AbstractJdbcSeeder.createData(AbstractJdbcSeeder.java:359)
at ch.konnexions.db_seeder.DatabaseSeeder.main(DatabaseSeeder.java:141)
Processing of the script was aborted, error code=1
How can I delete the user in this constellation without errors ?