Click here to monitor SSC
SQLServerCentral is supported by Red Gate Software Ltd.
 
Log in  ::  Register  ::  Not logged in
 
 
 
        
Home       Members    Calendar    Who's On


Add to briefcase

Need to list all columns,table names used in T-SQL Query Expand / Collapse
Author
Message
Posted Monday, September 17, 2012 3:10 PM
Valued Member

Valued MemberValued MemberValued MemberValued MemberValued MemberValued MemberValued MemberValued Member

Group: General Forum Members
Last Login: Tuesday, May 21, 2013 5:13 PM
Points: 56, Visits: 201
Hi All,

Recently we are planning to do some schema level changes to few tables, so now i have to find out all the depended scripts/SSRS reports/SSIS packages which are using those columns.
we have around 60 reports and around 20+ T-SQL scripts.

As its regular task as part of dev cycle my manager asked me to create report with all Object References to packages/SSRS

To be more clear the Object references report will have below fields

BI Type Name TableNames ColumnNames
SSRS Report1 SimpleTable1 Col1,Col2,COl3
SSRS Report1 SimpleTable2 COl4,Col5,COl7
SSIS Package1 Table5 Col6,Col1

Please let me know if there is any automated way to find reference fileds.

I know there is way to find out related tables in a Stored procedure but is there any way i can find column names also ?

Regards,
Krish
Post #1360469
Posted Tuesday, September 18, 2012 6:54 PM


SSCrazy

SSCrazySSCrazySSCrazySSCrazySSCrazySSCrazySSCrazySSCrazy

Group: General Forum Members
Last Login: Yesterday @ 6:03 AM
Points: 2,345, Visits: 3,191
That's going to be quite a challenge if it is possible at all.

You might want to look at this recent thread: http://www.sqlservercentral.com/Forums/Topic1351799-392-1.aspx

Look for the suggestion by Eugene Elutin to generate and parse the XML query plan. It may be possible to do what you want to do that way, then again maybe not.

And by all means, pay homage to Mona at the end.



No loops! No CURSORs! No RBAR! Hoo-uh!

INDEXing a poor-performing query is like putting sugar on cat food. Yeah, it probably tastes better but are you sure you want to eat it?

Need to UNPIVOT? Why not CROSS APPLY VALUES instead?
Since random numbers are too important to be left to chance, let's generate some!
Are you too recursively challenged?
Splitting strings based on patterns can be fast!
Post #1361073
Posted Tuesday, September 18, 2012 8:19 PM


SSC-Insane

SSC-InsaneSSC-InsaneSSC-InsaneSSC-InsaneSSC-InsaneSSC-InsaneSSC-InsaneSSC-InsaneSSC-InsaneSSC-InsaneSSC-Insane

Group: General Forum Members
Last Login: Yesterday @ 11:07 PM
Points: 21,625, Visits: 27,468
Duplicate post. Please post all further responses here.

Please, don't make duplicate posts, it just fragments your answers to your questions. Most people that help here either subcribe to specific forums, or use the Recent Posts or Active Threads links to monitor questions.



Lynn Pettis

For better assistance in answering your questions, click here
For tips to get better help with Performance Problems, click here
For Running Totals and its variations, click here or when working with partitioned tables
For more about Tally Tables, click here
For more about Cross Tabs and Pivots, click here and here
Managing Transaction Logs

SQL Musings from the Desert Fountain Valley SQL (My Mirror Blog)
Post #1361094
« Prev Topic | Next Topic »

Add to briefcase

Permissions Expand / Collapse