Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

where is SP_EXECUTESQL defined?

The 'SP_' prefix by convention suggests a system stored procedure. But nowhere in my SQL Server instance could I find the sp_executesql stored procedure.

I know it is there because it is used by one of my workplace's legacy code. But where is it? Where can I find it using MS SQL Server Management Studio?

like image 428
datps Avatar asked Feb 03 '16 17:02

datps


3 Answers

Where can I find it using MS SQL Server Management Studio?

master --> Programmability --> Extended Stored Procedures --> System Extended Stored Procedures

It is an extended stored procedure and you can't do anything useful with it having found it though (apart from managing permissions).

like image 128
Martin Smith Avatar answered Sep 20 '22 16:09

Martin Smith


master --> Programmability --> Extended Stored Procedures --> System Extended Stored Procedures

like image 34
Johnny Bones Avatar answered Sep 20 '22 16:09

Johnny Bones


It is present there , if you execute this query `sp_helptext sp_executesql you will get (Server Internal) because "sp_helptext" is a extended stored procedures so you cannot see it. They are processed in a dll rather than TSQL.. Refer this link https://technet.microsoft.com/en-us/library/ms175200%28v=sql.105%29.aspx

like image 24
Debanjan Avatar answered Sep 21 '22 16:09

Debanjan