Hi,
I've created a report which deletes a database "A" and then copies the database "B" as database "A". You can see below an extract of the code which proceed these operations:
// Initialization of serverAdmin component var serverAdmin = Context.getComponent("ServerAdmin"); //Deletion of database A var res = serverAdmin.deleteArisDatabase(db_A, null); if(!res){ //Impossible to delete => stop of script ... }else{ serverAdmin.copyArisDatabase(db_B, db_A, null); }
The problem is: when I run this script connected as a user without database administration privilege in UMC, the functions "deleteArisDatabase" and "copyArisDatabase" don't work.
I've tested the other serverAdmin's functions, and discovered that the "backupDatabasee" and "restoreDatabase" functions work with this user.
But I can't backup database "B" and restore it as database "A" without deleting the database "A" first.
I tried to upgrade the user privilege temporarily in the script unsuccessfully.
Note : the user who will use this script won't have the database administration privilege in UMC, but he has a huge need of being able to erase a database "A" with a copy of database "B".
I hope someone has a solution to by-pass these privilege limits.
Regards,