Hello, I am not a sql server programmer.
I have a database which already has a publication set up, which sends a
bunch of tables to subscribers. Everything was okay, but now I need to
publish two more tables. These tables contain columns which are user
defined types, which means my subscribers do not have them defined on
their side.
When I try to start synchronizing I get an error: Column or parameter
#1: Cannot find data type u_Blah. (error number 2715)
which is I guess, fair enough since the tables is trying to call
something that doesn't exist for the subscribers yet. If I understand
MSDN correctly (I tried reading so many articles...) in the Publication
--> Properties --> Articles tab; then, when I go into the properties
of the new articles, I can specify "Convert User Defined To base data
types", and then the subscribers will be able to pick up the user
defined types just fine. However (PLEASE tell me I understood this
wrong) that only works when publication is being set up the very first
time. That, in my situation, because I'm only adding articles, I cannot
do that.
The solution in MSDN seems to be to "manually copy the type (and the
associated assembly for a user-defined type) to each subscriber".
(msdn2.microsoft.com/en-us/library/ms152559.aspx) I have no idea what
this means. Can anyone shed some light on what must be done now?
Thank you
-Dorothy
This is definable at the article level, and if you select to use the base
types for your new articles, there should be no requirement to have them
exist on the subscriber. If you want to continue to use user-defined data
types, you can create a script to add them (using sp_addtype and operating
in the correct database ie a 'USE' statement at the top) and then run this
script on the subscriber. How to do this? There are several options:
(a) manually open up Query Analyser and connect to the subscriber and then
run there
(b) use a pre-snapshot script on the publication - not for you as you are
just adding articles to an initialized publication
(c) use sp_addscriptexec, which will run the script on the subscriber the
next time it synchronizes
Cheers,
Paul Ibison SQL Server MVP, www.replicationanswers.com .
|||Just to clarify the current situation:
1) SQL2005 snapshot processing can handle column dependencies on
user-defined data types (both TSQL and CLR) by including the necessary
type\assembly definitions as part of the snapshot. There should be no need
to manually create the necessary types at the subscriber ahead of time using
a pre-snapshot script anymore as folks typically need to do on SQL2000.
2) SQL2005 DDL replication currently lacks capability to figure out new data
type dependencies introduced by a DDL action (such as adding a new column
depending on a UDT that doesn't exist at the subscriber as you attempted
below) As such, you would need to implement some other mechanisms
(sp_addexecscript being one) to bring the necessary data type (+assembly)
definition over to the subscriber before the DDL action is replicated.
-Raymond
<dorothyy@.eyi.us> wrote in message
news:1159311634.662309.166020@.d34g2000cwd.googlegr oups.com...
> Hello, I am not a sql server programmer.
> I have a database which already has a publication set up, which sends a
> bunch of tables to subscribers. Everything was okay, but now I need to
> publish two more tables. These tables contain columns which are user
> defined types, which means my subscribers do not have them defined on
> their side.
> When I try to start synchronizing I get an error: Column or parameter
> #1: Cannot find data type u_Blah. (error number 2715)
> which is I guess, fair enough since the tables is trying to call
> something that doesn't exist for the subscribers yet. If I understand
> MSDN correctly (I tried reading so many articles...) in the Publication
> --> Properties --> Articles tab; then, when I go into the properties
> of the new articles, I can specify "Convert User Defined To base data
> types", and then the subscribers will be able to pick up the user
> defined types just fine. However (PLEASE tell me I understood this
> wrong) that only works when publication is being set up the very first
> time. That, in my situation, because I'm only adding articles, I cannot
> do that.
> The solution in MSDN seems to be to "manually copy the type (and the
> associated assembly for a user-defined type) to each subscriber".
> (msdn2.microsoft.com/en-us/library/ms152559.aspx) I have no idea what
> this means. Can anyone shed some light on what must be done now?
> Thank you
> -Dorothy
>
|||Hello,
thread has been moved to here mysteriously.
http://groups.google.com/group/micro...65417554cc611c
thank you
Raymond Mak [MSFT] wrote:[vbcol=seagreen]
> Just to clarify the current situation:
> 1) SQL2005 snapshot processing can handle column dependencies on
> user-defined data types (both TSQL and CLR) by including the necessary
> type\assembly definitions as part of the snapshot. There should be no need
> to manually create the necessary types at the subscriber ahead of time using
> a pre-snapshot script anymore as folks typically need to do on SQL2000.
> 2) SQL2005 DDL replication currently lacks capability to figure out new data
> type dependencies introduced by a DDL action (such as adding a new column
> depending on a UDT that doesn't exist at the subscriber as you attempted
> below) As such, you would need to implement some other mechanisms
> (sp_addexecscript being one) to bring the necessary data type (+assembly)
> definition over to the subscriber before the DDL action is replicated.
> -Raymond
> <dorothyy@.eyi.us> wrote in message
> news:1159311634.662309.166020@.d34g2000cwd.googlegr oups.com...
Showing posts with label publication. Show all posts
Showing posts with label publication. Show all posts
Thursday, March 22, 2012
Saturday, February 25, 2012
adding independent agents on publication
Hi,
I have set up replication but i want to use independent agent for some other
tables
according to one of the post , i shld right-click properties of the
publication , go to Sunscription Options
however, it's disabled
i am using SQL Server 2000 sp3a , Std Ed
kindly advise how i can get it enabled
tks & rdgs
Message posted via droptable.com
http://www.droptable.com/Uwe/Forums...erver/200601/1
If you are using independent agents ensure that you group the articles into
different publications which are related by DRI. Also make sure you group
them according to application dependency as well. So if you have a stored
procedure which is referencing a group of tables all of these tables should
be in the same publication.
To fix your particular problem, open up QA and do the following.
You need to do the following
1) script out the subscriptions
2) drop the subscriptions
3) in QA in the publication database issue the following
sp_changepublication 'MyPublicationName','independent_agent','true'
Hilary Cotter
Looking for a SQL Server replication book?
http://www.nwsu.com/0974973602.html
Looking for a FAQ on Indexing Services/SQL FTS
http://www.indexserverfaq.com
"maxzsim via droptable.com" <u14644@.uwe> wrote in message
news:59f1ef11076f5@.uwe...
> Hi,
> I have set up replication but i want to use independent agent for some
> other
> tables
> according to one of the post , i shld right-click properties of the
> publication , go to Sunscription Options
> however, it's disabled
> i am using SQL Server 2000 sp3a , Std Ed
> kindly advise how i can get it enabled
> tks & rdgs
> --
> Message posted via droptable.com
> http://www.droptable.com/Uwe/Forums...erver/200601/1
|||tks i'll try out what you have advised
Hilary Cotter wrote:[vbcol=seagreen]
>If you are using independent agents ensure that you group the articles into
>different publications which are related by DRI. Also make sure you group
>them according to application dependency as well. So if you have a stored
>procedure which is referencing a group of tables all of these tables should
>be in the same publication.
>To fix your particular problem, open up QA and do the following.
>You need to do the following
>1) script out the subscriptions
>2) drop the subscriptions
>3) in QA in the publication database issue the following
>sp_changepublication 'MyPublicationName','independent_agent','true'
>[quoted text clipped - 12 lines]
Message posted via droptable.com
http://www.droptable.com/Uwe/Forums...erver/200601/1
I have set up replication but i want to use independent agent for some other
tables
according to one of the post , i shld right-click properties of the
publication , go to Sunscription Options
however, it's disabled
i am using SQL Server 2000 sp3a , Std Ed
kindly advise how i can get it enabled
tks & rdgs
Message posted via droptable.com
http://www.droptable.com/Uwe/Forums...erver/200601/1
If you are using independent agents ensure that you group the articles into
different publications which are related by DRI. Also make sure you group
them according to application dependency as well. So if you have a stored
procedure which is referencing a group of tables all of these tables should
be in the same publication.
To fix your particular problem, open up QA and do the following.
You need to do the following
1) script out the subscriptions
2) drop the subscriptions
3) in QA in the publication database issue the following
sp_changepublication 'MyPublicationName','independent_agent','true'
Hilary Cotter
Looking for a SQL Server replication book?
http://www.nwsu.com/0974973602.html
Looking for a FAQ on Indexing Services/SQL FTS
http://www.indexserverfaq.com
"maxzsim via droptable.com" <u14644@.uwe> wrote in message
news:59f1ef11076f5@.uwe...
> Hi,
> I have set up replication but i want to use independent agent for some
> other
> tables
> according to one of the post , i shld right-click properties of the
> publication , go to Sunscription Options
> however, it's disabled
> i am using SQL Server 2000 sp3a , Std Ed
> kindly advise how i can get it enabled
> tks & rdgs
> --
> Message posted via droptable.com
> http://www.droptable.com/Uwe/Forums...erver/200601/1
|||tks i'll try out what you have advised
Hilary Cotter wrote:[vbcol=seagreen]
>If you are using independent agents ensure that you group the articles into
>different publications which are related by DRI. Also make sure you group
>them according to application dependency as well. So if you have a stored
>procedure which is referencing a group of tables all of these tables should
>be in the same publication.
>To fix your particular problem, open up QA and do the following.
>You need to do the following
>1) script out the subscriptions
>2) drop the subscriptions
>3) in QA in the publication database issue the following
>sp_changepublication 'MyPublicationName','independent_agent','true'
>[quoted text clipped - 12 lines]
Message posted via droptable.com
http://www.droptable.com/Uwe/Forums...erver/200601/1
Labels:
adding,
agent,
agents,
database,
independent,
microsoft,
mysql,
oracle,
othertablesaccording,
properties,
publication,
replication,
right-click,
server,
shld,
sql
adding independent agents on publication
Hi,
I have set up replication but i want to use independent agent for some other
tables
according to one of the post , i shld right-click properties of the
publication , go to Sunscription Options
however, it's disabled
i am using SQL Server 2000 sp3a , Std Ed
kindly advise how i can get it enabled
tks & rdgs
Message posted via droptable.com
http://www.droptable.com/Uwe/Forum...server/200601/1If you are using independent agents ensure that you group the articles into
different publications which are related by DRI. Also make sure you group
them according to application dependency as well. So if you have a stored
procedure which is referencing a group of tables all of these tables should
be in the same publication.
To fix your particular problem, open up QA and do the following.
You need to do the following
1) script out the subscriptions
2) drop the subscriptions
3) in QA in the publication database issue the following
sp_changepublication 'MyPublicationName','independent_agent',
'true'
--
Hilary Cotter
Looking for a SQL Server replication book?
http://www.nwsu.com/0974973602.html
Looking for a FAQ on Indexing Services/SQL FTS
http://www.indexserverfaq.com
"maxzsim via droptable.com" <u14644@.uwe> wrote in message
news:59f1ef11076f5@.uwe...
> Hi,
> I have set up replication but i want to use independent agent for some
> other
> tables
> according to one of the post , i shld right-click properties of the
> publication , go to Sunscription Options
> however, it's disabled
> i am using SQL Server 2000 sp3a , Std Ed
> kindly advise how i can get it enabled
> tks & rdgs
> --
> Message posted via droptable.com
> http://www.droptable.com/Uwe/Forum...server/200601/1|||tks i'll try out what you have advised
Hilary Cotter wrote:[vbcol=seagreen]
>If you are using independent agents ensure that you group the articles into
>different publications which are related by DRI. Also make sure you group
>them according to application dependency as well. So if you have a stored
>procedure which is referencing a group of tables all of these tables should
>be in the same publication.
>To fix your particular problem, open up QA and do the following.
>You need to do the following
>1) script out the subscriptions
>2) drop the subscriptions
>3) in QA in the publication database issue the following
>sp_changepublication 'MyPublicationName','independent_agent',
'true'
>[quoted text clipped - 12 lines]
Message posted via droptable.com
http://www.droptable.com/Uwe/Forum...server/200601/1
I have set up replication but i want to use independent agent for some other
tables
according to one of the post , i shld right-click properties of the
publication , go to Sunscription Options
however, it's disabled
i am using SQL Server 2000 sp3a , Std Ed
kindly advise how i can get it enabled
tks & rdgs
Message posted via droptable.com
http://www.droptable.com/Uwe/Forum...server/200601/1If you are using independent agents ensure that you group the articles into
different publications which are related by DRI. Also make sure you group
them according to application dependency as well. So if you have a stored
procedure which is referencing a group of tables all of these tables should
be in the same publication.
To fix your particular problem, open up QA and do the following.
You need to do the following
1) script out the subscriptions
2) drop the subscriptions
3) in QA in the publication database issue the following
sp_changepublication 'MyPublicationName','independent_agent',
'true'
--
Hilary Cotter
Looking for a SQL Server replication book?
http://www.nwsu.com/0974973602.html
Looking for a FAQ on Indexing Services/SQL FTS
http://www.indexserverfaq.com
"maxzsim via droptable.com" <u14644@.uwe> wrote in message
news:59f1ef11076f5@.uwe...
> Hi,
> I have set up replication but i want to use independent agent for some
> other
> tables
> according to one of the post , i shld right-click properties of the
> publication , go to Sunscription Options
> however, it's disabled
> i am using SQL Server 2000 sp3a , Std Ed
> kindly advise how i can get it enabled
> tks & rdgs
> --
> Message posted via droptable.com
> http://www.droptable.com/Uwe/Forum...server/200601/1|||tks i'll try out what you have advised
Hilary Cotter wrote:[vbcol=seagreen]
>If you are using independent agents ensure that you group the articles into
>different publications which are related by DRI. Also make sure you group
>them according to application dependency as well. So if you have a stored
>procedure which is referencing a group of tables all of these tables should
>be in the same publication.
>To fix your particular problem, open up QA and do the following.
>You need to do the following
>1) script out the subscriptions
>2) drop the subscriptions
>3) in QA in the publication database issue the following
>sp_changepublication 'MyPublicationName','independent_agent',
'true'
>[quoted text clipped - 12 lines]
Message posted via droptable.com
http://www.droptable.com/Uwe/Forum...server/200601/1
Labels:
adding,
agent,
agents,
database,
independent,
microsoft,
mysql,
oracle,
othertablesaccording,
properties,
publication,
replication,
right-click,
server,
shld,
sql
adding independent agents on publication
Hi,
I have set up replication but i want to use independent agent for some other
tables
according to one of the post , i shld right-click properties of the
publication , go to Sunscription Options
however, it's disabled
i am using SQL Server 2000 sp3a , Std Ed
kindly advise how i can get it enabled
tks & rdgs
--
Message posted via SQLMonster.com
http://www.sqlmonster.com/Uwe/Forums.aspx/sql-server/200601/1If you are using independent agents ensure that you group the articles into
different publications which are related by DRI. Also make sure you group
them according to application dependency as well. So if you have a stored
procedure which is referencing a group of tables all of these tables should
be in the same publication.
To fix your particular problem, open up QA and do the following.
You need to do the following
1) script out the subscriptions
2) drop the subscriptions
3) in QA in the publication database issue the following
sp_changepublication 'MyPublicationName','independent_agent','true'
--
Hilary Cotter
Looking for a SQL Server replication book?
http://www.nwsu.com/0974973602.html
Looking for a FAQ on Indexing Services/SQL FTS
http://www.indexserverfaq.com
"maxzsim via SQLMonster.com" <u14644@.uwe> wrote in message
news:59f1ef11076f5@.uwe...
> Hi,
> I have set up replication but i want to use independent agent for some
> other
> tables
> according to one of the post , i shld right-click properties of the
> publication , go to Sunscription Options
> however, it's disabled
> i am using SQL Server 2000 sp3a , Std Ed
> kindly advise how i can get it enabled
> tks & rdgs
> --
> Message posted via SQLMonster.com
> http://www.sqlmonster.com/Uwe/Forums.aspx/sql-server/200601/1|||tks i'll try out what you have advised
Hilary Cotter wrote:
>If you are using independent agents ensure that you group the articles into
>different publications which are related by DRI. Also make sure you group
>them according to application dependency as well. So if you have a stored
>procedure which is referencing a group of tables all of these tables should
>be in the same publication.
>To fix your particular problem, open up QA and do the following.
>You need to do the following
>1) script out the subscriptions
>2) drop the subscriptions
>3) in QA in the publication database issue the following
>sp_changepublication 'MyPublicationName','independent_agent','true'
>> Hi,
>[quoted text clipped - 12 lines]
>> tks & rdgs
--
Message posted via SQLMonster.com
http://www.sqlmonster.com/Uwe/Forums.aspx/sql-server/200601/1
I have set up replication but i want to use independent agent for some other
tables
according to one of the post , i shld right-click properties of the
publication , go to Sunscription Options
however, it's disabled
i am using SQL Server 2000 sp3a , Std Ed
kindly advise how i can get it enabled
tks & rdgs
--
Message posted via SQLMonster.com
http://www.sqlmonster.com/Uwe/Forums.aspx/sql-server/200601/1If you are using independent agents ensure that you group the articles into
different publications which are related by DRI. Also make sure you group
them according to application dependency as well. So if you have a stored
procedure which is referencing a group of tables all of these tables should
be in the same publication.
To fix your particular problem, open up QA and do the following.
You need to do the following
1) script out the subscriptions
2) drop the subscriptions
3) in QA in the publication database issue the following
sp_changepublication 'MyPublicationName','independent_agent','true'
--
Hilary Cotter
Looking for a SQL Server replication book?
http://www.nwsu.com/0974973602.html
Looking for a FAQ on Indexing Services/SQL FTS
http://www.indexserverfaq.com
"maxzsim via SQLMonster.com" <u14644@.uwe> wrote in message
news:59f1ef11076f5@.uwe...
> Hi,
> I have set up replication but i want to use independent agent for some
> other
> tables
> according to one of the post , i shld right-click properties of the
> publication , go to Sunscription Options
> however, it's disabled
> i am using SQL Server 2000 sp3a , Std Ed
> kindly advise how i can get it enabled
> tks & rdgs
> --
> Message posted via SQLMonster.com
> http://www.sqlmonster.com/Uwe/Forums.aspx/sql-server/200601/1|||tks i'll try out what you have advised
Hilary Cotter wrote:
>If you are using independent agents ensure that you group the articles into
>different publications which are related by DRI. Also make sure you group
>them according to application dependency as well. So if you have a stored
>procedure which is referencing a group of tables all of these tables should
>be in the same publication.
>To fix your particular problem, open up QA and do the following.
>You need to do the following
>1) script out the subscriptions
>2) drop the subscriptions
>3) in QA in the publication database issue the following
>sp_changepublication 'MyPublicationName','independent_agent','true'
>> Hi,
>[quoted text clipped - 12 lines]
>> tks & rdgs
--
Message posted via SQLMonster.com
http://www.sqlmonster.com/Uwe/Forums.aspx/sql-server/200601/1
Labels:
according,
adding,
agent,
agents,
database,
independent,
microsoft,
mysql,
oracle,
properties,
publication,
replication,
right-click,
server,
shld,
sql,
tables
Sunday, February 19, 2012
Adding database to publication stops responding on first article
When adding a database to publications, the process gets stuck on the first
article of the database. This only happens on databases that were previously
replicated, others run through without the slightest problem. We also checked
the transactions issued with sp_who2 / trace, it looks like the transaction
goes into a loop of selecting and updating. We have checked all the
replication related system tables in an attempt to properly remove any traces
of previous publication, but to no avail. Can anyone help? Thanks in advance
Hi Paul
To start of with, we had to manually clear out all the system tables to
properly disable the server as a distributor (The SEM froze) ( We also tried
using sp's which also became non-responsive). At the moment, enabling and
disabling the server as a distributor can be done without any problems
through SEM. We use the SEM to publish the database(s), and the process hangs
on the third step which is adding the articles. It simply gets stuck on
number 1 of X articles, but at least the GUI remains responsive. We have left
the process to run for significant periods without any change - it remains
stuck on article one. Again, we only experience this on databases that were
previously replicated, previously unreplicated databases can be published and
remove without any problems, so I am of the opinion that the problem is not
so much the SQL installation as a problem with the databases.
Thanks
Emile
"Paul Ibison" wrote:
> Emile,
> are you talking about sp_addarticle - manually or
> clicking the articles checkbox in the add publication
> wizard? Or is it when you run the snapshot agent, or the
> distribution/merge agent?
> What procedure gets called in a loop?
> How did you previously remove replication - if you want
> to remove almost all traces, try sp_removedbreplication.
> Rgds,
> Paul Ibison SQL Server MVP, www.replicationanswers.com
> (recommended sql server 2000 replication book:
> http://www.nwsu.com/0974973602p.html)
>
|||Emile
can you try sp_removedbreplication on the database in
question. Then use sp_dboption to disable and reenable
publishing and then see if the issue still remains.
Rgds,
Paul Ibison SQL Server MVP, www.replicationanswers.com
(recommended sql server 2000 replication book:
http://www.nwsu.com/0974973602p.html)
article of the database. This only happens on databases that were previously
replicated, others run through without the slightest problem. We also checked
the transactions issued with sp_who2 / trace, it looks like the transaction
goes into a loop of selecting and updating. We have checked all the
replication related system tables in an attempt to properly remove any traces
of previous publication, but to no avail. Can anyone help? Thanks in advance
Hi Paul
To start of with, we had to manually clear out all the system tables to
properly disable the server as a distributor (The SEM froze) ( We also tried
using sp's which also became non-responsive). At the moment, enabling and
disabling the server as a distributor can be done without any problems
through SEM. We use the SEM to publish the database(s), and the process hangs
on the third step which is adding the articles. It simply gets stuck on
number 1 of X articles, but at least the GUI remains responsive. We have left
the process to run for significant periods without any change - it remains
stuck on article one. Again, we only experience this on databases that were
previously replicated, previously unreplicated databases can be published and
remove without any problems, so I am of the opinion that the problem is not
so much the SQL installation as a problem with the databases.
Thanks
Emile
"Paul Ibison" wrote:
> Emile,
> are you talking about sp_addarticle - manually or
> clicking the articles checkbox in the add publication
> wizard? Or is it when you run the snapshot agent, or the
> distribution/merge agent?
> What procedure gets called in a loop?
> How did you previously remove replication - if you want
> to remove almost all traces, try sp_removedbreplication.
> Rgds,
> Paul Ibison SQL Server MVP, www.replicationanswers.com
> (recommended sql server 2000 replication book:
> http://www.nwsu.com/0974973602p.html)
>
|||Emile
can you try sp_removedbreplication on the database in
question. Then use sp_dboption to disable and reenable
publishing and then see if the issue still remains.
Rgds,
Paul Ibison SQL Server MVP, www.replicationanswers.com
(recommended sql server 2000 replication book:
http://www.nwsu.com/0974973602p.html)
Labels:
adding,
article,
database,
databases,
firstarticle,
microsoft,
mysql,
oracle,
process,
publication,
publications,
responding,
server,
sql,
stops,
stuck
Monday, February 13, 2012
Adding column to Merge Pub
I have a merge publication (SQL 2k) and needed to add a column to a
replicated table. I used the stored proc and settings below and it seemed
to work fine. When I synched with a subscriber, it seemed to have applied
the table modification first, then downloaded the updates that were on the
publication. I just want to make sure I am doing this correctly before I run
on the production database. Thanks.
David
exec sp_repladdcolumn @.source_object = 'ConfigFA'
, @.column = 'NextCaseNumber'
, @.typetext = 'int NOT NULL DEFAULT 1'
, @.publication_to_add = 'MCFIDataPub'
, @.force_invalidate_snapshot = 0
, @.force_reinit_subscription = 1
That is exactly right, it has to do the table modification first to pull the
data back to the publisher and then merge it there. The data on the
publisher will already have the changed format.
Hilary Cotter
Looking for a SQL Server replication book?
http://www.nwsu.com/0974973602.html
Looking for a FAQ on Indexing Services/SQL FTS
http://www.indexserverfaq.com
"David Chase" <dlchase@.lifetimeinc.com> wrote in message
news:u163fB4HGHA.2680@.TK2MSFTNGP09.phx.gbl...
>I have a merge publication (SQL 2k) and needed to add a column to a
>replicated table. I used the stored proc and settings below and it seemed
>to work fine. When I synched with a subscriber, it seemed to have applied
>the table modification first, then downloaded the updates that were on the
>publication. I just want to make sure I am doing this correctly before I
>run on the production database. Thanks.
> David
> exec sp_repladdcolumn @.source_object = 'ConfigFA'
> , @.column = 'NextCaseNumber'
> , @.typetext = 'int NOT NULL DEFAULT 1'
> , @.publication_to_add = 'MCFIDataPub'
> , @.force_invalidate_snapshot = 0
> , @.force_reinit_subscription = 1
>
replicated table. I used the stored proc and settings below and it seemed
to work fine. When I synched with a subscriber, it seemed to have applied
the table modification first, then downloaded the updates that were on the
publication. I just want to make sure I am doing this correctly before I run
on the production database. Thanks.
David
exec sp_repladdcolumn @.source_object = 'ConfigFA'
, @.column = 'NextCaseNumber'
, @.typetext = 'int NOT NULL DEFAULT 1'
, @.publication_to_add = 'MCFIDataPub'
, @.force_invalidate_snapshot = 0
, @.force_reinit_subscription = 1
That is exactly right, it has to do the table modification first to pull the
data back to the publisher and then merge it there. The data on the
publisher will already have the changed format.
Hilary Cotter
Looking for a SQL Server replication book?
http://www.nwsu.com/0974973602.html
Looking for a FAQ on Indexing Services/SQL FTS
http://www.indexserverfaq.com
"David Chase" <dlchase@.lifetimeinc.com> wrote in message
news:u163fB4HGHA.2680@.TK2MSFTNGP09.phx.gbl...
>I have a merge publication (SQL 2k) and needed to add a column to a
>replicated table. I used the stored proc and settings below and it seemed
>to work fine. When I synched with a subscriber, it seemed to have applied
>the table modification first, then downloaded the updates that were on the
>publication. I just want to make sure I am doing this correctly before I
>run on the production database. Thanks.
> David
> exec sp_repladdcolumn @.source_object = 'ConfigFA'
> , @.column = 'NextCaseNumber'
> , @.typetext = 'int NOT NULL DEFAULT 1'
> , @.publication_to_add = 'MCFIDataPub'
> , @.force_invalidate_snapshot = 0
> , @.force_reinit_subscription = 1
>
Sunday, February 12, 2012
Adding articles to existing subscription(s)
If I add an article to an existing publication that already has push
subscriptions, how can I get the new article to the subscriber databases
without running a full snapshot or reinitializing the subscription etc.?
I am running SQL Server 2K sp3 on Windows 2K/2K3.
Thank you.
For transactional replication, you just need to run the snapshot agent and
then synchronize (running the snapshot agent will only create a snapshot of
the new article).
HTH,
Paul Ibison SQL Server MVP, www.replicationanswers.com
(recommended sql server 2000 replication book:
http://www.nwsu.com/0974973602p.html)
|||Paul,
Thank you for your answer. I have tried running the snapshot agent and I
get the following message:
A snapshot was not generated because no subscriptions needed initialization.
Maybe the question I should be asking is how to get the existing
subscriptions to realize that there is a new article and it should be part of
the subscription. The subscriptions report that not all articles are part of
the subscription after I add the new article.
Thanks.
"Paul Ibison" wrote:
> For transactional replication, you just need to run the snapshot agent and
> then synchronize (running the snapshot agent will only create a snapshot of
> the new article).
> HTH,
> Paul Ibison SQL Server MVP, www.replicationanswers.com
> (recommended sql server 2000 replication book:
> http://www.nwsu.com/0974973602p.html)
>
>
|||I have found the solution, you need to run sp_refreshsubscriptions in the
publisher database and the snapshot will only move the new article that was
added not the the entire publication.
Thanks for you assistance.
"Len Gustafson" wrote:
> If I add an article to an existing publication that already has push
> subscriptions, how can I get the new article to the subscriber databases
> without running a full snapshot or reinitializing the subscription etc.?
> I am running SQL Server 2K sp3 on Windows 2K/2K3.
> Thank you.
|||Len,
this type of script should be what you need:
exec sp_addarticle @.publication = 'tTestFNames'
, @.article = 'tEmployees'
, @.source_table = 'tEmployees'
exec sp_addsubscription @.publication = 'tTestFNames'
, @.article = 'tEmployees'
, @.subscriber = 'RSCOMPUTER'
, @.destination_db = 'testrep'
Rgds,
Paul Ibison
subscriptions, how can I get the new article to the subscriber databases
without running a full snapshot or reinitializing the subscription etc.?
I am running SQL Server 2K sp3 on Windows 2K/2K3.
Thank you.
For transactional replication, you just need to run the snapshot agent and
then synchronize (running the snapshot agent will only create a snapshot of
the new article).
HTH,
Paul Ibison SQL Server MVP, www.replicationanswers.com
(recommended sql server 2000 replication book:
http://www.nwsu.com/0974973602p.html)
|||Paul,
Thank you for your answer. I have tried running the snapshot agent and I
get the following message:
A snapshot was not generated because no subscriptions needed initialization.
Maybe the question I should be asking is how to get the existing
subscriptions to realize that there is a new article and it should be part of
the subscription. The subscriptions report that not all articles are part of
the subscription after I add the new article.
Thanks.
"Paul Ibison" wrote:
> For transactional replication, you just need to run the snapshot agent and
> then synchronize (running the snapshot agent will only create a snapshot of
> the new article).
> HTH,
> Paul Ibison SQL Server MVP, www.replicationanswers.com
> (recommended sql server 2000 replication book:
> http://www.nwsu.com/0974973602p.html)
>
>
|||I have found the solution, you need to run sp_refreshsubscriptions in the
publisher database and the snapshot will only move the new article that was
added not the the entire publication.
Thanks for you assistance.
"Len Gustafson" wrote:
> If I add an article to an existing publication that already has push
> subscriptions, how can I get the new article to the subscriber databases
> without running a full snapshot or reinitializing the subscription etc.?
> I am running SQL Server 2K sp3 on Windows 2K/2K3.
> Thank you.
|||Len,
this type of script should be what you need:
exec sp_addarticle @.publication = 'tTestFNames'
, @.article = 'tEmployees'
, @.source_table = 'tEmployees'
exec sp_addsubscription @.publication = 'tTestFNames'
, @.article = 'tEmployees'
, @.subscriber = 'RSCOMPUTER'
, @.destination_db = 'testrep'
Rgds,
Paul Ibison
Labels:
adding,
article,
articles,
database,
databaseswithout,
existing,
microsoft,
mysql,
oracle,
publication,
pushsubscriptions,
server,
sql,
subscriber,
subscription
Adding an index to an exiting publication
I have an existing publication and I want to modify an index on my main server. I do not want the index to be pushed out to the other server, but I'm wondering if the index will break replication.
Any thoughts?
http://www.replicationanswers.com/Default.asp
Adding an existing column to replication
I have a table for which a subset of columns are being replicated. When I
want an additional column to be replicated, the GUI (publication properties
--> Filter Columns tab) alerts you that CHANGING THIS PROPERTY AUTOMATICALLY
MARKS FOR REINITIALIZATION ALL SUBSCRIPTIONS THAT SUPPORT AUTOMATIC
INITIALIZATION ...
Question:
1) How can I add the column without causing reinitalization to occur? I do
not want another snaphot to occur.
2) Will custom stored procedures be overwritten if the snapshot is not run?
Or will they have to be updated manually. Specifically, the original
stored procedure will only have N variables passed to it (for each of the
columns being replicated). Howerver after the change, the stored procedure
will require N+1 variables (for the new column that is added). Will the
new variable need to be added to the stored procedure manually?
*** Thanks in advance for your help ****
1) for transactional replication only the article will be re-snapshotted.
For merge the entire publication will be.
2) When you say custom procs, do you mean ones you have created yourself or
the replication stored procedures auto generated by SQL Server. If you mean
the later, yes they will be regenerated and will be corrected for the new
column. If you really do have custom replication stored procedures and have
disabled the autogeneration of the replication stored procedures they will
not be whacked, otherwise they will.
Hilary Cotter
Looking for a SQL Server replication book?
http://www.nwsu.com/0974973602.html
Looking for a FAQ on Indexing Services/SQL FTS
http://www.indexserverfaq.com
"Ziggy" <Ziggy@.discussions.microsoft.com> wrote in message
news:F96E8ECD-CA4D-4FB7-AD96-5402DB601135@.microsoft.com...
> I have a table for which a subset of columns are being replicated. When I
> want an additional column to be replicated, the GUI (publication
properties
> --> Filter Columns tab) alerts you that CHANGING THIS PROPERTY
AUTOMATICALLY
> MARKS FOR REINITIALIZATION ALL SUBSCRIPTIONS THAT SUPPORT AUTOMATIC
> INITIALIZATION ...
> Question:
> 1) How can I add the column without causing reinitalization to occur? I
do
> not want another snaphot to occur.
> 2) Will custom stored procedures be overwritten if the snapshot is not
run?
> Or will they have to be updated manually. Specifically, the original
> stored procedure will only have N variables passed to it (for each of the
> columns being replicated). Howerver after the change, the stored
procedure
> will require N+1 variables (for the new column that is added). Will the
> new variable need to be added to the stored procedure manually?
> *** Thanks in advance for your help ****
>
want an additional column to be replicated, the GUI (publication properties
--> Filter Columns tab) alerts you that CHANGING THIS PROPERTY AUTOMATICALLY
MARKS FOR REINITIALIZATION ALL SUBSCRIPTIONS THAT SUPPORT AUTOMATIC
INITIALIZATION ...
Question:
1) How can I add the column without causing reinitalization to occur? I do
not want another snaphot to occur.
2) Will custom stored procedures be overwritten if the snapshot is not run?
Or will they have to be updated manually. Specifically, the original
stored procedure will only have N variables passed to it (for each of the
columns being replicated). Howerver after the change, the stored procedure
will require N+1 variables (for the new column that is added). Will the
new variable need to be added to the stored procedure manually?
*** Thanks in advance for your help ****
1) for transactional replication only the article will be re-snapshotted.
For merge the entire publication will be.
2) When you say custom procs, do you mean ones you have created yourself or
the replication stored procedures auto generated by SQL Server. If you mean
the later, yes they will be regenerated and will be corrected for the new
column. If you really do have custom replication stored procedures and have
disabled the autogeneration of the replication stored procedures they will
not be whacked, otherwise they will.
Hilary Cotter
Looking for a SQL Server replication book?
http://www.nwsu.com/0974973602.html
Looking for a FAQ on Indexing Services/SQL FTS
http://www.indexserverfaq.com
"Ziggy" <Ziggy@.discussions.microsoft.com> wrote in message
news:F96E8ECD-CA4D-4FB7-AD96-5402DB601135@.microsoft.com...
> I have a table for which a subset of columns are being replicated. When I
> want an additional column to be replicated, the GUI (publication
properties
> --> Filter Columns tab) alerts you that CHANGING THIS PROPERTY
AUTOMATICALLY
> MARKS FOR REINITIALIZATION ALL SUBSCRIPTIONS THAT SUPPORT AUTOMATIC
> INITIALIZATION ...
> Question:
> 1) How can I add the column without causing reinitalization to occur? I
do
> not want another snaphot to occur.
> 2) Will custom stored procedures be overwritten if the snapshot is not
run?
> Or will they have to be updated manually. Specifically, the original
> stored procedure will only have N variables passed to it (for each of the
> columns being replicated). Howerver after the change, the stored
procedure
> will require N+1 variables (for the new column that is added). Will the
> new variable need to be added to the stored procedure manually?
> *** Thanks in advance for your help ****
>
Labels:
adding,
additional,
column,
columns,
database,
existing,
gui,
iwant,
microsoft,
mysql,
oracle,
publication,
replicated,
replication,
server,
sql,
subset,
table
Thursday, February 9, 2012
Adding an Article to a Publication
Hi:
I have a publication with larger sql table articles. I want to add another
article (small table). To start replicating, I will need to reinitialize and
rerun the snaphot. I don't want to run the snapshot during the day time
because it may block other users because publication has some large tables in
it.
Is there anyway that I can replicate just that table to subsriber during the
day time?
Thanks a lot
Hi Mike,
You shouldn't need to reinitialize your existing subscription in order to
get snapshot data for the new article propagated to the subscriber. And if
you have a transactional publication with the immediate_sync property set to
false, the snapshot agent will only generate bcp data for the new article.
-Raymond
"Mike" <Mike@.discussions.microsoft.com> wrote in message
news:43347180-986E-474C-8C45-EB83BEB62DE5@.microsoft.com...
> Hi:
> I have a publication with larger sql table articles. I want to add
> another
> article (small table). To start replicating, I will need to reinitialize
> and
> rerun the snaphot. I don't want to run the snapshot during the day time
> because it may block other users because publication has some large tables
> in
> it.
> Is there anyway that I can replicate just that table to subsriber during
> the
> day time?
> Thanks a lot
>
|||Thanks Raymond. Where will I see immediate_sync property.
"Raymond Mak [MSFT]" wrote:
> Hi Mike,
> You shouldn't need to reinitialize your existing subscription in order to
> get snapshot data for the new article propagated to the subscriber. And if
> you have a transactional publication with the immediate_sync property set to
> false, the snapshot agent will only generate bcp data for the new article.
> -Raymond
> "Mike" <Mike@.discussions.microsoft.com> wrote in message
> news:43347180-986E-474C-8C45-EB83BEB62DE5@.microsoft.com...
>
>
|||Hi Mike,
You can select the value of the immediate_sync property directly from
syspublications at the publisher database.
-Raymond
"Mike" <Mike@.discussions.microsoft.com> wrote in message
news:E58CEE1E-B55D-4DB3-8E4F-1AB5387C36F2@.microsoft.com...[vbcol=seagreen]
> Thanks Raymond. Where will I see immediate_sync property.
> "Raymond Mak [MSFT]" wrote:
I have a publication with larger sql table articles. I want to add another
article (small table). To start replicating, I will need to reinitialize and
rerun the snaphot. I don't want to run the snapshot during the day time
because it may block other users because publication has some large tables in
it.
Is there anyway that I can replicate just that table to subsriber during the
day time?
Thanks a lot
Hi Mike,
You shouldn't need to reinitialize your existing subscription in order to
get snapshot data for the new article propagated to the subscriber. And if
you have a transactional publication with the immediate_sync property set to
false, the snapshot agent will only generate bcp data for the new article.
-Raymond
"Mike" <Mike@.discussions.microsoft.com> wrote in message
news:43347180-986E-474C-8C45-EB83BEB62DE5@.microsoft.com...
> Hi:
> I have a publication with larger sql table articles. I want to add
> another
> article (small table). To start replicating, I will need to reinitialize
> and
> rerun the snaphot. I don't want to run the snapshot during the day time
> because it may block other users because publication has some large tables
> in
> it.
> Is there anyway that I can replicate just that table to subsriber during
> the
> day time?
> Thanks a lot
>
|||Thanks Raymond. Where will I see immediate_sync property.
"Raymond Mak [MSFT]" wrote:
> Hi Mike,
> You shouldn't need to reinitialize your existing subscription in order to
> get snapshot data for the new article propagated to the subscriber. And if
> you have a transactional publication with the immediate_sync property set to
> false, the snapshot agent will only generate bcp data for the new article.
> -Raymond
> "Mike" <Mike@.discussions.microsoft.com> wrote in message
> news:43347180-986E-474C-8C45-EB83BEB62DE5@.microsoft.com...
>
>
|||Hi Mike,
You can select the value of the immediate_sync property directly from
syspublications at the publisher database.
-Raymond
"Mike" <Mike@.discussions.microsoft.com> wrote in message
news:E58CEE1E-B55D-4DB3-8E4F-1AB5387C36F2@.microsoft.com...[vbcol=seagreen]
> Thanks Raymond. Where will I see immediate_sync property.
> "Raymond Mak [MSFT]" wrote:
Labels:
adding,
anotherarticle,
article,
articles,
database,
hii,
larger,
microsoft,
mysql,
oracle,
publication,
reinitialize,
replicating,
server,
sql,
table
adding an article to a publication
When adding an article I have checked the checkbox to show unpublished
articles
and then selected the required the tables. After this, I have run the
snapshot agent for this publication.
The 2 tables I added contained no data yet the snapshot started the coping
of rows of other tables in the publication . Is this right as I thought this
snapshot would just process information for the unpublished tables?
thanks for any help
Sammy
Hi Sammy,
This is expected behavior if you have a merge or snapshot publication. If
you have a transactional publication, a snapshot of all articles will always
be generated if the immediate_sync publication property is set to true.
Typically, the immediate_sync publication property is set to true if you
allowed anonymous subscriptions while creating the publication through the
CreatePublication wizard. If none of what I said previously applies to your
scenario, it would be great if you can post more details about your
publication so either me or other folks on this newsgroup are in a better
position to figure this out.
HTH
-Raymond
"Sammy" <Sammy@.discussions.microsoft.com> wrote in message
news:0A215E11-F110-458D-A9FB-E29B4747E3E9@.microsoft.com...
> When adding an article I have checked the checkbox to show unpublished
> articles
> and then selected the required the tables. After this, I have run the
> snapshot agent for this publication.
> The 2 tables I added contained no data yet the snapshot started the coping
> of rows of other tables in the publication . Is this right as I thought
> this
> snapshot would just process information for the unpublished tables?
>
> thanks for any help
> Sammy
>
articles
and then selected the required the tables. After this, I have run the
snapshot agent for this publication.
The 2 tables I added contained no data yet the snapshot started the coping
of rows of other tables in the publication . Is this right as I thought this
snapshot would just process information for the unpublished tables?
thanks for any help
Sammy
Hi Sammy,
This is expected behavior if you have a merge or snapshot publication. If
you have a transactional publication, a snapshot of all articles will always
be generated if the immediate_sync publication property is set to true.
Typically, the immediate_sync publication property is set to true if you
allowed anonymous subscriptions while creating the publication through the
CreatePublication wizard. If none of what I said previously applies to your
scenario, it would be great if you can post more details about your
publication so either me or other folks on this newsgroup are in a better
position to figure this out.
HTH
-Raymond
"Sammy" <Sammy@.discussions.microsoft.com> wrote in message
news:0A215E11-F110-458D-A9FB-E29B4747E3E9@.microsoft.com...
> When adding an article I have checked the checkbox to show unpublished
> articles
> and then selected the required the tables. After this, I have run the
> snapshot agent for this publication.
> The 2 tables I added contained no data yet the snapshot started the coping
> of rows of other tables in the publication . Is this right as I thought
> this
> snapshot would just process information for the unpublished tables?
>
> thanks for any help
> Sammy
>
Adding an article in merge replication
Hi
I want to add an article to an existing publication using merge replication,
the database is around 5 Gb. Using sp_addmergearticle defaults to invalidate
the snapshot and a new one has to be created. When the new snapshot is
applied to the subscriber is there anyway of just applying just the new
article and its data and nothing else. Setting the pre_creation_command to
'none' only seems to ignore the creation of tables and not the bcp of data
into them.
many thanks
Hi Rob,
When you add an incremental article by specifying @.force_invalidate_snapshot
and generate the snapshot, the snapshot is generated for all the articles.
However when you apply the snapshot at the subscriber, it will apply *only*
the incremental article schema files and data. It will *not* be applying the
snapshot for all the other articles, unless you are reinitializing the
subscriber.
Hope that helps
--Mahesh
[ This posting is provided "as is" with no warranties and confers no
rights. ]
"robham" <nospam@.co.uk> wrote in message
news:%235fLYMIrEHA.4008@.TK2MSFTNGP14.phx.gbl...
> Hi
> I want to add an article to an existing publication using merge
replication,
> the database is around 5 Gb. Using sp_addmergearticle defaults to
invalidate
> the snapshot and a new one has to be created. When the new snapshot is
> applied to the subscriber is there anyway of just applying just the new
> article and its data and nothing else. Setting the pre_creation_command to
> 'none' only seems to ignore the creation of tables and not the bcp of data
> into them.
> many thanks
>
I want to add an article to an existing publication using merge replication,
the database is around 5 Gb. Using sp_addmergearticle defaults to invalidate
the snapshot and a new one has to be created. When the new snapshot is
applied to the subscriber is there anyway of just applying just the new
article and its data and nothing else. Setting the pre_creation_command to
'none' only seems to ignore the creation of tables and not the bcp of data
into them.
many thanks
Hi Rob,
When you add an incremental article by specifying @.force_invalidate_snapshot
and generate the snapshot, the snapshot is generated for all the articles.
However when you apply the snapshot at the subscriber, it will apply *only*
the incremental article schema files and data. It will *not* be applying the
snapshot for all the other articles, unless you are reinitializing the
subscriber.
Hope that helps
--Mahesh
[ This posting is provided "as is" with no warranties and confers no
rights. ]
"robham" <nospam@.co.uk> wrote in message
news:%235fLYMIrEHA.4008@.TK2MSFTNGP14.phx.gbl...
> Hi
> I want to add an article to an existing publication using merge
replication,
> the database is around 5 Gb. Using sp_addmergearticle defaults to
invalidate
> the snapshot and a new one has to be created. When the new snapshot is
> applied to the subscriber is there anyway of just applying just the new
> article and its data and nothing else. Setting the pre_creation_command to
> 'none' only seems to ignore the creation of tables and not the bcp of data
> into them.
> many thanks
>
Labels:
adding,
article,
database,
defaults,
existing,
hii,
merge,
microsoft,
mysql,
oracle,
publication,
replication,
server,
sp_addmergearticle,
sql
Adding a table to transactional repliaction
I am adding a table to an existing publication that has one pull subscription
using the steps listed below. When I run the snapshot agent, it does not
recognize the newly added article ("no subscriptions needed initialization").
I WANT TO RUN THE SNAPSHOT FOR JUST ONE TABLE. Do I need to drop and readd
the subscriber or subscription? If so, please let me know the steps.
ALSO, the steps below did work on a QA server but failed in production.
-- Thanks for your help.
exec sp_addarticle @.publication = N'my_PUBLICATION', @.article = N'my_TABLE',
@.source_owner = N'dbo', @.source_object = N'my_TABLE', @.destination_table =
N'my_TABLE', @.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_my_TABLE', @.del_cmd = N'CALL sp_MSdel_my_TABLE', @.upd_cmd = N'MCALL
sp_MSupd_my_TABLE', @.filter = null, @.sync_object = null, @.auto_identity_range
= N'false', @.force_invalidate_snapshot = 1
GO
select * from distribution..msArticles where article = 'my_TABLE'
go
EXEC sp_refreshsubscriptions
N'my_PUBLICATION'
go
exec sp_reinitsubscription
@.publication = 'my_PUBLICATION',
@.article = 'my_TABLE',
@.for_schema_change = 1,
@.subscriber = 'all'
GO
exec sp_addsubscription
@.publication = 'my_PUBLICATION',
@.article = 'my_TABLE',
@.subscriber = N'SUB_SERVER',
@.destination_db = N'pub_sub_database',
@.sync_type = N'automatic',
@.update_mode = N'read only'
I think you need to run sp_refreshpublications to get it to pick up the
changes.
Hilary Cotter
Looking for a SQL Server replication book?
http://www.nwsu.com/0974973602.html
Looking for a FAQ on Indexing Services/SQL FTS
http://www.indexserverfaq.com
"sbawa" <sbawa@.discussions.microsoft.com> wrote in message
news:F24C7DED-985E-4011-B4E7-F2C5E972F8EC@.microsoft.com...
>I am adding a table to an existing publication that has one pull
>subscription
> using the steps listed below. When I run the snapshot agent, it does not
> recognize the newly added article ("no subscriptions needed
> initialization").
>
> I WANT TO RUN THE SNAPSHOT FOR JUST ONE TABLE. Do I need to drop and
> readd
> the subscriber or subscription? If so, please let me know the steps.
> ALSO, the steps below did work on a QA server but failed in production.
> -- Thanks for your help.
>
> exec sp_addarticle @.publication = N'my_PUBLICATION', @.article =
> N'my_TABLE',
> @.source_owner = N'dbo', @.source_object = N'my_TABLE', @.destination_table =
> N'my_TABLE', @.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_my_TABLE', @.del_cmd = N'CALL sp_MSdel_my_TABLE', @.upd_cmd =
> N'MCALL
> sp_MSupd_my_TABLE', @.filter = null, @.sync_object = null,
> @.auto_identity_range
> = N'false', @.force_invalidate_snapshot = 1
> GO
> select * from distribution..msArticles where article = 'my_TABLE'
> go
> EXEC sp_refreshsubscriptions
> N'my_PUBLICATION'
> go
> exec sp_reinitsubscription
> @.publication = 'my_PUBLICATION',
> @.article = 'my_TABLE',
> @.for_schema_change = 1,
> @.subscriber = 'all'
> GO
> exec sp_addsubscription
> @.publication = 'my_PUBLICATION',
> @.article = 'my_TABLE',
> @.subscriber = N'SUB_SERVER',
> @.destination_db = N'pub_sub_database',
> @.sync_type = N'automatic',
> @.update_mode = N'read only'
>
|||I tried using object search but unable to find this procedure in any of the
databases. Please help.
Your book on transactional replication is great. But you can probably see
that I haven't gotten too far into it yet.
"Hilary Cotter" wrote:
> I think you need to run sp_refreshpublications to get it to pick up the
> changes.
> --
> Hilary Cotter
> Looking for a SQL Server replication book?
> http://www.nwsu.com/0974973602.html
> Looking for a FAQ on Indexing Services/SQL FTS
> http://www.indexserverfaq.com
> "sbawa" <sbawa@.discussions.microsoft.com> wrote in message
> news:F24C7DED-985E-4011-B4E7-F2C5E972F8EC@.microsoft.com...
>
>
using the steps listed below. When I run the snapshot agent, it does not
recognize the newly added article ("no subscriptions needed initialization").
I WANT TO RUN THE SNAPSHOT FOR JUST ONE TABLE. Do I need to drop and readd
the subscriber or subscription? If so, please let me know the steps.
ALSO, the steps below did work on a QA server but failed in production.
-- Thanks for your help.
exec sp_addarticle @.publication = N'my_PUBLICATION', @.article = N'my_TABLE',
@.source_owner = N'dbo', @.source_object = N'my_TABLE', @.destination_table =
N'my_TABLE', @.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_my_TABLE', @.del_cmd = N'CALL sp_MSdel_my_TABLE', @.upd_cmd = N'MCALL
sp_MSupd_my_TABLE', @.filter = null, @.sync_object = null, @.auto_identity_range
= N'false', @.force_invalidate_snapshot = 1
GO
select * from distribution..msArticles where article = 'my_TABLE'
go
EXEC sp_refreshsubscriptions
N'my_PUBLICATION'
go
exec sp_reinitsubscription
@.publication = 'my_PUBLICATION',
@.article = 'my_TABLE',
@.for_schema_change = 1,
@.subscriber = 'all'
GO
exec sp_addsubscription
@.publication = 'my_PUBLICATION',
@.article = 'my_TABLE',
@.subscriber = N'SUB_SERVER',
@.destination_db = N'pub_sub_database',
@.sync_type = N'automatic',
@.update_mode = N'read only'
I think you need to run sp_refreshpublications to get it to pick up the
changes.
Hilary Cotter
Looking for a SQL Server replication book?
http://www.nwsu.com/0974973602.html
Looking for a FAQ on Indexing Services/SQL FTS
http://www.indexserverfaq.com
"sbawa" <sbawa@.discussions.microsoft.com> wrote in message
news:F24C7DED-985E-4011-B4E7-F2C5E972F8EC@.microsoft.com...
>I am adding a table to an existing publication that has one pull
>subscription
> using the steps listed below. When I run the snapshot agent, it does not
> recognize the newly added article ("no subscriptions needed
> initialization").
>
> I WANT TO RUN THE SNAPSHOT FOR JUST ONE TABLE. Do I need to drop and
> readd
> the subscriber or subscription? If so, please let me know the steps.
> ALSO, the steps below did work on a QA server but failed in production.
> -- Thanks for your help.
>
> exec sp_addarticle @.publication = N'my_PUBLICATION', @.article =
> N'my_TABLE',
> @.source_owner = N'dbo', @.source_object = N'my_TABLE', @.destination_table =
> N'my_TABLE', @.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_my_TABLE', @.del_cmd = N'CALL sp_MSdel_my_TABLE', @.upd_cmd =
> N'MCALL
> sp_MSupd_my_TABLE', @.filter = null, @.sync_object = null,
> @.auto_identity_range
> = N'false', @.force_invalidate_snapshot = 1
> GO
> select * from distribution..msArticles where article = 'my_TABLE'
> go
> EXEC sp_refreshsubscriptions
> N'my_PUBLICATION'
> go
> exec sp_reinitsubscription
> @.publication = 'my_PUBLICATION',
> @.article = 'my_TABLE',
> @.for_schema_change = 1,
> @.subscriber = 'all'
> GO
> exec sp_addsubscription
> @.publication = 'my_PUBLICATION',
> @.article = 'my_TABLE',
> @.subscriber = N'SUB_SERVER',
> @.destination_db = N'pub_sub_database',
> @.sync_type = N'automatic',
> @.update_mode = N'read only'
>
|||I tried using object search but unable to find this procedure in any of the
databases. Please help.
Your book on transactional replication is great. But you can probably see
that I haven't gotten too far into it yet.
"Hilary Cotter" wrote:
> I think you need to run sp_refreshpublications to get it to pick up the
> changes.
> --
> Hilary Cotter
> Looking for a SQL Server replication book?
> http://www.nwsu.com/0974973602.html
> Looking for a FAQ on Indexing Services/SQL FTS
> http://www.indexserverfaq.com
> "sbawa" <sbawa@.discussions.microsoft.com> wrote in message
> news:F24C7DED-985E-4011-B4E7-F2C5E972F8EC@.microsoft.com...
>
>
Labels:
adding,
agent,
below,
database,
existing,
microsoft,
mysql,
oracle,
publication,
pull,
repliaction,
run,
server,
snapshot,
sql,
steps,
subscriptionusing,
table,
transactional
Adding a table to a publication
In testing (learning?) I added a table to a database after a publication was
created. Then I went to modify that publication but the new table didn't
show up in the list of articles. But when I did this with a view it did show
up. Is there something about new tables that prevents them from showing up
in the wizard? What if I use sp_addarticle?
Bob
Bob,
there's a checkbox in the publication properties, articles tab which allows
you to see unpublished articles - please can you check to see if it is this
that is preventing you from seeing the new table.
Cheers,
Paul Ibison SQL Server MVP, www.replicationanswers.com
(recommended sql server 2000 replication book:
http://www.nwsu.com/0974973602p.html)
|||Yeah, that was checked. But I've since deleted the publication. Thanks.
"Paul Ibison" <Paul.Ibison@.Pygmalion.Com> wrote in message
news:epbCqnMrFHA.1252@.TK2MSFTNGP09.phx.gbl...
> Bob,
> there's a checkbox in the publication properties, articles tab which
> allows you to see unpublished articles - please can you check to see if it
> is this that is preventing you from seeing the new table.
> Cheers,
> Paul Ibison SQL Server MVP, www.replicationanswers.com
> (recommended sql server 2000 replication book:
> http://www.nwsu.com/0974973602p.html)
>
created. Then I went to modify that publication but the new table didn't
show up in the list of articles. But when I did this with a view it did show
up. Is there something about new tables that prevents them from showing up
in the wizard? What if I use sp_addarticle?
Bob
Bob,
there's a checkbox in the publication properties, articles tab which allows
you to see unpublished articles - please can you check to see if it is this
that is preventing you from seeing the new table.
Cheers,
Paul Ibison SQL Server MVP, www.replicationanswers.com
(recommended sql server 2000 replication book:
http://www.nwsu.com/0974973602p.html)
|||Yeah, that was checked. But I've since deleted the publication. Thanks.
"Paul Ibison" <Paul.Ibison@.Pygmalion.Com> wrote in message
news:epbCqnMrFHA.1252@.TK2MSFTNGP09.phx.gbl...
> Bob,
> there's a checkbox in the publication properties, articles tab which
> allows you to see unpublished articles - please can you check to see if it
> is this that is preventing you from seeing the new table.
> Cheers,
> Paul Ibison SQL Server MVP, www.replicationanswers.com
> (recommended sql server 2000 replication book:
> http://www.nwsu.com/0974973602p.html)
>
Subscribe to:
Posts (Atom)