Using project export to export a table with an identity column, the xml metadata at the bottom of the file has invalid xml. It contains 2 opening <IDENTITY_COLUMN> tags and 1 closing </IDENTITY_COLUMN>. This causes an error later when I make changes to this table and try to stage the changes.
I am running version 25.2.2.0 build: 25.2.2.199.0918
Here are my steps for reproducing on a new schema and project:
PS C:\Temp\sqlclproj4> sql -thin system/xxxxxxx@//localhost/freepdb1
SQLcl: Release 25.2 Production on Tue Jul 29 10:22:39 2025
Copyright (c) 1982, 2025, Oracle. All rights reserved.
Last Successful login time: Tue Jul 29 2025 10:22:41 -04:00
Connected to:
Oracle Database 23ai Free Release 23.0.0.0.0 - Develop, Learn, and Run for Free
Version 23.8.0.25.04
SQL> grant connect, resource to testuser identified by testuser1;
Grant succeeded.
SQL> create table testuser.t1 (id number(*, 0) generated by default on null as identity);
Table TESTUSER.T1 created.
SQL> project init -name test_identity_col -schemas testuser
------------------------
PROJECT DETAILS
------------------------
Project name: test_identity_col
Schema(s): TESTUSER
Directory: C:\Temp\sqlclproj4
Connection name:
Project root: sqlclproj4
Your project has been successfully created
SQL> project export
The current connection (DESCRIPTION=(LOAD_BALANCE=ON)(ADDRESS=(PROTOCOL=TCP)(HOST=localhost)(PORT=1521))(CONNECT_DATA=(SERVICE_NAME=freepdb1))) SYSTEM will be used for all operations
*** TABLES ***
-------------------------------
TABLE 1
-------------------------------
Exported 1 objects
Elapsed 12 sec
Below is the t1.sql file produced by the export:
create table testuser.t1 (
id number(*, 0)
generated by default on null as identity
not null enable
);
-- sqlcl_snapshot {"hash":"0000fcf9c9d727802d35ed11d90457b3656c0a2f","type":"TABLE","name":"T1","schemaName":"TESTUSER","sxml":"\n <TABLE xmlns=\"http://xmlns.oracle.com/ku\" version=\"1.0\">\n <SCHEMA>TESTUSER</SCHEMA>\n <NAME>T1</NAME>\n <RELATIONAL_TABLE>\n <COL_LIST>\n <COL_LIST_ITEM>\n <NAME>ID</NAME>\n <DATATYPE>NUMBER</DATATYPE>\n <SCALE>0</SCALE>\n <IDENTITY_COLUMN>\n <SCHEMA>TESTUSER</SCHEMA>\n \n <IDENTITY_COLUMN>\n <SCHEMA>TESTUSER</SCHEMA>\n <GENERATION>DEFAULT</GENERATION>\n <ON_NULL></ON_NULL>\n <START_WITH>1</START_WITH>\n <INCREMENT>1</INCREMENT>\n <MINVALUE>1</MINVALUE>\n <MAXVALUE>9999999999999999999999999999</MAXVALUE>\n <CACHE>20</CACHE>\n <SCALE>NOSCALE</SCALE>\n </IDENTITY_COLUMN>\n <NOT_NULL></NOT_NULL>\n \n </COL_LIST_ITEM>\n </COL_LIST>\n <DEFAULT_COLLATION>USING_NLS_COMP</DEFAULT_COLLATION>\n <PHYSICAL_PROPERTIES>\n <HEAP_TABLE></HEAP_TABLE>\n </PHYSICAL_PROPERTIES>\n \n </RELATIONAL_TABLE>\n</TABLE>"}