Home Microsoft SQL Server DigiMailing iRN Contact
    Keyword



sys.sp_MSgetsupportabilitysettings

  No additional text.


Syntax

create procedure sys.sp_MSgetsupportabilitysettings
    (@publisher            sysname,
     @publisher_db         sysname,
     @publication          sysname,
     @server_name          sysname  = NULL,         /* Replica or subscriber Server Name */
     @db_name              sysname  = NULL,         /* Replica or subscriber Database Name */
     @web_server		   sysname  = NULL,			/* name of the IIS server */	
     @compatlevel        int = 90)                  -- backward compatibility level, default=Sphinx

as
    declare    @retcode           		int
    declare    @subid             		uniqueidentifier
    declare    @pubid             		uniqueidentifier
    declare    @last_log_upload_time    datetime
    declare	   @minutes_since_last_log_upload int
	declare    @upload_interval_in_minutes int
    declare    @upload_requested		int

    select @publisher_db = RTRIM(@publisher_db)
    select @db_name = RTRIM(@db_name)

    /*
    ** Security Check and publication validation
    */
    exec @retcode = sys.sp_MSmerge_validate_publication_presence @publication, @publisher_db, @publisher, @pubid output
    if @retcode <> 0 or @@error <> 0
        return 1

    if (@server_name is NULL)
        SET @server_name = publishingservername()

    if (@db_name is NULL)
        set @db_name = db_name()

    SELECT @subid = subid
        FROM dbo.sysmergesubscriptions
        WHERE UPPER(subscriber_server) collate database_default = UPPER(@server_name) collate database_default
            and db_name = @db_name and pubid = @pubid

    if @subid is NULL
    begin
        RAISERROR(20021, 16, -1)
        return (1)
    end

    set @upload_requested = 0

    SELECT @upload_interval_in_minutes = upload_interval,
		    @last_log_upload_time = last_log_upload_time
    from dbo.MSmerge_supportability_settings
    WHERE pubid = @pubid  and subid = @subid and
            ((@web_server IS NULL and web_server IS NULL) or (@web_server IS NOT NULL and
            UPPER(web_server) collate database_default = UPPER(@web_server) collate database_default ))

	if @upload_interval_in_minutes = 0
		set @upload_requested = 1
	else if @last_log_upload_time is not null
	begin
	    select @minutes_since_last_log_upload = datediff(mi, @last_log_upload_time,  getdate())
	    if @minutes_since_last_log_upload > @upload_interval_in_minutes
	    	set @upload_requested = 1
	end

    select top 1 support_options, log_severity, log_modules, log_file_path, log_file_name, log_file_size, no_of_log_files, @upload_requested, delete_after_upload, custom_script, message_pattern
    	from dbo.MSmerge_supportability_settings
        WHERE pubid = @pubid and subid = @subid and
            ((@web_server IS NULL and web_server IS NULL) or (@web_server IS NOT NULL and
            UPPER(web_server) collate database_default = UPPER(@web_server) collate database_default ))
    return (0)

 
Last revision 2008RTM
See also

  sp_MSdrop_rlrecon (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