[fdo-users] KingOra Cannot Find Primary Key with Some Database Roles

Jonio, Dennis (Aviation) DJonio at miami-airport.com
Wed Feb 24 11:13:26 EST 2010


Crispin,
Maybe this will help.
I think I had to do the following logon script. In this case the user
profile name is "MIAR" and has access via roles only. The schema owner
in this case is " THE_SCHEMA_OWNER". Seems to work just fine for
"SELECT". I have not tried update or delete but I see no reason why it
would not if the role gives the proper permission/access. By the way, I
just set the identifier to make it easier to watch the sessions.

create or replace
TRIGGER LOGON_TRIG_MIAR
AFTER LOGON
ON MIAR.schema
DECLARE
 sqlstr VARCHAR2(200) := 'alter session set current_schema =
THE_SCHEMA_OWNER';
 v_user_identifier varchar2(64);
BEGIN
  IF (USER = 'MIAR') THEN
    execute immediate sqlstr;
    SELECT 'MIAR:'|| SYS_CONTEXT('USERENV', 'IP_ADDRESS')  INTO
v_user_identifier  FROM dual;
    dbms_session.set_identifier(v_user_identifier);
  END IF;
END;

r,
Dennis



-----Original Message-----
From: fdo-users-bounces at lists.osgeo.org
[mailto:fdo-users-bounces at lists.osgeo.org] On Behalf Of
Crispin_at_1Spatial
Sent: Wednesday, February 24, 2010 8:06 AM
To: fdo-users at lists.osgeo.org
Subject: [fdo-users] KingOra Cannot Find Primary Key with Some Database
Roles


Hi,

Where a KingOra connection is made to a user that has no ownership of
data
but is instead allocated access via roles and groups (not views) the
code
that finds the PKey - GetTablePkeyColumns() - passes in the "Owner" for
an
optimised query against USER_CONSTRAINTS.

Maybe it's my misunderstanding of the "Owner" -- if this the user logged
onto the DB with the connection properties then this is wrong?  There is
an
entry against the ALL_CONSTRAINTS but that's a slow query.

Maybe I am creating my connection parameters wrong?

Thought I'd post here before submitting a ticket on this...

 Crispin

-- 
View this message in context:
http://n2.nabble.com/KingOra-Cannot-Find-Primary-Key-with-Some-Database-
Roles-tp4625565p4625565.html
Sent from the FDO Users mailing list archive at Nabble.com.
_______________________________________________
fdo-users mailing list
fdo-users at lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/fdo-users


Scan by McAfee


More information about the fdo-users mailing list