all groups > sql server replication > august 2004 >
You're in the

sql server replication

group:

Time zones...


Time zones... José Araujo
8/20/2004 10:07:14 AM
sql server replication:
Hi,

This is me one more time.... now I am wondering about the impact of
replication on the "auto filled" dates columns.

For instance, some of my tables have a "Last Updated Date". Of course, now
that I am going to use the system from Spain and from Florida that column
will get the local time of any of them.

I could use the function: GETUTCDATE() the problem about that is that that
function cannot be called from a User-Defined-Function, and I would like to
call it from there.

Moreover, suppose I learn to live with that limitation, and I base my code
on SPs.

The next inconvinience is that according to the help files those cannot be
used to get an indexed view.

My question is: Can somebody give me a piece of advice on how to handle the
time zones difference when using replication?

I didn't posted this to the programming forum, since i think almost everyone
doing replication have had to face this problem...

Thanks (once again)... José.

Re: Time zones... Paul Ibison
8/20/2004 6:38:19 PM
José,
actually I have never needed to do cross-timezone replication, but looking
at your issue with GETUTCDATE() and UDFs - there is a similar issue with
GetDate() which is also non-deterministic. The standard solution is not to
call it in the body of the function, but to pass it as a datetime argument's
value: dbo.Myudf(GETUTCDATE()). This could be used in a default, but I'm
not too sure why this function would be used in an indexed view? Often DBA's
have a column which is populated with a datatime value (for date added) and
it is a literal value from that point onwards from the point of view of
replication.
HTH,
Paul Ibison


AddThis Social Bookmark Button