Using JDBC driver to "CREATE USER" on Oracle DB
I'm new to this forum and I need your help . My problem is that i have to integrate the NetIQ product with a DB oracle on which i have to create new users and assign them grants. I ask you, for the creation user part, if it is possible to use just the "CREATE USER" statement or if the driver fails to interface with the Oracle engine and therefore i have to use "INSERT" on specific Oracle Tables.
Thanks in advance for your support
P.S. Sorry for my English
You can make the driver execute any SQL command you like: See https://www.netiq.com/documentation/identity-manager-47-drivers/jdbc/data/embed-sql-statements-in-xds-events-for-jdbc-driver.html
Every DB is pretty much different. Some DB's do actually have constructs called Users (for logging into the DB itself). Most applications 'make' their own users inside the tables for their database.
That is, ask your application owner, what a user should look like, and more specifically if they could provide an example SQL statement to make a user the way they want.
Then using Norberts link to the docs you can build a SQL statement to match and use IDM features to get the data needed inside the statement.
Or you could try and map the table to user class, and map the attributes to the rows if that would work.
We have Oracle DB version 12.1c. Talking to the DBA he told me that for the user creation the only statements he uses are CREATE USER, ALTER USER and GRANT without any INSERT. So, i hope that if the driver can use these statement without knowing the structure of the DB it will be a simple integration.
The out of the box version of the driver should work with that.
You don't write any SQL code in the driver at all if you don't want to.
But if it doesn't work, you can write SQL code as Norbert wrote about to enhance the functionality or to bypass something.
That was what I meant. In most cases standard actions are mapped straight through. The standard packages is good in this way for everyone who doesnt speak sql.
Sorry again, but i'm al bit confused. In the link posted by Norbert i see that in the statement type (methods-for-executing-sql-statements) is not present the CREATE USER / ALTER statement. I'm able to pass this statement in a query or what ?
"Generally, it is not possible to run a Data Definition Language (DDL) statement in a database trigger
because most databases do not allow mixed DML and DDL transactions. Although virtual triggers do
not overcome this transactional limitation, they do allow DDL statements to be executed as a side
effect of an XDS event."
P.S. I remind you that I don't know the DB schema.
Thanks in advice.
The code above the sql statement is necessary to complete the creation of the user and activate the trigger? Or i can simple use:
<jdbc:statement> <jdbc:sql>CREATE USER jdoe IDENTIFIED BY novell></jdbc:sql> </jdbc:statement>