Home Microsoft SQL Server DigiMailing iRN Contact
    Keyword



sys.sp_IHaddarticle

  No additional text.


Syntax

CREATE PROCEDURE sys.sp_IHaddarticle
(
	@article_id					int	OUTPUT,
	@table_id					int	OUTPUT,
	@fpublished					int	OUTPUT,
	@instance_id				int	OUTPUT,
    @publisher_id				int,
    @publisher                  sysname,
	@publisher_db				sysname,
	@publisher_type				sysname,
	@publisherserver			sysname,
	@article					sysname,
	@publication_id				smallint,
    @publication                sysname,
	@creation_script			nvarchar (255),
	@ins_cmd					nvarchar (255),
	@del_cmd					nvarchar (255),
	@upd_cmd					nvarchar (255),
    @filterid					int,
	@filter_clause				ntext,
	@precmdid					int,
	@status						tinyint,
	@typeid						int,
	@schema_option				varbinary(8),
	@source_owner  				sysname,
	@source_table  				sysname,
	@destination_owner			sysname,
	@destination_table			sysname,
	@vertical_partition			nchar(5) = 'false',
	@force_invalidate_snapshot	bit = 0,
	@objid						int,
	@sync_objid					int,
	@description				nvarchar(255),
	@use_default_datatypes		bit,
	@publisher_dbms                 sysname,
	@publisher_version              sysname
)
AS
BEGIN
    SET NOCOUNT ON

    DECLARE @retcode            int
    DECLARE @name               nvarchar(255)
    DECLARE @owner              nvarchar(255)
    DECLARE @uniqueness         nvarchar(255)
    DECLARE @column_name        sysname
    DECLARE @table_name         sysname
    DECLARE @column_pos         int
    DECLARE @column_id          int
    DECLARE @constraint_id      int
    DECLARE @index_id           int

    -- Set publisher DBMS and version (for checking data types)
    IF @publisher_type NOT LIKE 'ORACLE%'
    BEGIN
        RAISERROR (21645, 16, -1, @publisher_type)
        RETURN (1)
    END

    -- Default instance ID
    SET @instance_id = 1

    
    -- Populate IHarticles
    -- Temp table is created in sp_ORAgetcolumndata
    --   not making heterogeneous calls within transactions
    
    INSERT  IHarticles
    (
        publisher_id,
        name,
        publication_id,
        table_id,
        creation_script,
        del_cmd,
        ins_cmd,
        upd_cmd,
        filter,
        filter_clause,
        pre_creation_cmd,
        status,
        type,
        schema_option,
        dest_owner,
        dest_table,
        objid,
        sync_objid,
        description,
        instance_id,
        use_default_datatypes
    )
    VALUES
    (
        @publisher_id,
        @article,
        @publication_id,
        @table_id,
        @creation_script,
        @del_cmd,
        @ins_cmd,
        @upd_cmd,
        @filterid,
        @filter_clause,
        @precmdid,
        @status,
        @typeid,
        @schema_option,
        @destination_owner,
        @destination_table,
        @objid,
        @sync_objid,
        @description,
        @instance_id,
        @use_default_datatypes
    )

    IF @@ERROR <> 0
    BEGIN
        RETURN (1)
    END

    SELECT @article_id = @@IDENTITY

    
    -- Mark columns that are to be replicated
    
    IF @vertical_partition = 'false'
    BEGIN
        EXEC @retcode = sys.sp_IHarticlecolumn  @publication                = @publication,
                                                @article                    = @article,
                                                @refresh_synctran_procs     = 0,
                                                @force_invalidate_snapshot  = @force_invalidate_snapshot,
                                                @publisher                  = @publisher,
                                                @publisher_type             = @publisher_type,
               @publisher_dbms             = @publisher_dbms,
                                                @publisher_version          = @publisher_version


        IF @@ERROR <> 0 OR @retcode <> 0
        BEGIN
            RETURN (1)
        END
    END
END

 
Last revision 2008RTM
See also

  sp_IHdroparticle (Procedure)
sp_MSdrop_repltran (Procedure)
sp_ORAgetcolumndata (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