Home Microsoft SQL Server DigiMailing iRN Contact
    Keyword



sys.sp_MSunmarkifneeded

  No additional text.


Syntax
create procedure sys.sp_MSunmarkifneeded(
@object                sysname,
@pubid                uniqueidentifier,
@pre_command         int = 0,
@publisher            sysname,
@publisher_db        sysname
)AS
declare @table_in_use    int
declare @retcode         int

exec @retcode = sys.sp_MSreplcheck_subscribe
if @@error<>0 or @retcode<>0
    return (1)

select @table_in_use = 0
--if pre-creation_command is 'drop (1)' or 'truncate (3)', then disallow this deployment if there is already an article using that table.
--other commands like 'delete, truncate, none are fine'

if exists (select * from dbo.sysmergearticles where objid=object_id(@object) and pubid in
    (select pubid from dbo.sysmergepublications where LOWER(publisher)=LOWER(@publisher) and
        publisher_db=@publisher_db and pubid<>@pubid))
    OR
    ((@pre_command=1 or @pre_command=3) and
        EXISTS (select * from dbo.sysmergearticles where objid=object_id(@object) and pubid <> @pubid and pubid not in
            (select pubid from dbo.sysmergepublications where LOWER(publisher)=LOWER(publishingservername()) and publisher_db=db_name())))
begin
    select @table_in_use = 1
    select @table_in_use
    return (0)
end
exec @retcode = sys.sp_MSunmarkreplinfo @object=@object
if @retcode <>0 or @@error<>0
    return (1)
select @table_in_use
return (0)

 
Last revision 2008RTM
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