May 21, 2012

sp_MShelpvalidationdate (Transact-SQL MetaData) Definition

Please note: that the following source code is provided and copyrighted by Microsoft and is for educational purpose only.
The meta data is from an SQL 2012 Server.

I have posted alot more, find the whole list here.

Goto Definition or MetaData


sys.sp_MShelpvalidationdate(nvarchar @publication
, nvarchar @subscriber
, nvarchar @subscriber_db)


create procedure sys.sp_MShelpvalidationdate(
@publication sysname,
@subscriber sysname,
@subscriber_db sysname
declare @pubid uniqueidentifier
declare @retcode int

-- Security check
if 1 <> is_member('db_owner')
RAISERROR (15247, 11, -1)
return (1)

select @pubid=pubid from dbo.sysmergepublications where name=@publication and UPPER(publisher)=UPPER(publishingservername()) and publisher_db=db_name()
if @pubid is NULL
return (0)

select last_validated, attempted_validate from dbo.sysmergesubscriptions
where pubid=@pubid and
db_name=@subscriber_db and
UPPER(subscriber_server) collate database_default = UPPER(@subscriber) collate database_default

return (0)

No comments:

Post a Comment

Total Pageviews