I'm trying to write a powershell script to help with some user maintenance tasks across multiple databases.
- Database 1 contains my user ID and user type (ex: employee, subcontractor, etc...)
- Database 2 contains a db with many PL/SQL packages and procedures I can execute to update information in this db.
Here essentially what I am trying to accomplish in pseudo-code but I do not have much experience with PL/SQL packages and procedures especially from powershell.
Is it possible to execute the wwsec_api.set_defaultgroup procedure from powershell?
SELECT userID FROM Database2.users
while (userID){
SELECT employeeType FROM Database1.users WHERE Database2.users.userID = Database1.users.userID
If employeeType = 'Employee' then
run Database2 PL/SQL package procedure wwsec_api.set_defaultgroup(ID, USER)
end if
}