I have a version 12 consilidated database and a version 8 remote database. This has been working perfect for some time. However today I came across an issue that I need some suggestions.
I run this statement from consolidated database:
passthrough only for db_ver8; alter table_1 modify column1 numeric(5,3); passthrough stop;
It appears for version 12 the syntax changed slightly and the system is automatically sending the new syntax to the version 8 database which causes a syntax error.
statement skipped error near numeric.....
It appears the statement getting sent to the version 8 database gets changed to:
alter table_1 alter columnn1 numeric(5,3);
where the "modify" is getting changed to "alter"
When you execute DDL on the v12 database, the syntax that goes into the transaction log might be altered, and this is needed for proper recovery. This can cause issues when this DDL is executed in passthough and also sent down to remote databases whose version number doesn't recognize the altered syntax.
You can get around the issue by first creating a stored procedure (in passthough) that takes in a string and does an execute immediate on the string.
passthrough for subscription to p1; create procedure ExecText( in @txt long varchar ) begin execute immediate @txt; end; passthrough stop;
Once that is done, you can execute any DDL using the stored procedure, and it won't be parsed by the database engine and posibly modified.
passthrough only for rem2; call ExecText( 'alter table table_1 modify column1 numeric(5,3)' ); passthrough stop;
answered 17 Sep '12, 15:57