Home Microsoft SQL Server DigiMailing iRN Contact
    Keyword



sys.sp_getsubscriptiondtspackagename

  No additional text.


Syntax
create procedure sys.sp_getsubscriptiondtspackagename (
    @publication sysname,
    @subscriber sysname = NULL
     ) AS

    SET NOCOUNT ON

    declare @name sysname
    declare @name_full sysname
    declare @id    int
    declare @retcode int

    /*
    ** Security Check
    */
    EXEC @retcode = sys.sp_MSreplcheck_publish
    IF @@ERROR <> 0 or @retcode <> 0
        return (1)

    select @id = 1
    select @name = @publication
    if @subscriber is not null
        select @name = @name + N'_' + @subscriber

    -- reserver space for numbers to make the name unique
    select @name = substring(@name, 1, 100)
    select @name_full = @name

    while (1=1)
    begin
        if not exists (select * from msdb.dbo.sysdtspackages where
            name = @name_full)
            break
        select @name_full = @name + '_' + convert(nvarchar(10), @id)
        select @id = @id + 1
    end
    select N'new_package_name' = @name_full

 
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