Oracle Database user reconciliation

0 views
Skip to first unread message

Tzahi Sharoni

unread,
Sep 7, 2009, 8:08:59 AM9/7/09
to Velo
Hi All,

It is my pleasure to join this forum. In the last couple of days, I
started to play with Velo to understand how it functions. I had some
troubles but thanks to Asaf I manage to overcome the heavy start.

My focus is to create a resource is mapped looks to the Oracle Server
(database users and roles), and I got some implementation issuse. I am
working with Velo2 and not Velo1 therefore I guess some of the
documentations are not up-to-dated.

Anyhow. I created an Oracle server resource, and for a start I want to
reconcile all the database users from the "DBA_USERS" table.
a) Do I need to create attributes for the resource? Can I ignore them
for a start? in what use cases I should use them?
b) I used the groovy language for full user reconciliation (for that I
used "RESOURCE_IDENTITIES_RECONCILIATION_FULL"
The script I built was as followed:
****
def queryManager = cntx.get("accountsQueryManager");
String accountsQuery = "select username as username from dba_users";
queryManager.add(accountsQuery);
cntx.set("queryManager",accountsQueryManager);
****
the invocation method was "CREATION"

I save the script and click the "Execute full reconciliation" button -
I went to the tasks to execute it immediately.

As a result I got the following FATAL message: "Failed to perform the
operation, failure message: Could not list all identities, was
expecting one query only in 'queryManager', recieved '0'"

Any help here is highly appreciated...

Thanks,
Tzahi

Trouby

unread,
Sep 9, 2009, 7:27:01 AM9/9/09
to Velo
Hello,

I have fixed the wiki, it was mentioning an old variable name,
Please change the variable name from 'accountsQueryManager' to
'queryManager'

Change the phase to "PRE" from "CREATION",


CREATION phase is executed when the task is created, while PRE will be
invoked -before- the execution of the reconciliation, that will set
the query first,


You are working with Velo1, Velo2 is only in design phase now,



Asaf.

Tzahi Sharoni

unread,
Sep 9, 2009, 8:49:09 AM9/9/09
to asa...@gmail.com, Velo
I got success but I saw nothing.

I don't think it is related to the query (I used select username from dba_users) - I checked it.

do I need to play right with the attributes? I want to match the username from the query to the account name

Thanks,
Tzahi

Trouby

unread,
Sep 9, 2009, 8:53:10 AM9/9/09
to Velo
When defining the resource, you have to define its attributes
the names on the query should match the names in the resource
attributes you define,

best to do 'select X as Y' when Y is the attribute name that was
specified when defining the attributes, one of the attribute must be
indicated as an 'account ID',


If you want the attribute to be persisted (to be synchronized to Velo
repository) you can flag it as 'synced' and as 'persisted',




Thats it,

btw, Velo 1.5 will be shipped with Oracle controller, that you don't
have to write a single line of query,


Asaf.


On Sep 9, 3:49 pm, Tzahi Sharoni <tzahi.shar...@gmail.com> wrote:
> I got success but I saw nothing.
>
> I don't think it is related to the query (I used select username from
> dba_users) - I checked it.
>
> do I need to play right with the attributes? I want to match the username
> from the query to the account name
>
> Thanks,
> Tzahi
>
Reply all
Reply to author
Forward
0 new messages