Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

Can I capture data from a temp table (MS SQL)

Posted on 2014-09-04
4
Medium Priority
?
247 Views
Last Modified: 2014-09-05
We have a .Net application but are not privy to the source code.  This application makes use of a temporary table in an MS SQL database (2008, R2 soon to be upgraded).  The application drops the table upon completion of the routine.

Is there any way to capture the data from this table during its short life.  Since we cannot get to the source code, we cannot be in the same SQL session.  I suspect the answer is no, but want to leave no stone unturned.

Thanks.
0
Comment
Question by:g_johnson
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
4 Comments
 
LVL 66

Assisted Solution

by:Jim Horn
Jim Horn earned 800 total points
ID: 40305096
>This ( .Net ) application makes use of a temporary table in an MS SQL database (2008, R2 soon to be upgraded).
Ok, I'll bite.   Why the hell's that??

>Is there any way to capture the data from this table during its short life.
Local temp tables (prefixed with #)are ONLY in scope during the execution of the specific script that executes it (SP, function), so you can't access it from another session.   Global temp tables ## I believe can be accessed outside of the proc that created it, but I've never done that so you'll have to test it to be sure.
0
 
LVL 11

Assisted Solution

by:HuaMinChen
HuaMinChen earned 400 total points
ID: 40305124
The answer is no unless you can adjust the source codes to also put the recordset into one other permanent table.
0
 
LVL 52

Accepted Solution

by:
Vitor Montalvão earned 800 total points
ID: 40305626
Only if they use a physical table during the process and drop it after. What I think is not the case but you can find it easily by running a SQL Profiler over the database and capture all SQL statements.
Even that you won't catch the data you'll catch the T-SQL code which can give you a good idea of what they are doing.
Imagine that they are loading data from another table, so you will be able to catch the SELECT that they are using for importing the data and then you can use it by yourself.
0
 
LVL 4

Author Closing Comment

by:g_johnson
ID: 40305735
Thank you all.
0

Featured Post

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Use this article to create a batch file to backup a Microsoft SQL Server database to a Windows folder.  The folder can be on the local hard drive or on a network share.  This batch file will query the SQL server to get the current date & time and wi…
This article aims to explain the working of CircularLogArchiver. This tool was designed to solve the buildup of log file in cases where systems do not support circular logging or where circular logging is not enabled
This course is ideal for IT System Administrators working with VMware vSphere and its associated products in their company infrastructure. This course teaches you how to install and maintain this virtualization technology to store data, prevent vuln…
This is my first video review of Microsoft Bookings, I will be doing a part two with a bit more information, but wanted to get this out to you folks.

715 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question