Forum Stats

  • 3,852,821 Users
  • 2,264,140 Discussions
  • 7,905,152 Comments

Discussions

Delete or Modify Resource Template + Handler with code

Hello ORDS gurus,

I have a requirement to automate, as much as possible, the deployment of my ORDS config across a number of environments. To that end I would like to be able to modify or delete a template+handler pair with code rather than interactively with SQL Developer. I am using DEFINE_TEMPLATE and DEFINE_HANDLER to create. I am using ORDS 21.4. 

Looking at the definition of the ORDS package I can't see any obvious way of doing this. There are no procedures for DELETE_HANDLER or DELETE_TEMPLATE. It is clearly possible to do this as you can do it with SQL Developer.

Is there any secret way or can it only be done by clicking through the gui?

Thanks,

John

Tagged:

Best Answer

  • thatJeffSmith-Oracle
    thatJeffSmith-Oracle Distinguished Product Manager Posts: 8,765 Employee
    Answer ✓

    What SQL Developer does is completely re-create the module, without the templates and handlers you have 'deleted.'

    If you look at SQL Developer Web, and delete a template of handler, use your browser dev tools to see what's happening under the covers. I think that will be of interest to you.

Answers

  • thatJeffSmith-Oracle
    thatJeffSmith-Oracle Distinguished Product Manager Posts: 8,765 Employee
    Answer ✓

    What SQL Developer does is completely re-create the module, without the templates and handlers you have 'deleted.'

    If you look at SQL Developer Web, and delete a template of handler, use your browser dev tools to see what's happening under the covers. I think that will be of interest to you.

  • John Howard
    John Howard Member Posts: 32 Bronze Badge

    Hi Jeff,

    Thanks for responding so quickly!

    So to achieve what I want to do I can drop/recreate the module. I did think about that and wondered if it wasn't a bit heavy-handed but if it's what SQL Developer does anyway - then I may as well.

    Thanks again,

    John