1

I need to reverse engineer are report from a third party application into SSRS, so that I can make some changes for our users.

I have captured the SQL that is used by the report, however the query references a Global Tempory Table that seems to be created at some point during the parameter entry, and dropped when the parameter screen is closed.

I have set Profiler to capture every event with no filters at all but still cannot find the table name anywhere except the query that accesses it.

I have tested creating and dropping my own tempory tables and this shows up in Profiler as expected.

Does anyone know why I cannot capture the SQL used to create this table?

FYI: the Database is 2005, but I'm using 2008 tools

1 Answer 1

1

Although this application uses alot of inline SQL, the temp table is beign created within a stored proc.

This query found the stored procs that create the tables.

select O.[name], left(c.[Text], 1000) as Text, left(o.name, 1000) as sp_sort
From sysComments c
  inner join sysobjects o
        on o.id = c.id
where c.[text] like '%##TABLENAME%'

And one of those was soon found in the profiler listing.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .