And are you seeking to establish an APEX session from SQL*Plus to debug collections? I saw the link to Martin's blog post, which is a reason to consider this. But I was more interested in why *you* are seeking to do this.

I build stored packages to call from apex pages. I have my preferred tool (e.g. Toad) to build these packages; I feel comfortable with this tool for DDL and DML. In order to execute the packages I use SQL Workshop because it has an apex context. When I can set an apex context in Toad, I don't need to switch between tools to develop.

Thanks for letting me be nosy. That is very much an excellent reason for wanting to do this. And I applaud you for implementing the vast majority of your business logic in PL/SQL packages - it's a superior implementation.

That's enough if you don't need to retrieve the text of some messages via apex_lang.message as it is often required for multilingual Apex applications (or simply for application where you don't like to hardcode text message inside procedures), in that case you also need to set the application id as I did in my first reply, otherwise apex_lang.message won't return the message text.