Quantcast
Channel: Liquibase Forums
Viewing all articles
Browse latest Browse all 2993

Liquibase not compiling oracle packages

$
0
0

I am implementing liquibase for database deployment, new to liquibase, learning it. 

Question: I have pks/pkb packages and I want to deploy them using liquibase, I have purposely added errors in pkb package(change the function name which doesn't exist in pks). Liquibase always deploying those packages to database in successful state but when I am looking at package using Oracle SQL developer its having compilation error. Liquibase should the fail the deployment if there is an error in package.
If pks/pkb are having any compilation error, liquibase should not deploy them and should through an error

Note: As per project requirement I am using packages file path
My Changelog File
<?xml version="1.0" encoding="UTF-8" standalone="no"?> 
<databaseChangeLog 
    xsi:schemaLocation="http://www.liquibase.org/xml/ns/dbchangelog     
    <changeSet author="N_Pawar" id="86e6529" failOnError="true" dbms="oracle"> 
    <sqlFilePath="D:/Jenkins_Build/CentralLOB/Builds/dev/DevOps/Database/OraclePackage/Packages/PKG_ENTITYNOTESORDSDevOps.pkb" stripComments="true" endDelimiter="\n/" relativeToChangelogFile="false"/> 
</changeSet> 
</databaseChangeLog> 
========================================================================================================

I have tried the below code. 
E.g.:- I want to deploy test1.pkb and test2.pkb OR it could be pks,pkb  so if there is any compilation error in any of the package it should fail the deployment and throw compilation error. The code I am trying as per suggestion on stackoverflow is,
 <changeSet author="N_Pawar" id="01dae122" failOnError="true" runAlways="true"> 
<sql stripComments="true" splitStatements="true" endDelimiter="\n/"> 
BEGIN 
DBMS_UTILITY.COMPILE_SCHEMA(schema => <packgeName, I know I should mentioned schema name here>, compile_all => FALSE); END; 
</sql> 
</changeSet> 

please let me know if I am trying somethign wrong 

Viewing all articles
Browse latest Browse all 2993

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>