Showing posts with label group. Show all posts
Showing posts with label group. Show all posts

Friday, March 30, 2012

Replication Error in Visual Basic

Hi Group,
I have an SQL Server with a database called support for which I have setup a
merge replication subscription called "support".
On my laptop, I have a support program using MSDE locally to access an exact
copy of the data as the main SQL server has.
Whenenver I try to synchronise using the SQLDistribution activeX control, I
get the following message:
"Cannot create transactional subscription to merge publication "support".
The publication type should either be transactional(0) or snapshot(1) for
this operation."
The trouble is, how I see it, I have to used merged because several clients
would have disconnected data sources and any or all could effectively change
the data.
Any help on this appreciated.
Jim
I think your script is wrong. Could you post it here?
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
|||Hi Hilary,
Thanks for the reply. I figured out I actually needed to use the "merge"
activeX control and not the distribution one. My code is below but I am
still receiving this error:
"The merge process was unable to add the pull subscription from
'JBHOME':'Support:'Support'."
JBHOME being my SQL server, support being the database name and also the
publication name. I have tried various variations on the below code but to
no avail.
-- CODE: --
With SQLMerge
.Publisher = "JBHOME"
.PublisherDatabase = "Support"
.Publication = "Support"
.PublisherSecurityMode = NT_AUTHENTICATION
.Distributor = "JBHOME"
.DistributorSecurityMode = NT_AUTHENTICATION
.Subscriber = "(Local)"
.SubscriberDatabase = "Support"
.SubscriberDatasourceType = SQL_SERVER
.SubscriberSecurityMode = NT_AUTHENTICATION
.SubscriberLogin = "sa"
.SubscriberPassword = "mypassword"
.SubscriptionType = ANONYMOUS
.SynchronizationType = AUTOMATIC
.AddSubscription EXISTING_DATABASE, NONE
.Initialize
.Run
.Terminate
End With
-- END CODE --
Kind Regards
Jim
"Hilary Cotter" <hilary.cotter@.gmail.com> wrote in message
news:1113405033.118118.312480@.g14g2000cwa.googlegr oups.com...
>I think your script is wrong. Could you post it here?
> --
> 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
>
|||FYI,
What I am attempting to do is have a server with a database on it and be
able for a vb written client program to "merge" update the remote server.
The clients will use MSDE as their disconnected database, and all this will
work over the internet (hopefully!!!)
Jim
"Reapes" <reapesuk-@.hotmail.com> wrote in message
news:xvb7e.85688$Nr5.22780@.fe2.news.blueyonder.co. uk...
> Hi Hilary,
> Thanks for the reply. I figured out I actually needed to use the "merge"
> activeX control and not the distribution one. My code is below but I am
> still receiving this error:
> "The merge process was unable to add the pull subscription from
> 'JBHOME':'Support:'Support'."
> JBHOME being my SQL server, support being the database name and also the
> publication name. I have tried various variations on the below code but to
> no avail.
> -- CODE: --
> With SQLMerge
> .Publisher = "JBHOME"
> .PublisherDatabase = "Support"
> .Publication = "Support"
> .PublisherSecurityMode = NT_AUTHENTICATION
> .Distributor = "JBHOME"
> .DistributorSecurityMode = NT_AUTHENTICATION
> .Subscriber = "(Local)"
> .SubscriberDatabase = "Support"
> .SubscriberDatasourceType = SQL_SERVER
> .SubscriberSecurityMode = NT_AUTHENTICATION
> .SubscriberLogin = "sa"
> .SubscriberPassword = "mypassword"
> .SubscriptionType = ANONYMOUS
> .SynchronizationType = AUTOMATIC
> .AddSubscription EXISTING_DATABASE, NONE
>
> .Initialize
> .Run
> .Terminate
> End With
>
> -- END CODE --
> Kind Regards
> Jim
> "Hilary Cotter" <hilary.cotter@.gmail.com> wrote in message
> news:1113405033.118118.312480@.g14g2000cwa.googlegr oups.com...
>

Wednesday, March 21, 2012

Replication between 2 publisher with same database

Hi,

Before this, I've 2 difference site that run SQL server 2000 as database server. One at north and the other at west.

At north, I've a group of terminal that run SQL server 2000. I've 1 main server that run as publisher and distributor to all the terminal. And also the main database is at the main server. The terminal will replicate together using merge replication. So that the data would be same at all terminal. At west it also have the same scenario.

Last week my boss ask me to replicate both main server ( north and west ). So that he want the data would be same at all place.

So, can anybody help me.....

hi

at first: a subscriber can also be a publisher!

but you have a problem: you have to reinitalize the replication from one point

for example: you publish the db from the west to the north, and there you have create the new subscription to the west-terminals

it is not possible to publish the db from one publisher to another publisher

summary

step 0: you have one publication with serveal subscriper (west)

step 1: create subscription to a server (north)

step 2: create there are publication

step 3: create subscription to other server

bye

thorsten ueberschaer

|||

Huh? Leave your replication implementation as it currently exists alone. Don't touch it, it's working just fine.

On your main server, create a new database which will combine everything together. Once created, push a subscription from North to this database. After that is done, push a second subscription from West to this database. (You have to configure the snapshot to leave the existing table intact otherwise it will error out when it tries to run the default option which is drop/create.

Before you combine these together, you have to make sure that you can actually combine the data sets in the same place. If you have the same primary key values on both the North and West servers, then you can't combine the data together. In this case, you can still bring it all into the same database, just not into the same set of tables.

BUT, there is no need to blow up your existing implementation just to meet this new requirement.

Replication based on subscribers informations

Hello all,
I want to use replication between one main (publisher/distributor) SQL server 2000 on a Windows 2003 Server, and a group of SQL server 2000 over the internet.
1)
There is some tables on the main SQL server that need to be propagated to the other servers based on (Insert/Update/Delete) transactions. I called that kind static tables.
Example: there is a table called 'Events' wich have to propagate its data to ALL the subscribers.
2)
And there is another tables on the main SQL server that have data that must be propagated to clients (subscribers) based on their informations. I called that kind dynamic tables.
Example: there is table called 'Operations' wich have a column called 'Entreprise_ID', that have data about all operations concerning some entreprises. Those real entreprises have also SQL servers (wich shall be used as subscribers) to get data from the m
ain server, but Entreprise X must receive only data based on 'SELECT * from Operations WHERE Entreprise_ID=X'
I'm new into replication, i've searched over the web and understood it a little bit, so i thought that in my case i should use Transactional Replication if we suppose that data is a bit critical and must be refreshed on all the servers.
i configured the main SQL server with a subsriber to test transactional replication over the internet concerning what i called 'static tables' , it works very well.
But for applying filters on the 'dynamic tables' i don't know how to do it, i've seen that i can apply 'vertical filters' on those tables, but i don't know how to associate it with subscribers informations in order to send only appropriate data to each su
bscriber.
Thanx in advance for any comment.
a vertical filter is where you replicate a subset of the columns, a
horizontal filter is a where you replicate a subset of the rows in the
table.
I take it you want to do horizontal filtering or partitioning. To do this
right click on your publication and select publication properties, click on
the filter rows tab. locate the tables you wish to filter, and click on the
browse button to the right of the table/article. You will get the specify
filter dialog. Enter your filter there.
After your have made your changes, regenerate your snapshot, and distribute
it to your subscribers.
Hilary Cotter
Looking for a book on SQL Server replication?
http://www.nwsu.com/0974973602.html
"The_Flanker" <The_Flanker@.discussions.microsoft.com> wrote in message
news:54A173EE-B094-46BA-B841-A57F95ADE772@.microsoft.com...
> Hello all,
> I want to use replication between one main (publisher/distributor) SQL
server 2000 on a Windows 2003 Server, and a group of SQL server 2000 over
the internet.
> 1)
> There is some tables on the main SQL server that need to be propagated to
the other servers based on (Insert/Update/Delete) transactions. I called
that kind static tables.
> Example: there is a table called 'Events' wich have to propagate its data
to ALL the subscribers.
> 2)
> And there is another tables on the main SQL server that have data that
must be propagated to clients (subscribers) based on their informations. I
called that kind dynamic tables.
> Example: there is table called 'Operations' wich have a column called
'Entreprise_ID', that have data about all operations concerning some
entreprises. Those real entreprises have also SQL servers (wich shall be
used as subscribers) to get data from the main server, but Entreprise X must
receive only data based on 'SELECT * from Operations WHERE Entreprise_ID=X'
>
> I'm new into replication, i've searched over the web and understood it a
little bit, so i thought that in my case i should use Transactional
Replication if we suppose that data is a bit critical and must be refreshed
on all the servers.
> i configured the main SQL server with a subsriber to test transactional
replication over the internet concerning what i called 'static tables' , it
works very well.
> But for applying filters on the 'dynamic tables' i don't know how to do
it, i've seen that i can apply 'vertical filters' on those tables, but i
don't know how to associate it with subscribers informations in order to
send only appropriate data to each subscriber.
> Thanx in advance for any comment.
|||Hello,
Yes Hilary, indeed, i made a mistake talking about 'vertical filtering', i must use 'horizontal filtering' but, the problem is not how to do it, by the wizard or something like that, i already know how to do it, my problem is a conception problem. How to
define an 'dynamic horizontal filter' for an article of a Transactional Replication, and this filter must propagate data dynamically based on subscribers informations.
For example:
Let's suppose that i have a table called 'Operations' that have 3 columns.
Op_ID--Date--Entreprise
1--01/05/2004--1
2--02/05/2004--2
3--15/05/2004--1
4--15/06/2004--3
5--19/06/2004--3
6--01/07/2004--2
so in this case let's suppose that we have 3 subscribers, hence 3 SQL servers each server in one Entreprise.
My need is, if a transaction happened in the table 'Operations' it have to be automatically propagated to the concerned entreprise. eg: there is one new row added '7--04/07/2004--2', this row have to be sent only to Subsriber number 2 because the o
ther subscribers don't need this data.
then, we'll have as a result, after synchronisation:
At Subscriber #1:
1--01/05/2004--1
3--15/05/2004--1
At Subscriber #2:
2--02/05/2004--2
6--01/07/2004--2
7--04/07/2004--2 (the new row)
And at Subscriber #3:
4--15/06/2004--3
5--19/06/2004--3
If anyone can tell me how to manage that problem, it will be a really Great help for me.
Sorry about my english level, it's my third language.
Thanks in advance for your comments.
"Hilary Cotter" wrote:

> a vertical filter is where you replicate a subset of the columns, a
> horizontal filter is a where you replicate a subset of the rows in the
> table.
> I take it you want to do horizontal filtering or partitioning. To do this
> right click on your publication and select publication properties, click on
> the filter rows tab. locate the tables you wish to filter, and click on the
> browse button to the right of the table/article. You will get the specify
> filter dialog. Enter your filter there.
> After your have made your changes, regenerate your snapshot, and distribute
> it to your subscribers.
> --
> Hilary Cotter
> Looking for a book on SQL Server replication?
> http://www.nwsu.com/0974973602.html
>
> "The_Flanker" <The_Flanker@.discussions.microsoft.com> wrote in message
> news:54A173EE-B094-46BA-B841-A57F95ADE772@.microsoft.com...
> server 2000 on a Windows 2003 Server, and a group of SQL server 2000 over
> the internet.
> the other servers based on (Insert/Update/Delete) transactions. I called
> that kind static tables.
> to ALL the subscribers.
> must be propagated to clients (subscribers) based on their informations. I
> called that kind dynamic tables.
> 'Entreprise_ID', that have data about all operations concerning some
> entreprises. Those real entreprises have also SQL servers (wich shall be
> used as subscribers) to get data from the main server, but Entreprise X must
> receive only data based on 'SELECT * from Operations WHERE Entreprise_ID=X'
> little bit, so i thought that in my case i should use Transactional
> Replication if we suppose that data is a bit critical and must be refreshed
> on all the servers.
> replication over the internet concerning what i called 'static tables' , it
> works very well.
> it, i've seen that i can apply 'vertical filters' on those tables, but i
> don't know how to associate it with subscribers informations in order to
> send only appropriate data to each subscriber.
>
>