Solved

temp table belongs only to @@SPID?

Posted on 2011-02-25
6
306 Views
Last Modified: 2012-06-21
I created a temp table, but another user is not able to go to tempdb and see the table- how can I  help her to see the table?

thanks
0
Comment
Question by:anushahanna
[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
  • 3
  • 3
6 Comments
 
LVL 41

Accepted Solution

by:
ralmada earned 500 total points
ID: 34980432
No, I don't think that's possible. I would suggest you create a regular table if you want multiple users to access it.
0
 
LVL 6

Author Comment

by:anushahanna
ID: 34980572
OK- so even though it is in tempdb, it will show up only in the original SPID - if you happen to close that window, then even the author can never reach it?
0
 
LVL 41

Assisted Solution

by:ralmada
ralmada earned 500 total points
ID: 34980803
Yes, that's right. One the session is closed, you cannot retrieve it.

Just to clarify, you have two types of temp tables. local temp tables, that are only accesible in the module it was created, and global temp table that are accessible only in the session that creates them. That means that no other sessions (for example another user logged in) can access it.

0
Comparison of Amazon Drive, Google Drive, OneDrive

What is Best for Backup: Amazon Drive, Google Drive or MS OneDrive? In this free whitepaper we look at their performance, pricing, and platform availability to help you decide which cloud drive is right for your situation. Download and read the results of our testing for free!

 
LVL 6

Author Comment

by:anushahanna
ID: 34982654
you  mean #temp and ##temp, right? ## is global?
0
 
LVL 41

Expert Comment

by:ralmada
ID: 34982736
yes, that's right :)
0
 
LVL 6

Author Comment

by:anushahanna
ID: 34982819
thanks as always, ralmada.
0

Featured Post

Visualize your virtual and backup environments

Create well-organized and polished visualizations of your virtual and backup environments when planning VMware vSphere, Microsoft Hyper-V or Veeam deployments. It helps you to gain better visibility and valuable business insights.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
SQL Server Database Inventory 7 30
SQL Server sp_executesql / Change Tracking Version() results into variable 4 30
Search Text in Views 2 28
SQL Job Failed 6 31
Slowly Changing Dimension Transformation component in data task flow is very useful for us to manage and control how data changes in SSIS.
International Data Corporation (IDC) prognosticates that before the current the year gets over disbursing on IT framework products to be sent in cloud environs will be $37.1B.
Familiarize people with the process of retrieving data from SQL Server using an Access pass-thru query. Microsoft Access is a very powerful client/server development tool. One of the ways that you can retrieve data from a SQL Server is by using a pa…
Viewers will learn how to use the SELECT statement in SQL to return specific rows and columns, with various degrees of sorting and limits in place.

751 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