?
Solved

Only on the server: Updating columns with the rowguidcol property is not allowed

Posted on 2005-03-09
9
Medium Priority
?
1,213 Views
Last Modified: 2011-09-20
Hello experts,

I have a SP, shich uses something like this:

UPDATE ObjectTable
SET ObjectID = ObjectID
WHERE ...

I use the SET line just to force a check constraint on this column to be recalculated. The ObjectID column is of type uniqueidentifier, rowguid.

The SP works without any problems on my development machine (Windows XP Pro, SQL Server Personal SP 3, English) but fails with the error "Updating columns with the rowguidcol property is not allowed" on the server (Windows 2003 Server, SQL Server Enterprise SP3, German).

Is this an option or something? Why is it working on my machine and fails on the server?

TheAvenger
0
Comment
Question by:TheAvenger
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 4
  • 3
  • 2
9 Comments
 
LVL 14

Expert Comment

by:Thandava Vallepalli
ID: 13494384
>>The SP works without any problems on my development machine

In this machine may be your where may not be satisfied..

 
>> but fails with the error "Updating columns with the rowguidcol property is not allowed"
on the server (Windows 2003 Server, SQL Server Enterprise SP3, German).

may be where clause is satisfied here...
0
 
LVL 13

Expert Comment

by:KarinLoos
ID: 13494402
<<I use the SET line just to force a check constraint on this column to be recalculated. The ObjectID column is of type uniqueidentifier >>
what do you mean with this ? what are you trying to force ?
0
 
LVL 14

Expert Comment

by:Thandava Vallepalli
ID: 13494405
You can't update olumns with the rowguidcol



>>The SP works without any problems on my development machine

here WHERE clause may not be satisfied..  so no updates....

 
>> but fails with the error "Updating columns with the rowguidcol property is not allowed"
on the server (Windows 2003 Server, SQL Server Enterprise SP3, German).

may be where clause is satisfied here...  

itsvtk
0
Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
LVL 20

Author Comment

by:TheAvenger
ID: 13494408
No, the where clause is always satisfied (I have some other fields to be set in the same clause and they are successfully satisfied).

What I figured out now is that the table is replicated on the server. It is a merged replication and the ID column is actually used for the replication itself, while on my machine there is no replication. Could this be the problem? If yes, how can I force a field level check constraint, which uses a UDF, to be rechecked in a specific place, like in my SP? Because if I change only other fields the check constraint is not rechecked but it has to be
0
 
LVL 20

Author Comment

by:TheAvenger
ID: 13494423
It's somewhat complicated: this SP updates the table A. There is also a table B and a connecting table C. When the details are updated in A, there may be a conflict with the connections between A and B (implemented through C). So I have a check constraint on the ID of table A that verifies if a problem appeared (the UDF reads data from the tables B and C as well other records from A to identify this).

If I can force the check constraint to fire in another way, my problem is solved
0
 
LVL 13

Accepted Solution

by:
KarinLoos earned 2000 total points
ID: 13494450
why are you not implementing the update check in a trigger on tableA ?
0
 
LVL 20

Author Comment

by:TheAvenger
ID: 13494527
This is a possible solution but requires a lot of changes - stored procedures for error handling, etc. Isn't there another way?
0
 
LVL 13

Expert Comment

by:KarinLoos
ID: 13494570
not that I can think of..   the reason you cannot probably cannot update the RowGuidcol in your prod server is because of foreign key constraints to TablB or tableC which exists,  in this case you would not be allowed to update the column.
0
 
LVL 20

Author Comment

by:TheAvenger
ID: 13494633
The design of the database is 1:1 the same, the data as well. The differences are as I mentioned the version of the server (Personal vs. Enterprise), the languge (English vs. German) and the replication (none vs. merged)
0

Featured Post

Prepare for your VMware VCP6-DCV exam.

Josh Coen and Jason Langer have prepared the latest edition of VCP study guide. Both authors have been working in the IT field for more than a decade, and both hold VMware certifications. This 163-page guide covers all 10 of the exam blueprint sections.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

For both online and offline retail, the cross-channel business is the most recent pattern in the B2C trade space.
I have a large data set and a SSIS package. How can I load this file in multi threading?
This video shows, step by step, how to configure Oracle Heterogeneous Services via the Generic Gateway Agent in order to make a connection from an Oracle session and access a remote SQL Server database table.
Via a live example, show how to setup several different housekeeping processes for a SQL Server.
Suggested Courses

765 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question