I am using a variant of the folllowing script to install PL/SQL packages:
$con = [Oracle.DataAccess.Client.OracleConnection]::new('....')
$con.Open()
$cmd = [Oracle.DataAccess.Client.OracleCommand]::new()
$cmd.Connection = $con;
$cmd.CommandText = @'
create or replace package tq84_pkg_with_errors as
proc should_read_procedure_not_proc;
end tq84_pkg_with_errors;
'@
$cmd.ExecuteNonQuery()
$cmd.CommandText = @'
create or replace package tq84_pkg_without_errors as
procedure xyz;
end tq84_pkg_without_errors;
'@
$cmd.ExecuteNonQuery()
Unfortunately, I cannot find a way to find out that tq84_pkg_with_errors was not installed other than checking USER_OBJECTS and/or USER_ERRORS for an error message.
Thus, I am wondering if there is a way to find out about an unsuccessful attempt to install a package with Oracle.DataAccess.