March 19, 2007 at 9:04 am
Hello,
I´m using SQL Server 2000 with SP4 build 2187. I have a problem with replication. When the procedure sp_addarticle is executed to add an article, sql server returns an error. Follows a part of script:
DECLARE
@snapshot_start_time_of_day INT
SET
@snapshot_start_time_of_day = 220000
-- Enabling the replication database
USE
master
exec
sp_replicationdboption @dbname = N'DESENV', @optname = N'publish', @value = N'true'
exec
sp_replicationdboption @dbname = N'DESENV', @optname = N'merge publish', @value = N'true'
USE
DESENV
-- Adding the transactional publication
exec
sp_addpublication @publication = N'VENDAS2', @restricted = N'false', @sync_method = N'native', @repl_freq = N'continuous', @description = N'Transactional publication of LINX database.', @status = N'active', @allow_push = N'true', @allow_pull = N'true', @allow_anonymous = N'false', @enabled_for_internet = N'false', @independent_agent = N'false', @immediate_sync = N'false', @allow_sync_tran = N'false', @autogen_sync_procs = N'false', @retention = 336, @allow_queued_tran = N'false', @snapshot_in_defaultfolder = N'true', @compress_snapshot = N'false', @ftp_port = 21, @ftp_login = N'anonymous', @allow_dts = N'false', @allow_subscription_copy = N'false', @add_to_active_directory = N'false'
exec
sp_addpublication_snapshot @publication = N'VENDAS2',@frequency_type = 1, @frequency_interval = 1, @frequency_relative_interval = 0, @frequency_recurrence_factor = 1, @frequency_subday = 1, @frequency_subday_interval = 0, @active_start_date = 0, @active_end_date = 0, @active_start_time_of_day = @snapshot_start_time_of_day, @active_end_time_of_day = 0
exec
sp_grant_publication_access @publication = N'VENDAS2', @login = N'distributor_admin'
exec
sp_grant_publication_access @publication = N'VENDAS2', @login = N'sa'
-- Adding the transactional articles
exec
sp_addarticle @publication = N'VENDAS2', @article = N'VENDAS', @source_owner = N'dbo', @source_object = N'VENDAS', @destination_table = N'VENDAS', @type = N'logbased', @creation_script = null, @description = null, @pre_creation_cmd = N'drop', @schema_option = 0x00000000000000F3, @status = 16, @vertical_partition = N'false', @ins_cmd = N'CALL sp_MSins_VENDAS', @del_cmd = N'CALL sp_MSdel_VENDAS', @upd_cmd = N'MCALL sp_MSupd_VENDAS', @filter = null, @sync_object = null, @auto_identity_range = N'false', @filter_clause = N'PEDIDO NOT LIKE ''NF%E1%'''
when the procedure sp_addarticle is executed, SQL Server returns the following errors:
Msg 220, Level 16, State 2, Procedure sp_articlecolumn, Line 348
Arithmetic overflow error for data type tinyint, value = -29.
Msg 21395, Level 16, State 1, Procedure sp_MSarticlecol, Line 25
This column cannot be included in a transactional publication because the column ID is greater than 255.
Msg 14021, Level 16, State 1, Procedure sp_articlecolumn, Line 427
The column was not added correctly to the article.
Can you help me?
March 23, 2007 at 12:09 am
hello,
How many articles are there within the publication
Also can u script the table
Drop it and recreate it and then add it into the publication
I guess this must work the Column ID within sysobjects should be greater than 255.
This worked for me.
- Krishna
March 23, 2007 at 8:55 am
That´s allright!!! thank you very much. Now it´s ok!!!
Viewing 3 posts - 1 through 2 (of 2 total)
You must be logged in to reply to this topic. Login to reply