How to get a copy of tempdb.mdf

I want to get a copy of current tempDB.mdf, But it cannot use detach or backup methos against tempDB, while copying file, it says it is being used. How would I get it? thanks.
shirleyz8821Asked:
Who is Participating?
 
Guy Hengel [angelIII / a3]Billing EngineerCommented:
I see.

you cannot do that. you can only "look" into the tempdb being connected to the current db, so your vendor has to connect on your instance.
0
 
Guy Hengel [angelIII / a3]Billing EngineerCommented:
stop sql server, and copy the file.

but why do you want to copy that file?
0
 
shirleyz8821Author Commented:
because it is growing houg and run out of space. The vender want to see the tempDB.mdf, I think when stop sql server, the tempDB will downsize to the default size which is 8M. How to get the current huge one(tempDB.mdf)?
0
Ultimate Tool Kit for Technology Solution Provider

Broken down into practical pointers and step-by-step instructions, the IT Service Excellence Tool Kit delivers expert advice for technology solution providers. Get your free copy now.

 
shirleyz8821Author Commented:
Thanks angelIII, how to trace/track queries to find out which makes large tempDB? (sql 2000)
0
 
Guy Hengel [angelIII / a3]Billing EngineerCommented:
0
 
shirleyz8821Author Commented:
Thank you again, I am looking for a script which runs a trace (scheduled script) which will track the queries that are causing tempdb to grow. Pls advice.. wait online.
0
 
shirleyz8821Author Commented:
I re-create a ticket and give you the point to you on my first question.
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.