From: Andrea Caldarone on
Hi all,

I've implemented a trasactional replication. Let's say that I have a table
wich name is "TABLENAME" that I have to replicate accross some databases
(one pubblicator, some subscriptors). All works fine. In the publisher
database I've an application that every time it write a record into
"TABLENAME" table, writes also a record in an other table "OTHER TABLE" like
this:

TABLENAME
ID Primary key
VALUE Char(20)


OTHER TABLE
ID Primary key
ID_TABLENAME Foreign key from TABLENAME
VALUE Char(20)

I don't wont to replicate "OTHER TABLE" so I've built my own
sp_MSins_dboTABLENAME like this:

CREATE procedure [dbo].[sp_MSins_dboTABLENAME ] @c1 int,@c2 char(20) as
begin
insert into
[dbo].[TABLENAME]
( [ID],[VALUE] )
values
( @c1,@c2 )

INSERT INTO
[dbo].[OTHER TABLE]
([ID_TABLENAME],[VALUE])
VALUES
(@c1,'00000000000')

end

I've set "Not for replication" to true for ID Field in table "OTHER TABLE".
I've set "Copy INSERT, UPDATE, and DELETE stored procedures" option into the
publication to false, and I've manually created the sp on the subscriber's
database

But whe I initialize the subscription, "TABLENAME" is correctly filled with
data, but "OTHER TABLE" is empty! No errors are risen...

From: Paul Ibison on
I don't understand - do you want both tables on the publisher and
subscriber?

If the "OTHER TABLE" is populated on the publisher then why not just publish
it along with the other table, and have the default stored procedures used?

Cheers,

Paul Ibison

From: Andrea Caldarone on

"Paul Ibison" <Paul.Ibison(a)ReplicationAnswers.Com.(donotspam)> ha scritto
nel messaggio news:uYF0UIwTKHA.1236(a)TK2MSFTNGP05.phx.gbl...
>I don't understand - do you want both tables on the publisher and
>subscriber?
>
> If the "OTHER TABLE" is populated on the publisher then why not just
> publish it along with the other table, and have the default stored
> procedures used?
>
> Cheers,
>
> Paul Ibison
>

I can't publish "OTHER TABLE", because on the subscriber it contains a lot
of records that aren't on the pubblisher.