View Issue Details
ID | Project | Category | View Status | Date Submitted | Last Update |
---|---|---|---|---|---|
0005865 | SymmetricDS | Bug | public | 2023-06-01 22:16 | 2023-07-05 18:26 |
Reporter | rwfuller | Assigned To | JishLong | ||
Priority | normal | ||||
Status | closed | Resolution | fixed | ||
Product Version | 3.14.7 | ||||
Target Version | 3.14.8 | Fixed in Version | 3.14.8 | ||
Summary | 0005865: Estimated count from initial load does not work with SqlServer when using different schema than dbo | ||||
Description | The query used to estimate counts for SqlServer is like this select sum(p.rows) from "CATALOG".sys.tables t inner join "CATALOG".sys.partitions p on t.object_id = p.object_id and p.index_id IN (0, 1) where t.name = 'TABLE' and schema_name(t.schema_id) = 'SCHEMA'; The problem with the query is related to the database in use or current context. It is returning NULL because schema_name function. Schema_name function must be used with a table within the database in use or current context. | ||||
Steps To Reproduce | 1. Install Symmetric in its own catalog 2. Add trigger information for a table where the schema is not dbo 3. Make sure MAX_BATCH_SIZE is less than number of records in source table where it should create multiple batches 3. Create table reload request 4. Initial load will be one batch | ||||
Additional Information | Current workaround is to set this property to use select count(*) query instead initial.load.use.estimated.counts=false | ||||
Tags | dialect: sql-server, initial/partial load | ||||
Date Modified | Username | Field | Change |
---|---|---|---|
2023-06-01 22:16 | rwfuller | New Issue | |
2023-06-01 22:16 | rwfuller | Tag Attached: dialect: sql-server | |
2023-06-01 22:16 | rwfuller | Tag Attached: initial/partial load | |
2023-06-14 17:29 | pmarzullo | Note Added: 0002340 | |
2023-06-14 17:31 | pmarzullo | Assigned To | => pmarzullo |
2023-06-14 17:31 | pmarzullo | Status | new => acknowledged |
2023-06-14 17:31 | pmarzullo | Assigned To | pmarzullo => JishLong |
2023-07-05 15:00 | JishLong | Changeset attached | => SymmetricDS 3.14 6afa5242 |
2023-07-05 18:26 | JishLong | Status | acknowledged => resolved |
2023-07-05 18:26 | JishLong | Resolution | open => fixed |
2023-07-05 18:26 | JishLong | Fixed in Version | => 3.14.8 |
2023-07-19 12:58 | admin | Status | resolved => closed |