Quantcast
Channel: SQLServerCentral » SQL Server 2014 » Administration - SQL Server 2014 » Latest topics
Viewing all articles
Browse latest Browse all 6525

Execute Proc at Startup Question

$
0
0
We are having an issue with our SQL 2014 server where the Linked Server to our AS400 does not connect after a restart. Apparently this is some quirky bug that can be fixed by running the sp_enum_oledb_providers system proc. I want to execute this at SQL startup. I will use the following script:[code="sql"]USE [master]GOSET ANSI_NULLS ONGOEXEC sp_configure 'show advanced option', '1';RECONFIGUREEXEC sp_configure 'scan for startup procs', '1';RECONFIGUREGOSET QUOTED_IDENTIFIER ONGOCREATE PROC [dbo].[usp_enum_oledb_providers]ASexec sp_enum_oledb_providersGOsp_procoption 'usp_enum_oledb_providers', 'startup', 1[/code]My change management guy is asking what my rollback plan is. I think I would just turn the auto-execution off with sp_procoption. That assumes that SQL starts and such a change can be made. In this case the startup proc is very simple and is calling a Microsoft system proc. It is very unlikely that it would fail. But my question is, what happens if a proc marked for execution at startup fails? Does it interfere with the startup of SQL in general? Or does SQL just report the error and continue on.

Viewing all articles
Browse latest Browse all 6525

Trending Articles