Home Microsoft SQL Server DigiMailing iRN Contact
    Keyword



sys.sp_MScheckprocexec

  No additional text.


Syntax


-- Name:
--		sp_MScheckprocexec

-- Description:
--		Checks to see if 'proc exec' should be disabled, the following conditions will cause the disable:
--		1. CDC enabled database
--		2. if any table in the database is in initiated state
-- 	
-- Parameters:
--	 	See the procedure definition.

-- Returns:
--		0 - succeeded
--      1 - failed

-- Result:
--		None

-- Security: public procedure
--	no security check as this is in user 'proc exec' code path and it does not expose any useful information

create procedure sys.sp_MScheckprocexec
(
	@fDisableProcExec				bit output
)
as
begin
	declare @retcode int

	select @fDisableProcExec = sys.fn_cdc_is_db_enabled()
	if @fDisableProcExec = 1
		return (0)
		
	-- only retrieve the data if the database is published. return
	-- error since this should not be called on non-published db
	if sys.fn_MSrepl_istranpublished(db_name(),0) != 1
    begin
		select @fDisableProcExec = 0
		return 1
    end

	-- check if any subscription is in initiated mode
    if exists (select *
				from syssubscriptions
				where status & 0x3 = 0x3)
	begin
		select @fDisableProcExec = 1
	end

    return 0
end

 
Last revision 2008RTM
See also

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