I am trying to write a powershell script to help with some user maintenance tasks in multiple databases.
- Database 1 contains my user ID and user type (for example: employee, subcontractor, etc.).
- Database 2 contains a db with many PL / SQL packages and procedures that I can follow to update the information in this db.
Here, essentially, is what I'm trying to execute in pseudo-code, but I don't 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
}
source
share