Autocomplete question/enhancement request

JNG

Member
Hi,

I am new to PLSQL Developer, and I have a couple of questions as to how the auto complete works for tables/cols. It seems like it only looks at the user's schema you are logged in to find tables by default. Is it possible to have it look a user's default schema as opposed to the one with the same name?

For example, I have a dba user and a normal user. All the tables are under the dba user, but I log in under the normal user to do most of my work, thus auto complete requires me to prefix all of the tables with "dba_user." in order to be used, even though the user's default schema is the dba's.

It seems to me that the default precedence should be something like first the user's own schema, then their default schema if different, and lastly anything they have permissions to. Either that or some type of preference for what schema to search through for auto complete would be really great.

If I'm just being dense and the ability is already there, great, please enlighten me. Otherwise, do you think these are possible enhancements?

Thanks,
jng
 
Ah, good catch. Looks like I was mistaken about that. It seems as though the head dba over here has managed some sort of trick such that the user account is hitting all the dba tables without using synonyms. I'll see if I can convince him to share the secret and get back to you. They told me it was some sort of default schema, but didn't go into detail, damn liars :)

Thanks,
jng
 
OK, after speaking with the dba, I have found out how he does it. He uses a logon trigger to set the current_schema to the dba schema when the user logs on. Very cool overall, but not many IDE's support it very well.

trigger looks something like this:

create or replace trigger system.set_logon_schema after logon on database
begin
case when 'SAMPLE_USER' then execute immediate 'alter session set current_schema = SAMPLE_DBA';
end case;
end;
 
oops, that should be

create or replace trigger system.set_logon_schema after logon on database
begin
case user when 'SAMPLE_USER' then execute immediate 'alter session set current_schema = SAMPLE_DBA';
end case;
end;
 
Okay, thanks. We'll try to add support for this. I have added it to the list of enhancement requests.
 
Back
Top