Showing posts with label view. Show all posts
Showing posts with label view. Show all posts

Friday, March 30, 2012

Merge replication: View Conflicts interface errors

Hi,

Not sure if this is the correct place to post this but I'm doing merge replication between SQL Server 2005 SP1 and SQL Server Mobile 2005 (on mobile devices) and I'm having some problems with data conflict resolution in the "View Conflicts" interface on the server management studio. The "Select Conflict Table" comes up and there are 5 tables listed. When I click on any of these tables I get an error dialog box titled "Microsoft Replication Conflict Viewer" and message "[ColumnName] is neither a DataColumn nor a DataRelation for table summary (System.Data)" with details:

===================================

CSRTechnicianID is neither a DataColumn nor a DataRelation for table summary. (System.Data)


Program Location:

at System.Data.DataRowView.get_Item(String property)
at Microsoft.SqlServer.Management.UI.ConflictViewer.ViewerForm.GetWinnerSQL(DataRow loserRow, Boolean blockFetch)
at Microsoft.SqlServer.Management.UI.ConflictViewer.ViewerForm.GetSourceRow()
at Microsoft.SqlServer.Management.UI.ConflictViewer.ViewerForm.FillDetailData()
at Microsoft.SqlServer.Management.UI.ConflictViewer.ViewerForm.FillDetail()
at Microsoft.SqlServer.Management.UI.ConflictViewer.ViewerForm.summaryInfoGrid_SelectionChanged(Object sender, SelectionChangedEventArgs args)
at Microsoft.SqlServer.Management.UI.Grid.GridControl.OnSelectionChanged(BlockOfCellsCollection selectedCells)
at Microsoft.SqlServer.Management.UI.Grid.GridControl.SelectedCellsInternal(BlockOfCellsCollection col, Boolean bSet)
at Microsoft.SqlServer.Management.UI.Grid.GridControl.set_SelectedCells(BlockOfCellsCollection value)
at Microsoft.SqlServer.Management.UI.ConflictViewer.ViewerForm.ResetSummaryGrid()
at Microsoft.SqlServer.Management.UI.ConflictViewer.ViewerForm.LoadConflict()

It then opens the conflict viewer window, and lists a conflict in the top grid, but nothing in the lower grid (usually shows details of the winner and loser records). In the top grid it shows conflict type as "4(Update/Delete, Update wins)" and the conflict loser is the mobile device subscriber. If I click on anything (Submit Winner, Remove) I get an error message "Column [Column Name] does not belong to table summary (System.Data)" with details:

===================================

Column 'CSRTechnicianID' does not belong to table summary. (System.Data)


Program Location:

at System.Data.DataRow.GetDataColumn(String columnName)
at System.Data.DataRow.get_Item(String columnName)
at Microsoft.SqlServer.Management.UI.ConflictViewer.ViewerForm.SetLogInfo(DataRow logRow, String sql)
at Microsoft.SqlServer.Management.UI.ConflictViewer.ViewerForm.btnSubmitWinner_Click(Object sender, EventArgs eg)

It seems that the conflict resolution function has gotten corrupted. Does anyone have any tips on how to fix this?

Regards,

Greg

Hi Greg,

This is a known issue which is now fixed in SQL Server 2000 SP2. Please try it and let us know if the problem persists.

The problem is that your table already had a roguid column which was named differently than what the conflict viewer was expecting.

sql

Monday, March 26, 2012

Merge Replication 'wait' issues

Hello,
I have created 3 merge publications on my server. I notice
that when I right click and try to view the properties of
the publication, SQL takes a long time to pull up the
properties of the publication.
Any ideas on how to make this 'wait' time less or why this
occurs?
Thanks,
niv
Niv,
a few things to try to narrow it down:
when you run sp_helpmergepublication does it also take a long time? How about sp_helpmergearticle? How many records are there in sysmergepublications and sysmergesubscriptions? Are things generally slow in EM? If it is just the merge publications, what oc
curs if you open another EM and look at the current activity windows - any evidence of blocking?
HTH,
Paul Ibison
|||Paul,
Tried both those procedures and it returned very fast.
Looks like it may have been another issue. I can get into
the properties quickly now... hmm. weird..
Anyhow,
I am in need of some advice in regards to the best
replication option to select when making changes to
triggers, views, sprocs.
I tried this at one point but I think I choose drop and
recreate.. needless to say.. this was not good
I await your reply.
niv

>--Original Message--
>Niv,
>a few things to try to narrow it down:
>when you run sp_helpmergepublication does it also take a
long time? How about sp_helpmergearticle? How many records
are there in sysmergepublications and
sysmergesubscriptions? Are things generally slow in EM? If
it is just the merge publications, what occurs if you open
another EM and look at the current activity windows - any
evidence of blocking?
>HTH,
>Paul Ibison
>.
>
|||Niv,
glad it's working.
You mention "Changes to triggers, views, sprocs" - are these objects created by SQL Server as part of the replication setup, or are they user objects. If the former, I would advise against altering, although in the case of a recent poster I mentioned edit
ing the triggers, but this was a specific business scenario.
If they are user objects then you might replicate the views and sprocs as separate articles. Triggers are more difficult, and you can use sp_addscriptexec if you are using transactional replication but if not then scripting changes and using linked server
s may be considered.
HTH,
Paul Ibison

Monday, March 12, 2012

Merge replication new subscriber problem

Hi all,
i can't create new subscriptions for my publication since i made a
change to a view:
i used to have a view called vlAnag
i changed the view adding a reference (join) to a new view called
vlAnagValidi
then added the new view to the articles in my publication
since that moment when i try to synchronize i get the error
'the schema script ...\vlAnag_999.sch could not be propagated to the
subscriber'
it seems that he tries to create the view vlAnag *before* creating the
vlAnagValidi
in fact i can't find it in the new database
how can i change the order in which the merge process initializes the
schema?
or is there any workaround?
thanx in advance
lorenzo
The workaround on sql 2000 is to recreate the views and then sql server
should create the correct dependencied and therefore establish the required
replication order. Alternatively you could use sp_addscriptexec. In SQL
Server 2005 you can specify the article order and dependencies are
apparently more robust.
Cheers,
Paul Ibison SQL Server MVP, www.replicationanswers.com
(recommended sql server 2000 replication book:
http://www.nwsu.com/0974973602p.html)
|||i can't delete the views:
error 3724 cannot drop the view ... because it is being used for
replication
of course
now i'm going to study the sp_addscriptexec...
see you
lorenzo
|||I would recommend removing all the views and any other programming objects
from your merge publication if you have to reinitialize at some point. In my
case they are part of a snapshot publication only, which gives me the
flexibility that I need. The sp_addscriptexec can be used but you have to
hand script the file. In your case this is probably ideal as you can
manually determine the replicaiton order of articles.
Cheers,
Paul Ibison SQL Server MVP, www.replicationanswers.com
(recommended sql server 2000 replication book:
http://www.nwsu.com/0974973602p.html)
|||thanx for your reply
i have to manage a 150 articles publication, therefore i'm afraid i
won't edit a manual script...
the (ugly but working) solution i'm taking is to launch the sync, wait
for it to stop for the error, launch a little script that creates the
view, and finally restart the sync
(no comments, please)
my subscribers are very few, so i can handle it :-)
ciao
lorenzo

Merge replication nested view problem

Using SQL 2005 as pub and SQL EXPRESS as sub using Merge replication. Got the following error message

The schema script 'CD_InTransit_v_153.sch' could not be propagated to the subscriber.
Error Detail:
The schema script 'CD_InTransit_v_153.sch' could not be propagated to the subscriber. (Source: MSSQL_REPL, Error number: MSSQL_REPL-2147201001)
Get help: http://help/MSSQL_REPL-2147201001
Unable to replicate a view or function because the referenced objects or columns are not present on the Subscriber. (Source: MSSQL_REPL, Error number: MSSQL_REPL20164)
Get help: http://help/MSSQL_REPL20164
Invalid object name 'dbo.Debit_v'. (Source: MSSQLServer, Error number: 208)
Get help: http://help/208

According to error message, it seems that debit_v is missing. However, I cannot control the sequence of view to replicate. How can I solve this problem

That's why we stopped replicating views and stored procedures.
We first subscribe (tables) and then run a script which creates views and SPs.
Occuring db-changes are quite easily: change them on the publisher, reinit all subscribers and after the first synch remove and recreate all views and SPs.
Might not be the most elegant solution, but it works (as long as you "know" your subscribers).

regards
Aline
|||So that is the nested view problem.. however, I just tried it on transactional with update replication.. everything goes fine. error only happens on merge replication.

Anyways, any other work around.. I really don't want to do any manual work. Any option that i can turn off so that it will not check reference view when create new view.

|||either deploy them as a post snapshot script, or add them to all subscribers using sp_addscriptexec (only if your subscribers were deployed via a unc).

You might also want to look at using snapshot replication to deploy them.|||I should have mention that this happen for the first time replication to subscriber. So when apply the new snapshot to subscriber and got this error. Probably caused by nested view.

So, do you mean I manually copy all those snapshot file to subscriber pc and run them?

May be I dont' understand your answer. Can you give a little more detail on it? THX.. I am really newbie on replication. Please kindly help.