Toad World® Forums

Setting Role automatically at Login

Is there a way to "exec accountmgr.set_role" automatically when making a new connection for a specific instance?

For a specific instance I have to set this role every time I login. Not other instances.


Take a look in Options -> Oracle -> Roles and Editions

Not sure how Oracle->Roles and Editions works. The DBA had me execute "accountmgr.set_role@dblink" every time I login to a specific DB instance. Once I do that I can see all the objects and select tables to view indexes, etc.. I just wanted to avoid remembering to execute the role setting command. Thanks.

My mistake, I thought you wanted to execute a SET ROLE command. In Roles and Editions, Toad will automatically execute SET ROLE commands when you log in. You can tell it which roles and for which databases to do that.

If you just want to execute that proc when you make a connection, then you can put the command in a script and specify the file name here:

do it like this in your script: