Home Microsoft SQL Server DigiMailing iRN Contact
    Keyword



sys.sp_dbmmonitorchangemonitoring

  No additional text.


Syntax
create procedure sys.sp_dbmmonitorchangemonitoring
(
    @parameter_id		int,	-- There is only one parameter_id now.  1 = update period in minutes.
    @value				int
)
as
begin
	set nocount on
	if (is_srvrolemember( N'sysadmin') <> 1 )
        begin
			raiserror(21089, 16, 1)
			return 1
		end

	declare @retcode		int,
			@schedname		nvarchar( 256 )

	select @schedname = isnull( formatmessage( 32048 ), N'Database Mirroring Schedule' )

	if (@parameter_id < 1 OR @parameter_id > 1)
		begin
			raiserror( 32036, 16, 1 )
			return 1
		end

	if (@parameter_id = 1) -- kind of a redundant check
		begin
		-- validate update_period to make sure that it is a reasonable number. 1-120 minutes for now.
		-- do not forget to keep this in synch with the add sp.
		if (@value < 1 or @value > 120)
		begin
 			raiserror ( 32032, 16, 1, @value)	-- specific message for the update period.
			return( 1 )
		end
		exec @retcode = msdb.dbo.sp_update_schedule
			@name = @schedname,
			@freq_type = 4,						-- Daily
			@freq_interval = 1,					-- Every 1 days
			@freq_subday_type = 4,				-- Based on Minutes
			@freq_subday_interval =	@value		-- interval
		end

	if ( @@error != 0 OR @retcode != 0 )
		begin
			raiserror( 32035, 16, 1 )
			return 1
		end

	return 0
end

 
Last revision 2008RTM
See also

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