all groups > sql server replication > october 2003 >
You're in the

sql server replication

group:

Using sp_repldropcolumn incorrectly??



Using sp_repldropcolumn incorrectly?? Brad M.
10/30/2003 3:29:57 PM
sql server replication: USE JCS

EXEC master.dbo.sp_repldropcolumn 'Timesheets', 'RegularKM'

When I execute the above command on my publisher, I get the following error.
How can I fix this? I have to remove this column as well as another one,
and add four more. Any help will be much appreciated!!!!

Below is error.....

Warning: only Subscribers running SQL Server 2000 can synchronize with
publication 'JCS' because schema replication is performed.

Server: Msg 5074, Level 16, State 1, Line 1

The object 'DF_Timesheets_RegularKM' is dependent on column 'RegularKM'.

Server: Msg 4922, Level 16, State 1, Line 1

ALTER TABLE DROP COLUMN RegularKM failed because one or more objects access
this column.



Best Regards,

Brad

Re: Using sp_repldropcolumn incorrectly?? Hilary Cotter
10/30/2003 7:48:10 PM
you are using it correctly, but I think you should drop the constraint
before doing this. Use sp_addscriptexec on your publisher to drop this
constraint on all of your subscribers.
[quoted text, click to view]

Re: Using sp_repldropcolumn incorrectly?? Brad M.
10/31/2003 9:21:43 AM
Hi Hilary,

I'm not sure how to do this, so could you give me some example syntax to
implement this?

Thanks!
Brad

[quoted text, click to view]

Re: Using sp_repldropcolumn incorrectly?? Dimitrov, Constantin
11/1/2003 12:07:22 AM
Hi, Brad

Go to that table from Enterprise Manager->Right Click->Design and add the
fields you need, now click the generate script icon
in the toolbar, copy the script, edit it if you need and save it into
AlterTable.sql
then use
EXEC sp_addscriptexec PublicationName,'C:\Scripts\AlterTable.sql',1

Cheers,
Constantin

[quoted text, click to view]

AddThis Social Bookmark Button