Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2000 Forums
 SQL Server Development (2000)
 Need user set in tempdb to use tempdb.information_schema.columns in a sp inside my own db?

Author  Topic 

AskSQLTeam
Ask SQLTeam Question

0 Posts

Posted - 2004-03-15 : 08:17:51
Pip writes "Hi there,

I am newbe in using temp tables in SQL Server. I have read a number of documents about temp tables (different btw # and ##) in tempdb. 1 thing I am still confused is whether we need to be a "user" in tempdb in order to create/use ## temp tables.

The situation is I have a connection to my own db, I have few stored procedures to create ## temp tables. Inside one of the sp, I need to use "FROM tempdb.information_schema.colums" for some reasons. Now, I am experiencing if I don't set up my login as a user in tempdb, I would get an error. If I set it up, everything runs ok. I'm wondering we need to set up users in order to use temp tables or grab tempdb information in tempdb.

Thanks"

tkizer
Almighty SQL Goddess

38200 Posts

Posted - 2004-03-15 : 12:24:40
You do not need access to create temporary tables. But when you call INFORMATION_SCHEMA views in the tempdb database, then yes you are going to need access. Are you running dynamic sql and need to know what was done?

Tara
Go to Top of Page
   

- Advertisement -