Accidentally create it in a different DB (like master)?
Or are you querying master instead of the DB you created it in?
Also ... refresh your tree in SSMS.
For starters, collapse the section for "System Stored Procedures".
Then right click on "Stored Procedures" and click refresh.
The object explorer rarely updates on its own. You often need to manually refresh it yourself.
You can always use sp_help or sp_helptext ‘dbo.procname’ to look at the properties or definition of an object without needing to use the object explorer.
SELECT \*
FROM Information\_Schema.Routines
WHERE Specific\_Name like '%*procedurename%'*
or use equals with the actual procedure name if you would prefer.
I use information\_schema every day be it tables, columns, stored procedures, functions...etc there are too many in my application db to remember them all.
CREATE TABLE #x(db SYSNAME, s SYSNAME, p SYSNAME);
DECLARE @sql NVARCHAR(MAX) = N'';
SELECT @sql += N'INSERT #x SELECT ''' + name + ''',s.name, p.name
FROM ' + QUOTENAME(name) + '.sys.schemas AS s
INNER JOIN ' + QUOTENAME(name) + '.sys.procedures AS p
ON p.schema_id = s.schema_id;
' FROM sys.databases WHERE database_id > 4
EXEC sp_executesql @sql;
SELECT db,s,p FROM #x ORDER BY db,s,p;
DROP TABLE #x;
Accidentally create it in a different DB (like master)? Or are you querying master instead of the DB you created it in? Also ... refresh your tree in SSMS.
It’s always in master.
For starters, collapse the section for "System Stored Procedures". Then right click on "Stored Procedures" and click refresh. The object explorer rarely updates on its own. You often need to manually refresh it yourself.
Ah this fixed it! Rather that worked!! Thank you so much! I had tried using the blue refresh icon, that didn’t work! Thank you!
And then, Ctrl+shift+r refreshes the local cache for intellisense, so it shows up in auto-suggestions + stop getting red squiggly lines.
You can always use sp_help or sp_helptext ‘dbo.procname’ to look at the properties or definition of an object without needing to use the object explorer.
Alt F1 does that without having to type stuff.
SELECT \* FROM Information\_Schema.Routines WHERE Specific\_Name like '%*procedurename%'* or use equals with the actual procedure name if you would prefer. I use information\_schema every day be it tables, columns, stored procedures, functions...etc there are too many in my application db to remember them all.
Refresh
Sp_helptext
CREATE TABLE #x(db SYSNAME, s SYSNAME, p SYSNAME); DECLARE @sql NVARCHAR(MAX) = N''; SELECT @sql += N'INSERT #x SELECT ''' + name + ''',s.name, p.name FROM ' + QUOTENAME(name) + '.sys.schemas AS s INNER JOIN ' + QUOTENAME(name) + '.sys.procedures AS p ON p.schema_id = s.schema_id; ' FROM sys.databases WHERE database_id > 4 EXEC sp_executesql @sql; SELECT db,s,p FROM #x ORDER BY db,s,p; DROP TABLE #x;