December 13, 2011 at 8:01 am
Is there a tool out there that can take me to the definition (SQL) of an object by right-clicking it in SSMS and selection Go To Definition? I have lots os stored procedures and user-defined functions. Sometimes, I'm viewing the SQL of a stored procedure and it calls another procedure or UDF. I hate the Object Explorer, because it takes too long to find the object when you have hundreds. Does something like this already exist?
December 13, 2011 at 8:08 am
Ray Cacciatore (12/13/2011)
Is there a tool out there that can take me to the definition (SQL) of an object by right-clicking it in SSMS and selection Go To Definition? I have lots os stored procedures and user-defined functions. Sometimes, I'm viewing the SQL of a stored procedure and it calls another procedure or UDF. I hate the Object Explorer, because it takes too long to find the object when you have hundreds. Does something like this already exist?
I don't think so, but it's a great idea. Suggest it to RedGate for their SQL Prompt product.
- Gus "GSquared", RSVP, OODA, MAP, NMVP, FAQ, SAT, SQL, DNA, RNA, UOI, IOU, AM, PM, AD, BC, BCE, USA, UN, CF, ROFL, LOL, ETC
Property of The Thread
"Nobody knows the age of the human race, but everyone agrees it's old enough to know better." - Anon
December 13, 2011 at 8:16 am
Red Gate has the dependency tool that will allow you to find out what is linked to what.
However if you are expecting to right click on an piece of code in the query window and have that jump to the source code of the object, there's nothing like that.
December 13, 2011 at 8:16 am
GSquared (12/13/2011)
Ray Cacciatore (12/13/2011)
Is there a tool out there that can take me to the definition (SQL) of an object by right-clicking it in SSMS and selection Go To Definition? I have lots os stored procedures and user-defined functions. Sometimes, I'm viewing the SQL of a stored procedure and it calls another procedure or UDF. I hate the Object Explorer, because it takes too long to find the object when you have hundreds. Does something like this already exist?I don't think so, but it's a great idea. Suggest it to RedGate for their SQL Prompt product.
Wait for the tool & meanwhile try following in another SSMS window...
sp_help [ [ @objname = ] 'name' ]
AND
sp_helptext [ @objname = ] 'name' [ , [ @columnname = ] computed_column_name ]
December 13, 2011 at 8:16 am
There is a free SQL Search tool from Red Gate that will integrate into SSMS and let you quickly search for objects.
Disclosure: I work for Red Gate
December 13, 2011 at 8:21 am
SQL Prompt will already do this somewhat. Right click, script object as alter. An alter script with the object will be created in a new tab.
December 13, 2011 at 8:24 am
Red Gate's SQL prompt will show code when you hover over an object.
If you have exec MyStoredProc you can hover over the proc name, right click and see the code. You can also copy it to the clipboard.
Here is a screen shot:
http://www.red-gate.com/products/sql-development/sql-prompt/images/object-hover-schema.png
December 13, 2011 at 8:34 am
Another option is to change one of the keyboard shortcuts to sp_helptext in SSMS; that's free, which is closer to my usual budget.
for example, in the screenshot below, i'm calling a variety of different functions like you describe, but via keyboard commands instead of right click>>SomeFunctionality.
so within a script i'm reviewing in SSMS, if i highlight a function MyFunction, and click Control + 3 , i get the definition of the object as query results in the current window.
my getDDLa simply does sp_helptext for any regular object, or spits out the CREATE TABLE definition if it was a table.
you could add sp_helptext to one of your keyboard commands and be good to go.
Lowell
December 13, 2011 at 8:46 am
Lowell (12/13/2011)
Another option is to change one of the keyboard shortcuts to sp_helptext in SSMS; that's free, which is closer to my usual budget.for example, in the screenshot below, i'm calling a variety of different functions like you describe, but via keyboard commands instead of right click>>SomeFunctionality.
so within a script i'm reviewing in SSMS, if i highlight a function MyFunction, and click Control + 3 , i get the definition of the object as query results in the current window.
my getDDLa simply does sp_helptext for any regular object, or spits out the CREATE TABLE definition if it was a table.
you could add sp_helptext to one of your keyboard commands and be good to go.
That’s a good idea for guys who have limited budget (like me). Thanks!
Viewing 9 posts - 1 through 8 (of 8 total)
You must be logged in to reply to this topic. Login to reply