Skip to content

Commit d84126b

Browse files
Merge pull request #75 from SpotOnDBA/patch-4
Update install_service_broker.sql
2 parents e7360e3 + 63ac069 commit d84126b

1 file changed

Lines changed: 7 additions & 3 deletions

File tree

setup/install_service_broker.sql

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -157,9 +157,13 @@ SET ANSI_NULLS ON;
157157
GO
158158

159159
SET QUOTED_IDENTIFIER ON;
160-
GO
160+
GO
161161

162-
CREATE PROCEDURE [dbo].[open_query_store_startup]
162+
IF NOT EXISTS (SELECT * FROM INFORMATION_SCHEMA.ROUTINES WHERE ROUTINE_NAME = 'open_query_store_startup')
163+
EXEC ('CREATE PROC dbo.open_query_store_startup AS SELECT ''stub version, to be replaced''')
164+
GO
165+
166+
ALTER PROCEDURE [dbo].[open_query_store_startup]
163167
AS
164168
-- This stored procedure is used to activate Open Query Store data collection using Service Broker
165169
-- The procedure is called at every SQL Server startup
@@ -172,4 +176,4 @@ GO
172176
EXEC [sys].[sp_procoption] @ProcName = 'dbo.open_query_store_startup',
173177
@OptionName = 'startup',
174178
@OptionValue = 'on'
175-
GO
179+
GO

0 commit comments

Comments
 (0)