Toad World® Forums

Bulk edit table properties


#1

Is there some way to bulk-edit properties for multiple tables at once? For instance, I’d like to grant select on all tables in my schema to a certain user group.


#2

Hello,

Sorry for so late reply.
Please find attached a script that will do what you need.
User name should be defined on line:
User = GetUser(Model, “User1”);

User right should be defined on line:
AddUserRight(Model, Entity, User, ‘SELECT’, ‘Grant’);
… in this case Grant SELECT.

Run the script in Scripting Window (Tools menu, Expert Mode must be on). To enable Expert Mode, select Settings | Options | General | select the Expert Mode checkbox.)

Note: var Model = app.Models.GetObject(0);
//… parameter in GetObject determines with which model the script should work.
//0 = first model listed in the Application View, 1 = second model listed in the Application View etc.

If you have any questions, please write us back. Thanks.

Regards,

Vladka + TDM Team
AddGrantToAllTables.js (2.13 KB)