Home Microsoft SQL Server DigiMailing iRN Contact
    Keyword



sys.sp_MSreset_logical_record_views

  No additional text.


Syntax
create procedure sys.sp_MSreset_logical_record_views(@pubid uniqueidentifier)
AS
    declare @artid uniqueidentifier
    declare @logical_record_view nvarchar(270)
    declare @quoted_obj nvarchar(290)

    -- drop all the logical record views for this publication, and also null out the entries in sysmergepartioninfo
    -- for all articles in this publication
    declare per_article CURSOR LOCAL FAST_FORWARD FOR select artid, object_name(logical_record_view) FROM dbo.sysmergepartitioninfo
        where pubid = @pubid and logical_record_view is not null FOR READ ONLY
    open per_article
    fetch per_article INTO @artid, @logical_record_view
    while (@@fetch_status <> -1)
    begin
        if object_id(@logical_record_view) is not NULL
        and not exists (select * from sysmergepartitioninfo where logical_record_view = @logical_record_view
			and pubid <> @pubid)
        begin
            select @quoted_obj = QUOTENAME(@logical_record_view)
            exec ('drop view ' + @quoted_obj)
            if @@error<>0
                goto FAILURE
        end

        update dbo.sysmergepartitioninfo
            set logical_record_view = NULL,
            logical_record_parent_nickname = NULL,
            logical_record_deleted_view_rule = NULL
            where pubid = @pubid and artid = @artid
    fetch per_article INTO @artid, @logical_record_view
    end
    close per_article
    deallocate per_article
    return (0)

FAILURE:
    close per_article
    deallocate per_article
    return (1)

 
Last revision 2008RTM
See also

  sp_MSCleanupForPullReinitWithPubId (Procedure)
sp_MSdrop_rladmin (Procedure)
       



News

  Query a named instance
Sybase+ASE+silent+install
SQL 2008 R2
Deprecated procedures in SQL2008
Reporting Services item-level role definitions
Create all your missing indexes
Converting datetime field
Start MSSQL Server Profiler at time
Replicating MSSQL Server views
Exploring Microsoft Sharepoint
The OLE DB provider "SQLNCLI10" for linked server indicates.
Mobile solar charger
Oracle to SQL Server replication
Cannot insert the value NULL into column
Undocumented Microsoft SQL Server 2008
VMware
Zoekmachine optimalisatie
SQL Servers hidden objects
FckEditor
Flash in Ajax
De hype die AJAX heet
Barcode scannen
MySQL; Gratis, makkelijk en snel!
PHP
sIFR; de combinatie tussen HTML en Flash