Home Microsoft SQL Server DigiMailing iRN Contact


  No additional text.

create procedure sys.sp_MSunmarkifneeded(
@object                sysname,
@pubid                uniqueidentifier,
@pre_command         int = 0,
@publisher            sysname,
@publisher_db        sysname
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))
    ((@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())))
    select @table_in_use = 1
    select @table_in_use
    return (0)
exec @retcode = sys.sp_MSunmarkreplinfo @object=@object
if @retcode <>0 or @@error<>0
    return (1)
select @table_in_use
return (0)

Last revision 2008RTM

  Query a named instance
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
Zoekmachine optimalisatie
SQL Servers hidden objects
Flash in Ajax
De hype die AJAX heet
Barcode scannen
MySQL; Gratis, makkelijk en snel!
sIFR; de combinatie tussen HTML en Flash