cancel
Showing results for 
Search instead for 
Did you mean: 

Replacing Table which takes part in publication

Baron
Participant
646

It is clear that the database prevents dropping (or replacing) a table which is already participating in a publication.

I don't know why the table name in the message is very odd. Example:

create or replace table mytest (sn int, des varchar(10));--OK
create publication mypub (table mytest);--OK

and then:

drop table mytest
-> Error Table mytest is participating in a publication --OK

create or replace table mytest (sn int, des varchar(10));

-> Error Table TESEYLEFJEYSOVB is participating in a publication --NOK, and every time I get a different table name

Accepted Solutions (0)

Answers (1)

Answers (1)

VolkerBarth
Contributor

Can't comment on the wrong table name in the error message...

But you usually will want to use ALTER TABLE here - take care that certain modifications are forbidden/discouraged within a SQL Remote setup, such as dropping/renaming columns or changing from NULL to NOT NULL when nulls might "be around" from outstanding messages.

Baron
Participant
0 Kudos

both create table statements are identical, I dont want/need to change/alter the table structure.

I just wanted to drop the table and create it within the same statement.

VolkerBarth
Contributor

I just wanted to drop the table and create it within the same statement.

But why would you do that if the statements are identical? Certainly not in a running SQL Remote setup...

If this is meant to re-start a test setup, you might just drop the article from the publication before you re-create the table or drop and re-create the publication altogether.

Or start from scratch again - in my experience, a SQL Remote or MobiLink setup "has its history", so if you want to re-start, say after changing the publication design, it might be easier and less error-prone to start with a fresh publication and fresh remotes.

Baron
Participant

Yes, it is meant to re-start a test setup, and Yes I do actually dropping the publication.

Just wanted to report the error.

chris_keating
Product and Topic Expert
Product and Topic Expert

Thank you for reporting this. I am working on a fix.

chris_keating
Product and Topic Expert
Product and Topic Expert

This is fixed in Engineering Case# 827368 and will be in a future patch.