You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Describe the bug
When multiple tenants exist, Drop Tenant Results in an incorrect FHIRDATA.PARAMETER_NAMES association and drop.
2021-05-12 12:13:59.397 00000001 INFO com.ibm.fhir.schema.app.Main Dropping tablespace for tenant 2/test1d
2021-05-12 12:14:08.973 00000001 WARNING ls.pool.PoolConnectionProvider Rolling back transaction
2021-05-12 12:14:08.977 00000001 SEVERE com.ibm.fhir.schema.app.Main schema tool failed
com.ibm.db2.jcc.am.SqlException: DB2 SQL Error: SQLCODE=-282, SQLSTATE=55024, SQLERRMC=TS_TENANT2;FHIRDATA.PARAMETER_NAMES, DRIVER=4.28.11
com.ibm.fhir.database.utils.api.DataAccessException: com.ibm.db2.jcc.am.SqlException: DB2 SQL Error: SQLCODE=-282, SQLSTATE=55024, SQLERRMC=TS_TENANT2;FHIRDATA.PARAMETER_NAMES, DRIVER=4.28.11
at com.ibm.fhir.database.utils.db2.Db2Translator.translate(Db2Translator.java:115)
at com.ibm.fhir.database.utils.db2.Db2DropTablespace.run(Db2DropTablespace.java:46)
at com.ibm.fhir.database.utils.common.CommonDatabaseAdapter.runStatement(CommonDatabaseAdapter.java:459)
at com.ibm.fhir.database.utils.db2.Db2Adapter.runStatement(Db2Adapter.java:546)
at com.ibm.fhir.database.utils.db2.Db2Adapter.dropTablespace(Db2Adapter.java:430)
at com.ibm.fhir.database.utils.db2.Db2Adapter.dropTenantTablespace(Db2Adapter.java:580)
at com.ibm.fhir.database.utils.model.PhysicalDataModel.dropTenantTablespace(PhysicalDataModel.java:519)
at com.ibm.fhir.schema.app.Main.dropDetachedPartitionTables(Main.java:1152)
at com.ibm.fhir.schema.app.Main.dropTenant(Main.java:1106)
at com.ibm.fhir.schema.app.Main.process(Main.java:1803)
at com.ibm.fhir.schema.app.Main.main(Main.java:1860)
Caused by: com.ibm.db2.jcc.am.SqlException: DB2 SQL Error: SQLCODE=-282, SQLSTATE=55024, SQLERRMC=TS_TENANT2;FHIRDATA.PARAMETER_NAMES, DRIVER=4.28.11
at com.ibm.db2.jcc.am.b7.a(b7.java:815)
at com.ibm.db2.jcc.am.b7.a(b7.java:66)
at com.ibm.db2.jcc.am.b7.a(b7.java:140)
at com.ibm.db2.jcc.am.k6.c(k6.java:2825)
at com.ibm.db2.jcc.am.k6.d(k6.java:2809)
at com.ibm.db2.jcc.am.k6.b(k6.java:2169)
at com.ibm.db2.jcc.t4.ab.k(ab.java:444)
at com.ibm.db2.jcc.t4.ab.c(ab.java:102)
at com.ibm.db2.jcc.t4.p.b(p.java:38)
at com.ibm.db2.jcc.t4.av.h(av.java:124)
at com.ibm.db2.jcc.am.k6.ak(k6.java:2164)
at com.ibm.db2.jcc.am.k6.a(k6.java:3367)
at com.ibm.db2.jcc.am.k6.c(k6.java:789)
at com.ibm.db2.jcc.am.k6.executeUpdate(k6.java:768)
at com.ibm.fhir.database.utils.db2.Db2DropTablespace.run(Db2DropTablespace.java:41)
... 9 more
2021-05-12 12:14:08.979 00000001 SEVERE com.ibm.fhir.schema.app.Main SCHEMA CHANGE: RUNTIME ERROR
Environment
Which version of IBM FHIR Server? main
prb112
changed the title
Drop Tenant Results in an incorrect FHIRDATA.PARAMETER_NAMES association and drop.
When multiple tenants exist, Drop Tenant Results in an incorrect FHIRDATA.PARAMETER_NAMES association and drop.
May 12, 2021
Cleanly handle tablespace removal error (fix for When multiple tenants exist, Drop Tenant Results in an incorrect FHIRDATA.PARAMETER_NAMES association and drop. #2354 )
Describe the bug
When multiple tenants exist, Drop Tenant Results in an incorrect FHIRDATA.PARAMETER_NAMES association and drop.
Environment
Which version of IBM FHIR Server?
main
To Reproduce
Steps to reproduce the behavior:
mkdir -p db docker run -itd --name mydb2_1631 --rm --privileged=true -p 50000:50000 -e LICENSE=accept -e DB2INST1_PASSWORD=change-password -e DBNAME=fhirdb -v $(pwd)/db:/database ibmcom/db2:11.5.4.0
docker exec -it mydb2_1631 /bin/bash su - db2inst1 /opt/ibm/db2/V11.5/bin/db2 CREATE DB FHIRDB using codeset UTF-8 territory us PAGESIZE 32768
Optionally, you may need to drop the db
/opt/ibm/db2/V11.5/bin/db2 drop db fhirdb
.Build Main
mvn clean install -f fhir-parent -DskipTests
Create Schemas
java -jar ~/.m2/repository/com/ibm/fhir/fhir-persistence-schema/4.8.0-SNAPSHOT/fhir-persistence-schema-4.8.0-SNAPSHOT-cli.jar \ --prop db.host=localhost --prop db.port=50000 --prop db.database=fhirdb --prop user=db2inst1 --prop password=change-password \ --db-type db2 --schema-name test1 --create-schemas
java -jar ~/.m2/repository/com/ibm/fhir/fhir-persistence-schema/4.8.0-SNAPSHOT/fhir-persistence-schema-4.8.0-SNAPSHOT-cli.jar \ --prop db.host=localhost --prop db.port=50000 --prop db.database=fhirdb --prop user=db2inst1 --prop password=change-password \ --db-type db2 --update-schema
java -jar ~/.m2/repository/com/ibm/fhir/fhir-persistence-schema/4.8.0-SNAPSHOT/fhir-persistence-schema-4.8.0-SNAPSHOT-cli.jar \ --prop db.host=localhost --prop db.port=50000 --prop db.database=fhirdb --prop user=db2inst1 --prop password=change-password \ --db-type db2 --allocate-tenant test1c
java -jar ~/.m2/repository/com/ibm/fhir/fhir-persistence-schema/4.8.0-SNAPSHOT/fhir-persistence-schema-4.8.0-SNAPSHOT-cli.jar \ --prop db.host=localhost --prop db.port=50000 --prop db.database=fhirdb --prop user=db2inst1 --prop password=change-password \ --db-type db2 --allocate-tenant test1d
java -jar ~/.m2/repository/com/ibm/fhir/fhir-persistence-schema/4.8.0-SNAPSHOT/fhir-persistence-schema-4.8.0-SNAPSHOT-cli.jar \ --prop db.host=localhost --prop db.port=50000 --prop db.database=fhirdb --prop user=db2inst1 --prop password=change-password \ --db-type db2 --drop-tenant test1d
You'll end up with an issue on the drop of the table space.
Expected behavior
Should succeed the drop of the tablespace.
Additional context
n/a
The text was updated successfully, but these errors were encountered: