Discussions
Categories
- 196.8K All Categories
- 2.2K Data
- 238 Big Data Appliance
- 1.9K Data Science
- 450.2K Databases
- 221.7K General Database Discussions
- 3.8K Java and JavaScript in the Database
- 31 Multilingual Engine
- 550 MySQL Community Space
- 478 NoSQL Database
- 7.9K Oracle Database Express Edition (XE)
- 3K ORDS, SODA & JSON in the Database
- 544 SQLcl
- 4K SQL Developer Data Modeler
- 187K SQL & PL/SQL
- 21.3K SQL Developer
- 295.8K Development
- 17 Developer Projects
- 138 Programming Languages
- 292.5K Development Tools
- 107 DevOps
- 3.1K QA/Testing
- 646K Java
- 28 Java Learning Subscription
- 37K Database Connectivity
- 154 Java Community Process
- 105 Java 25
- 22.1K Java APIs
- 138.1K Java Development Tools
- 165.3K Java EE (Java Enterprise Edition)
- 18 Java Essentials
- 160 Java 8 Questions
- 86K Java Programming
- 80 Java Puzzle Ball
- 65.1K New To Java
- 1.7K Training / Learning / Certification
- 13.8K Java HotSpot Virtual Machine
- 94.3K Java SE
- 13.8K Java Security
- 204 Java User Groups
- 24 JavaScript - Nashorn
- Programs
- 437 LiveLabs
- 38 Workshops
- 10.2K Software
- 6.7K Berkeley DB Family
- 3.5K JHeadstart
- 5.7K Other Languages
- 2.3K Chinese
- 171 Deutsche Oracle Community
- 1.1K Español
- 1.9K Japanese
- 232 Portuguese
sqlcl (22.1.1) liquibase (4.9.1): how to exclude temp tables from genschema command
Hi,
I want to run 'lb genschema -split -sql'.
But problem is that due to existing materialized views I have some temp tables existing.
((MLOG$_T_CICD_USER3, RUPD$_T_CICD_USER3))
In an earlier version both temp tables were extracted but now with 22.1.1 only RUPD$..
If I don't exclude them they will be duplicated lateron when deploying the changelog to the target. This is because when creating the mlog, these tables are created automatically also. But since they already exist due to liquibase deploying them before the mlog, another new one will be created.
(MLOG$_T_CICD_USER31, RUPD$_T_CICD_USER31)
We had opened an Oracle SR for this with the result that its working as expected.
So the big question now is how to best exclude these objects when creating the changelog with 'lb genschema' command.
Any ideas?
Best Answers
-
I found a way by accident:
SQL> lb genschema -split -sql -filter "NOT LIKE 'RUPD$_%'"
or
SQL> lb genschema -split -sql -filter "!='RUPD$_T_CICD_USER3'"
But I am very confused. I can't find any documentation on the -filter parameter.
The official docu just lists the following
liquibase(lb) genschema [-noreport] [-synonyms] [-grants] [-context CONTEXT] [-label LABEL] [-emit_schema] [-fail] [-replace] [-runonchange] [-runalways] [-debug]
😓 Please help me to find out which parameters are actually possible to be used with lb genschema command.
-
Hi all,
I think I found the place..
when I open SQLcl and run lb help genschema I get the missing parameters.
Still not clear how FILTER, LABEL, CONTEXT, NAME have to look like.
I think I will try to open an Oracle SR to get the official docu updated and improved. This really cost me lots of time which could have easily been avoided with better documentation 😥
SQL> lb help genschema
--Starting Liquibase at 13:29:10 (version 4.9.1 #0 built at 2022-05-03 17:23+0000)
usage: liquibase|lb genschema [-noreport] [-synonyms] [-grants] [-split] [-sql] [-filter FILTER] [-context CONTEXT]
[-label LABEL] [-fail] [-replace] [-runonchange] [-runalways] [-debug] [-dbChangeLogTable NAME]
Generate changelogs and controller for connected schema
named arguments:
-noreport all screen output suppressed (default: true)
-synonyms include public synonyms (default: false)
-grants include grant (default: false)
-split split files into directories based on object type (default: false)
-sql generate an addition file containing the creation ddl. (default: false)
-filter user any dbms_metadata NAME_EXPR filter
Common Generator Arguments:
-context CONTEXT ChangeSet contexts to execute
-label LABEL Filter the changelog using labels
-fail sets failOnError value in changeset (default: false)
-replace sets replaceIfExists value in changeset (default: false)
-runonchange sets runOnChange value in changeset (default: false)
-runalways sets runAlways value in changeset (default: false)
-debug Generate and display additional debug output (default: false)
-dbChangeLogTable Select name of internal tables used by extension and liquibase.
Answers
-
I found a way by accident:
SQL> lb genschema -split -sql -filter "NOT LIKE 'RUPD$_%'"
or
SQL> lb genschema -split -sql -filter "!='RUPD$_T_CICD_USER3'"
But I am very confused. I can't find any documentation on the -filter parameter.
The official docu just lists the following
liquibase(lb) genschema [-noreport] [-synonyms] [-grants] [-context CONTEXT] [-label LABEL] [-emit_schema] [-fail] [-replace] [-runonchange] [-runalways] [-debug]
😓 Please help me to find out which parameters are actually possible to be used with lb genschema command.
-
Hi all,
I think I found the place..
when I open SQLcl and run lb help genschema I get the missing parameters.
Still not clear how FILTER, LABEL, CONTEXT, NAME have to look like.
I think I will try to open an Oracle SR to get the official docu updated and improved. This really cost me lots of time which could have easily been avoided with better documentation 😥
SQL> lb help genschema
--Starting Liquibase at 13:29:10 (version 4.9.1 #0 built at 2022-05-03 17:23+0000)
usage: liquibase|lb genschema [-noreport] [-synonyms] [-grants] [-split] [-sql] [-filter FILTER] [-context CONTEXT]
[-label LABEL] [-fail] [-replace] [-runonchange] [-runalways] [-debug] [-dbChangeLogTable NAME]
Generate changelogs and controller for connected schema
named arguments:
-noreport all screen output suppressed (default: true)
-synonyms include public synonyms (default: false)
-grants include grant (default: false)
-split split files into directories based on object type (default: false)
-sql generate an addition file containing the creation ddl. (default: false)
-filter user any dbms_metadata NAME_EXPR filter
Common Generator Arguments:
-context CONTEXT ChangeSet contexts to execute
-label LABEL Filter the changelog using labels
-fail sets failOnError value in changeset (default: false)
-replace sets replaceIfExists value in changeset (default: false)
-runonchange sets runOnChange value in changeset (default: false)
-runalways sets runAlways value in changeset (default: false)
-debug Generate and display additional debug output (default: false)
-dbChangeLogTable Select name of internal tables used by extension and liquibase.