Product: Aqua Data Studio
Version: 17.0.0-ga-34
1) Connect to DB2-LUW
2) Create schema
CREATE SCHEMA "Test_schema"
3) Right click on created schema "Test_schema" and select Query Analyzer option
4) QA window opens with selected schema
5) Go to Schema Browser tree node.
6) Right click on schema "Test_schema" and select Drop Schema option.
7) Schema dropped successfully.
8) Go to Query Analyzer window (step-04 QA window).
9) Click on Reconnect icon.
10) Reconnect window opens.
11) Click on yes button.
Actual result:
Selected schema is the first schema in the schema list.
Expected result:
It should select "DB2INST1" schema as default schema in schema drop-down.
This is not a data studio issue. All databases work slightly different and DB2 allows for a user to set current_schema to a schema that do not exist. If you drop the schema that your query analyzer is assigned to from a different connection and try to reconnect the query analyzer it should attempt to connect back to the non existing schema and DB2 allows for this. The schema drop down will not get a schema assigned, so the first schema will be selected. If the user issues a query on a table without qualifying the object name with the schema it will return a sql exception stating the <schema>.<object> does not exist and the user is responsible for changing to the correct schema he wishes to use. This is DB2 behavior... Users could request a "Current Schema" Label if they need, in order to show not just the schema list but the current schema set, but this would be more of an enhancement and it has never been requested.