Start a new topic

6.0.5 - Oracle - tree not updating with new default schema and rights

[This topic is migrated from our old forums. The original author name has been removed]

I just upgraded from 5.1.1 to 6.0.5.  In 5.1.1 running the following lines followed by a refresh of the tree, the "( Default ) " flag would have changed to the correct schema and my rights granted by this new role would be accounted for.  (In this case I would be able to see views that I could not see before.

call dbms_session.set_role('ROLE_WITH_RIGHTS');
alter session set current_schema=SCHEMA_WITH_VIEWS;

Is there a setting somewhere to change or is this just a bug?
-Alan

[This reply is migrated from our old forums.]

Re: 6.0.5 - Oracle - tree not updating with new default schema and rights
Alan, Are you running these statements as a Connection Hook or in the SQL Commander? What you need to do is to enable [b]Physical Connection->Use a Single Shared Physical Database Connection[/b] in the Connection Properties. Regards Roger
[This reply is migrated from our old forums. The original author name has been removed]

Re: 6.0.5 - Oracle - tree not updating with new default schema and rights
I was doing it via SQL Commander.

So you definitely answered my question and made my life a lot easier!

Either using a Connection Hook or enabling that property will solve my issue. I like the new multi-treading so I won't be enabling that property...and now that I know about the hook, I will definitely be using that.

Thanks Roger!
[This reply is migrated from our old forums. The original author name has been removed]

Re: 6.0.5 - Oracle - tree not updating with new default schema and rights
It's not quite as good as I thought...

The connection hooks don't seem to fire for the connection the tree uses unless the Single Shared Option is checked.
[This reply is migrated from our old forums.]

Re: 6.0.5 - Oracle - tree not updating with new default schema and rights
Alan, Connection Hooks are run for all physical connections including the root connection (which is used by the objects tree). How do you see that it isn't executed for the object tree? Regards Roger
[This reply is migrated from our old forums. The original author name has been removed]

Re: 6.0.5 - Oracle - tree not updating with new default schema and rights
Ok, so I did a little more digging... Connect WITH the single connection option turned on and NO hooks. Go to SQL commander run: alter session set current_schema=SCHEMA_WITH_VIEWS; Go to the object tree and refresh. You will now see the default schema change. Connect WITH or WITHOUT the single connection option on, WITH the following connection hook: alter session set current_schema=SCHEMA_WITH_VIEWS; Go to the object tree and refresh. You will NOT see the default schema change. I was able to verify by selecting off sys.v_$session that the users schema did actually change...so the hook DID run...for some reason refresh after a hook vs. sql commander is different...
[This reply is migrated from our old forums.]

Re: 6.0.5 - Oracle - tree not updating with new default schema and rights
Alan, Thanks for your tests! There seem to be a problem that results in the "(Default)" marker not being moved when changing default schema with a connection hook. This will be fixed in the next version. Regards Roger
[This reply is migrated from our old forums.]

Re: 6.0.5 - Oracle - tree not updating with new default schema and rights
Alan, This is fixed in 6.0.7. http://www.minq.se/products/dbvis/download.html Best Regards Roger
[This reply is migrated from our old forums. The original author name has been removed]

Re: 6.0.5 - Oracle - tree not updating with new default schema and rights
Verified!  Fixed in 6.0.7.  Thanks!