views:

60

answers:

1

I'm trying to understand how SQL Server 2005 replication works, and I'm looking at the views titled Msmerge_[Publication]_[Table]_VIEW. These views seems to define the merge filters, and are pretty straight forward, except for one line of sql in the WHERE clause:

AND ({fn ISPALUSER('1A381615-B57D-4915-BA4B-E16BF7A9AC58')} = 1)

What does the ISPALUSER function do? I cannot seem to find it anywhere under functions in management studio, nor really any mention of it on the web.

(The reason I'm looking at these views is that we have a performance issue when a client replicates up new records. Sql like if not exists (select 1 from [MSmerge_[Publication]_[Table]_VIEW] where [rowguid] = @rowguid) is running and taking 10+ seconds per row, which obiously kills performance when you have more than a couple of rows going up)

A: 

Seems its checking if the user is in the special security role MSmerge_PAL_role, which seems to govern who has access to the replication functionality.

Therefore, ISPALUSER checks if the user is in that specific role.

Still not sure what the PAL stands for.

Gareth