Skip to Main Content

SQLcl

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Interested in getting your voice heard by members of the Developer Marketing team at Oracle? Check out this post for AppDev or this post for AI focus group information.

No grants exported using -grants flag with SQLcl 24.1

UlfMay 23 2024

I'm using liquibase to versioning my code. After upgrading to SQLcl 24.1 it seems i cannot get any catalog for grants.

Using the following syntax in SQlcl 24.1

(base) uhellstr@AP3uxicUHTfqtys  ~/orascript/f1lb/F1_STAGING  sql

SQLcl: Release 24.1 Production on Thu May 23 12:45:31 2024

Copyright (c) 1982, 2024, Oracle. All rights reserved.

Formatter rules loaded
@ >conn F1_STAGING@//localhost:1521/freepdb2
Password? (**********?) ******
Formatter rules loaded
Connected.
F1_STAGING @ //localhost:1521/freepdb2 >cd ~/orascript/f1lb/F1_STAGING
F1_STAGING @ //localhost:1521/freepdb2 >pwd
/home/uhellstr/orascript/f1lb/F1_STAGING
F1_STAGING @ //localhost:1521/freepdb2 >lb generate-schema -split -grants -synonyms -labels Baseline -sql -overwrite-files
--Starting Liquibase at 2024-05-23T12:48:15.477283 (version 4.25.0 #3966 built at 2023-11-10 23:07:29 UTC)

Export Flags Used:

Export Grants true
Export Synonyms true

[Method loadCaptureTable]:
[Type - TYPE_SPEC]: 437 ms
[Type - TYPE_BODY]: 150 ms
[Type - SEQUENCE]: 268 ms
[Type - DIRECTORY]: 54 ms
[Type - CLUSTER]: 3435 ms
[Type - TABLE]: 21962 ms
[Type - MATERIALIZED_VIEW_LOG]: 89 ms
[Type - MATERIALIZED_VIEW]: 24 ms
[Type - VIEW]: 2225 ms
[Type - REF_CONSTRAINT]: 524 ms
[Type - DIMENSION]: 59 ms
[Type - PACKAGE_SPEC]: 121 ms
[Type - FUNCTION]: 120 ms
[Type - PROCEDURE]: 122 ms
[Type - DB_LINK]: 281 ms
[Type - SYNONYM]: 65 ms
[Type - INDEX]: 1697 ms
[Type - TRIGGER]: 373 ms
[Type - PACKAGE_BODY]: 122 ms
[Type - JOB]: 60 ms
[Type - PUBLIC_SYNONYM]: 756 ms
[Type - OBJECT_GRANT]: 132 ms

[Method loadCaptureTable]: 33076 ms
[Method sortCaptureTable]: 83 ms
[Method writeChangeLogs]: 849 ms
Changelog created and written out to file controller.xml

Operation completed successfully.

F1_STAGING @ //localhost:1521/freepdb2 >!ls -ltrh
total 28K
drwxr-xr-x 2 uhellstr uhellstr 4.0K May 23 12:48 sequence
drwxr-xr-x 2 uhellstr uhellstr 4.0K May 23 12:48 table
drwxr-xr-x 2 uhellstr uhellstr 4.0K May 23 12:48 view
drwxr-xr-x 2 uhellstr uhellstr 4.0K May 23 12:48 ref_constraint
drwxr-xr-x 2 uhellstr uhellstr 4.0K May 23 12:48 index
drwxr-xr-x 2 uhellstr uhellstr 4.0K May 23 12:48 comment
-rw-r--r-- 1 uhellstr uhellstr 959 May 23 12:48 controller.xml

F1_STAGING @ //localhost:1521/freepdb2

Note: Liqubase says grants true but when checking after the run there is no catalog for grants ? e.g i miss the catalog “object_grant”

If I use SQLcl 23.3 and check the output after running

lb generate-schema --split --grants --synonyms -labels Baseline --sql

I have the following catalogs generated:

total 28K
drwxr-xr-x 2 uhellstr uhellstr 4.0K May 20 15:25 index
-rw-r--r-- 1 uhellstr uhellstr 3.0K May 20 15:25 controller.xml
drwxr-xr-x 2 uhellstr uhellstr 4.0K May 20 15:25 comment
drwxr-xr-x 2 uhellstr uhellstr 4.0K May 20 15:25 view
drwxr-xr-x 2 uhellstr uhellstr 4.0K May 20 15:25 table
drwxr-xr-x 2 uhellstr uhellstr 4.0K May 20 15:25 sequence
drwxr-xr-x 2 uhellstr uhellstr 4.0K May 20 15:25 object_grant

Is this a known issue ? To me it looks like a bug , but maybe i'm missing something with the syntax even though the output in 24.1 clearly states I have included grants. Right now I cannot use liquiase with SQLcl 24.1 'Im missing for this schema about 17 grants.

Comments
Post Details
Added on May 23 2024
0 comments
141 views