How to find if a stored procedure exists in the database

book

Article ID: 34598

calendar_today

Updated On:

Products

DX Infrastructure Management NIMSOFT PROBES

Issue/Introduction

Introduction:

A current case required an SQL query to find a missing stored procedure. Following qeury can be used to find if a stored procedure exists in the database.



Procedure:

select * from <SLM Database name>.information_schema.routines
where routine_type = 'PROCEDURE' and specific_name like 'name of stored procedure you are looking for%';

For example:

select * from nimsoftslm.information_schema.routines
where routine_type = 'PROCEDURE' and specific_name like 'spn_GetQosData%';


If a given stored procedure is missing where in that particular of NMS version it was supposed to be present, then there is a fair chance that an installation or an upgrade hasn't successfully completed.

Environment

Release: CNMSPP99000-8.47-Unified Infrastructure Mgmt-Server Pack-- On Prem
Component: