Showing posts with label merge. Show all posts
Showing posts with label merge. Show all posts

Tuesday, March 27, 2012

Few repl questions

Dear friends,
I have some small questions related to the replication please see if you can
help me.
1. I want to add a article in the merge replicaiton which i can do with
sp_addmergearticle procedure but i want that the snapshot should
automatically run after the same. Please also suggest can user keep on
working while adding and rerunning the snapshot.
2. How can i drop the Article while the replication is on.
3. Which procedure will allow me to Chnage teh Defination of the fields
while the replication is on.
4. How can i drop the Column while replication is on.
Thanks and best regards
Sharad
Sharad,
to add the article, use sp_addmergearticle. This way, you can use
sp_start_job to initiate the snapshot agent.
to drop the article using transactional, use :
exec sp_dropsubscription @.publication = 'tTestFNames'
, @.article = 'tEmployees'
, @.subscriber = 'RSCOMPUTER'
, @.destination_db = 'testrep'
exec sp_droparticle @.publication = 'tTestFNames'
, @.article = 'tEmployees'
(for transactional).
For merge, this is not possible and you'd have to drop the publication to be
able to do it.
To change the field definition in SQL Server 2000 look at this:
http://www.replicationanswers.com/AddColumn.asp
In SQL Server 2005, this should help:
http://www.replicationanswers.com/AlterSchema2005.asp
To drop a column, look at sp_repldropcolumn
Cheers,
Paul Ibison SQL Server MVP, www.replicationanswers.com
(recommended sql server 2000 replication book:
http://www.nwsu.com/0974973602p.html)

Friday, March 23, 2012

Feedback on Merge Replication Error

dear all,
regarding the problem of not uploading the data from the
subscriber to the publisher though the merge agent is
successfult and the status is no data needed to be merged.
i checked the record in msmerge_contents , it doesn't
exist.
actually i checked with the table nick name and the
rowguid of the row i made modification in.
any help with that?
Thanks
Dalia,
does the trigger exist on the subscriber? If not then perhaps the exchange
type is incorrect.
Regards,
Paul Ibison

Wednesday, March 21, 2012

Feasibility of Filtering in this Scenario...

Background:
I'm a young developer working on a project that involves merge replication between SQL Server 2005 Mobile Edition and SQL Server 2005 and I've been having a hard time wrapping my head around exactly how to implement the best filters for the subscription(s) and publication(s).

Users of our application are Auction goers who collect data about AuctionItems in a mobile db and sync that information with a central db once he or she is finished. The central db is, obviously, pre-populated with most of the information about any/all AuctionItems. Central db information is available to view/change via web access.

Multiple users can change the same Auction data so there will be overlapping partitions.

What I would like to do is:
Present the user with a list of all available Auctions for the next 2 weeks (select * from Auctions where blah blah blah). This is a simple publication to create. Now, I'd like to be able allow the user to select AuctionID 4, AuctionID 3, AuctionID 12 and then, via a seperate AuctionListing publication only download AuctionItems that apply to those IDs.

Obviously, the publication has to be created and include the AuctionItem table and all necessary related tables/columns. But how do I create a parameterized filter based on that AuctionID?

Can a subscription be "dynamically created" once those AuctionIDs are known? Obviously, I don't want to bog my mobile devices down with tens of thousands of auction listings to auctions the user is not planning to attend.

Basically, my question is: am I wasting my time or is there some clever manipulation of HOST_NAME(), SUSER_NAME(), both, or some other method that I've missed that can get only those Auctions where the the ID matches one selected by the user at runtime?

You can do it with either one publication or 2 publications.

With one publication, I can think of dynamically populating a table with the IDs from what the user chooses. The filter will be based on IDs present in this table. However note that populating the table and synchronization need to be in 2 different transactions because if they are in the same one, enumerations will be looking at not correct data.

Let me know if you have trouble setting the filter.

|||Could you elaborate a little more on some of the parameters/steps involved involved with the filtering process?

How would we do it, exactly, in one publication? Do I need to use a

mix of RDA and merge replication (or is that even possible)?

In my head I think I know how it needs to work but, as a SQL Server beginner (just started using it this year), I don't know if I can describe the problem and solution eloquently with the available tools.|||Mahesh:

I've decided to go with one publication. How can I separate the population of the database dynamically from the sync call that I will need to make to pull the results down? How do split this action into separate transactions.|||One more thing to consider: I can see the feasibility of using two publications to accomplish this tasks and in some ways it might be easier. Nevertheless, consider this scenario.

We use a table called 'AuctionDownload' that is populated with the AuctionIDs and some string value that we can filter on using HOST_NAME(). This table will be included in the publication along with the main 'Auction' table.

User A subscribes, calls sync, gets a list of auctions and chooses IDs 1 and 2 that he wants listings for. He populates the rows in 'AuctionDownload' on his mobile device and syncs. That's fine.

However, imagine User B is also using the system at the same time as User A. The first time he calls sync to get the list of available auctions, his EMPTY AuctionDownload table will need to be merged with the central AuctionDownload table. Thus User A's values are erased before he or she could call sync on a different publication to get the actual listings!

Is there a work around or am I imagining this syncing scenario incorrectly.

Fault tolerant distributor in merge replication and data mirroring (in SQL Server 2005/200

Cluster it. It should be a local distributor.
http://www.zetainteractive.com - Shift Happens!
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
"Josep" <jmartinez@.autec.es> wrote in message
news:OT0UAqhUIHA.5404@.TK2MSFTNGP03.phx.gbl...
> Hello!
> My customer has SQL Server 2000 with Merge Replication, implementing a
> star tipology: one publisher (also distributor) and 11 push
> subscribers.And they want to move to SQL Server 2005/2008 and have a fault
> tolerant environment.
> I've thought that probably the best is to set up data mirroring for the
> publication, but the BOL says that data mirroring is not possible for the
> distribution database. So, what's the best way to do implement a fault
> tolerant system for the distribution database? (it's not needed to be
> automatic)
> Maybe doing backups and restores quite ofter of distribution database from
> the principal to the mirror? because we have the point that in merge
> replication only changes occurs there when the replication-schema is
> changed or a new identity range is given to a subscriber (when using
> automatic identity range).
>
> Thanks in advance!
> Josep
>
>
Your English is much better than my Spanish, and IMHO extremely good!
Again I think a restore of the publisher database or the distribution
database is your best bet. If the subscribers get ahead of the
distribution database due to a restore from an earlier version of the
distribution database, the subscribers will fill in any missing data
on the publisher.
On Jan 9, 5:13 am, "Josep" <jmarti...@.autec.es> wrote:[vbcol=seagreen]
> Ok. That's the best option, but it's quite expensive and my customer doesn't
> want it. When I said fault-tolerant I didn't mean "real time recovery", I
> should better have said that the downtime recovery process should be quite
> small: less than two hours.
> As it's a Merge Replication there can be this small downtime, that's why I
> was saying doing backup/restore of distribution database... but then I don't
> know how exactly would connect the subscribers to the distribution or other
> issues that can be there and I don't know... or, if as you said, cluster is
> the only option.
> Thank you!
> Josep.
> PS: Hilary, sorry for my English :-(
> "Hilary Cotter" <hilary.cot...@.gmail.com> escribi en el mensajenews:uDoLtIiUIHA.5132@.TK2MSFTNGP02.phx.gbl. ..
>
>
>
>

Monday, March 19, 2012

Fatal Exception error

I have an application that has to work in a merge replicated environment. To
facilitate this we use @.@.Servername to put the name of the server that the
data is changed onto the table. I have an issue now with this problem
http://support.microsoft.com/defaul...B;en-us;270061&
and am wondering when it will be resolved if there is a better workaround; o
r a solution besides dropping the server and reinstalling it ?
Thanks
ChrisHi Chris:
According the KB article you provide, there is no need for reinstall,
what we should do is follow the workaround.
Is there a misunderstanding by me?
Best Wishes
Wei Ci Zhou|||Hi Chris,
Thank you for using the newsgroup and it is my pleasure to answer you
question.
From the knowledge base article
http://support.microsoft.com/defaul...B;en-us;270061&
There is a workaround to avoid it by:
exec sp_addserver 'WindowsNT_Machine_Name', 'local'
I will notify you as soon as possible to you any information about the fix
on this problem. If you still have questions about it, please feel free to
post message here and I am glad to help you. Thanks.
Best regards
Baisong Wei
Microsoft Online Support
----
Get Secure! - www.microsoft.com/security
This posting is provided "as is" with no warranties and confers no rights.
Please reply to newsgroups only. Thanks.|||Wei,
Is there a timescale on the hotfix : i have 20 servers that i have to go thr
ough change control to try the fix : i dont have the issue with my dev / tes
t servers so am finding it hard to resolve.
Also i am interested to know what might cause the issue to have occured in t
eh first place !
many thanks|||Hi Chris,
Thank you for using the newsgroup and it is my pleasure to answer you
question.
The product group is aware of this issue. I cannot guarentee it.
Thanks!
Best regards
Baisong Wei
Microsoft Online Support
----
Get Secure! - www.microsoft.com/security
This posting is provided "as is" with no warranties and confers no rights.
Please reply to newsgroups only. Thanks.

Fatal Exception error

I have an application that has to work in a merge replicated environment. To facilitate this we use @.@.Servername to put the name of the server that the data is changed onto the table. I have an issue now with this problem
http://support.microsoft.com/default.aspx?scid=KB;en-us;270061&
and am wondering when it will be resolved if there is a better workaround; or a solution besides dropping the server and reinstalling it ?
Thanks
ChrisHi Chris:
According the KB article you provide, there is no need for reinstall,
what we should do is follow the workaround.
Is there a misunderstanding by me?
Best Wishes
Wei Ci Zhou|||Hi Chris,
Thank you for using the newsgroup and it is my pleasure to answer you
question.
From the knowledge base article
http://support.microsoft.com/default.aspx?scid=KB;en-us;270061&
There is a workaround to avoid it by:
exec sp_addserver 'WindowsNT_Machine_Name', 'local'
I will notify you as soon as possible to you any information about the fix
on this problem. If you still have questions about it, please feel free to
post message here and I am glad to help you. Thanks.
Best regards
Baisong Wei
Microsoft Online Support
----
Get Secure! - www.microsoft.com/security
This posting is provided "as is" with no warranties and confers no rights.
Please reply to newsgroups only. Thanks.|||Wei
Is there a timescale on the hotfix : i have 20 servers that i have to go through change control to try the fix : i dont have the issue with my dev / test servers so am finding it hard to resolve
Also i am interested to know what might cause the issue to have occured in teh first place
many thanks|||Hi Chris,
Thank you for using the newsgroup and it is my pleasure to answer you
question.
The product group is aware of this issue. I cannot guarentee it.
Thanks!
Best regards
Baisong Wei
Microsoft Online Support
----
Get Secure! - www.microsoft.com/security
This posting is provided "as is" with no warranties and confers no rights.
Please reply to newsgroups only. Thanks.

Friday, February 24, 2012

Failure to create first Replicated Database (SQL Mobile/SQL Server 2005) / Err 28627

Hi,

I'm trying to get my first replication going, and I have set up a database successfully, along with merge replication, however when I attempt to create the first subscriber, I get a permissions issue, regardless of what I do. In the SQLCESA30.LOG file, I get the following entries:

2006/01/07 16:59:36 Hr=00000000 SQLCESA30.DLL loaded 0
2006/01/07 16:59:58 Hr=80004005 ERR:OpenDB failed getting pub version 28627

I posted the initial thread under the "Replication" forum, but am including this 'pointer' post here due to a lack of replies there, and the relevance of this thread to this forum. Please see http://forums.microsoft.com/MSDN/ShowPost.aspx?PostID=193693&SiteID=1 for more details.

Thanks.

I've managed to solve this. It was a Network Protcol issue. I ensured

that Named Pipes was the only protocol being used on the machine for

both client and server protocols, and created an Alias for my machine

with the same name as the computer. Refer to my post for details: http://forums.microsoft.com/MSDN/ShowPost.aspx?PostID=194457&SiteID=1