0

For Oracle 12C+ versions, we are wrapping code now . How do we make sure that the correct version of PL/SQL Packages have been deployed. Before we had dba source to check , but after the wrapping of code , it is almost not possible. Is there any good way to know the amendment of the packages/functions ?

Any suggestions on how do people confirm if the correct module has been deployed ?

  • 1
    You could have a version number embedded - perhaps automatically by your toolchain- in the package spec (as a constant) or body (exposed via a function)? But why can't you use dba_source now - you can still compare the text can't you; or a checksum of the text if that's easier for you? – Alex Poole Jan 02 '23 at 22:56
  • 1
    Maybe wrap only the package body. – Wernfried Domscheit Jan 02 '23 at 23:07
  • Yes, typically package headers should not be wrapped. That said, there are a number of web sites out there that will allow you to copy/paste wrapped code and unwrap it for you; just run a Google search. Code wrapping is only obfuscation, not encryption. – pmdba Jan 02 '23 at 23:55

1 Answers1

0

Probably I would create own static function with this

like

...
function version
   return varchar2
as 
   constant ver varchar2:= '{@ver}';
begin 
   return $$PLSQL_UNIT||':'||ver;
end;
...
Sayan Malakshinov
  • 8,492
  • 1
  • 19
  • 27