Sybase ASE case:
ADS schema script Generator does not generate the script in the order of dependencies in case of view depends on MAT view.
Please refer the below scripts:
SET ANSINULL ON GO SET ARITHABORT ON GO SET ARITHIGNORE OFF GO SET STRING_RTRUNCATION ON GO CREATE TABLE dbo.table_1 ( clm_1 int NOT NULL ) GO CREATE MATERIALIZED VIEW dbo.mat_view_1 MANUAL refresh as select * from table_1 GO CREATE VIEW dbo.view_1 AS SELECT * FROM dbo.mat_view_1 GO
Please refer the attachment 'error_case'.
|
97 KB
|
146 KB
|
200 KB
|
133 KB
|
139 KB
|
114 KB
|
114 KB
|
204 KB
|
168 KB
|
189 KB
Please refer the below example for Oracle test case:
CREATE TABLE "t_matvlog_dep_matview1" ( "visitor_id" NUMBER(15,5) NOT NULL, "date" DATE NULL, "visit_time" TIMESTAMP(6) NOT NULL, CONSTRAINT "t_matvlog_dep_matview1" PRIMARY KEY("visitor_id") DEFERRABLE INITIALLY IMMEDIATE USING INDEX TABLESPACE "USERS" VALIDATE ) TABLESPACE "USERS" NOCOMPRESS PCTFREE 10 INITRANS 1 MAXTRANS 255 STORAGE( BUFFER_POOL DEFAULT ) NOPARALLEL LOGGING NOCACHE MONITORING NOROWDEPENDENCIES DISABLE ROW MOVEMENT GO CREATE MATERIALIZED VIEW "t_matvlog_dep_matview2" TABLESPACE "USERS" PCTFREE 10 MAXTRANS 255 STORAGE ( BUFFER_POOL DEFAULT ) LOGGING NOCOMPRESS NOCACHE NOPARALLEL BUILD IMMEDIATE USING INDEX REFRESH FORCE ON DEMAND WITH PRIMARY KEY DISABLE QUERY REWRITE AS SELECT * FROM "t_matvlog_dep_matview1" GO CREATE MATERIALIZED VIEW LOG ON "t_matvlog_dep_matview2" PCTFREE 10 INITRANS 1 STORAGE (INITIAL 65536 NEXT 1048576 MINEXTENTS 1 MAXEXTENTS 2147483645 BUFFER_POOL DEFAULT) TABLESPACE USERS LOGGING NOCACHE WITH PRIMARY KEY EXCLUDING NEW VALUES GO
Here the generated script fails to execute due to incorrect dependency order. Please refer the attachment.
Test Case: 3 - Sybase ASE 12.5
/* -- Scenario 1 UDT Depends On Defaults */ CREATE DEFAULT S0910DEFUDTdef AS datepart(month,getdate()) GO sp_addtype "S0910UDTdef", "INT", "NOT NULL" GO sp_bindefault S0910DEFUDTdef, "S0910UDTdef" GO /* -- Scenario 2 UDT Depends On Rules */ CREATE RULE S0911RUUDTrule AS @pubid IN ("1389", "0736", "0877", "1622", "1756") GO sp_addtype "S0910UDTrule", "INT", "NOT NULL" GO sp_bindrule S0911RUUDTrule, "S0910UDTrule" GO
Please refer the attachment.
Test Case: 3 - Sybase ASE 12.5
/* -- Scenario 1 UDT Depends On Defaults */ CREATE DEFAULT S0910DEFUDTdef AS datepart(month,getdate()) GO sp_addtype "S0910UDTdef", "INT", "NOT NULL" GO sp_bindefault S0910DEFUDTdef, "S0910UDTdef" GO /* -- Scenario 2 UDT Depends On Rules */ CREATE RULE S0911RUUDTrule AS @pubid IN ("1389", "0736", "0877", "1622", "1756") GO sp_addtype "S0910UDTrule", "INT", "NOT NULL" GO sp_bindrule S0911RUUDTrule, "S0910UDTrule" GO
Please refer the attachment.
I was not able to reproduce the problem described by this issue (i.e. the table/materialized view/view test case) using head of trunk, the object order in the generated script is correct. Please see this attachment. However, the generated script won't execute due to Script Generator does not support SET commands; a separate issue, ADS #15425, has been logged for this problem.
I was not able to reproduce the problem described by this comment using head of trunk, either; the generated script is correct, please see this attachment.
I was not able to reproduce the problem described by this issue (i.e. the table/materialized view/view test case) using head of trunk, the object order in the generated script is correct. Please see this attachment. However, the generated script won't execute due to Script Generator does not support SET commands; a separate issue, ADS #15425, has been logged for this problem.
I was not able to reproduce the problem described by this comment using head of trunk, either; the generated script is correct, please see this attachment.
US trunk SVN r55402/ADS 19.0.0-beta-34
Fixed data type related problems.
Above check-in fixed the problems described by this comment. For Scenario 1, please see this attachment; for Scenario 2, please see this attachment.
US trunk SVN r55402/ADS 19.0.0-beta-34
Fixed data type related problems.
Above check-in fixed the problems described by this comment. For Scenario 1, please see this attachment; for Scenario 2, please see this attachment.
Verified in ADS v19.0.0-beta-34. There is only 1 fix for this comment Rest of the observations was not reproducible in the latest beta build
Verified in ADS v19.0.0-beta-34. There is only 1 fix for this comment Rest of the observations was not reproducible in the latest beta build
Issue #14901 |
Closed |
Fixed |
Resolved |
Completion |
No due date |
Fixed Build ADS 19.0.0-beta-34 |
No time estimate |
Please refer the below example for Oracle test case:
Here the generated script fails to execute due to incorrect dependency order. Please refer the attachment.