5

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?

datps
  • 768
  • 1
  • 6
  • 16

3 Answers3

15

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).

Martin Smith
  • 438,706
  • 87
  • 741
  • 845
3

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

Johnny Bones
  • 8,786
  • 7
  • 52
  • 117
3

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

Debanjan
  • 69
  • 1
  • 8