TempDB Restrictions follow from how SQL Server recreates and uses this system database. I check them before applying user-database maintenance habits.

During an interview for an outsourcing project, I asked a candidate about TempDB restrictions. The question was worth sharing because temporary objects use familiar SQL syntax, while the database itself follows different operational rules.
Operations you can’t perform
- Adding filegroups.
- Backing up or restoring TempDB.
- Changing its collation or database owner.
- Creating a database snapshot or enabling Change Data Capture.
- Dropping the database or its guest user.
- Participating in database mirroring.
- Removing its primary filegroup, primary data file, or log file.
- Renaming the database or primary filegroup.
- Running DBCC CHECKALLOC or DBCC CHECKCATALOG.
- Setting the database OFFLINE, or the database or primary filegroup READ_ONLY.
The original list said TempDB was owned by dbo. The documented owner is sa; dbo is the database principal associated with database ownership. Don’t change the owner to match a teaching example.
What you can still configure
TempDB supports configurable files and growth settings, and several database options depend on the engine version. Adding data files differs from adding filegroups. Check current version documentation instead of treating every system-database option as fixed.
These restrictions don’t make TempDB unimportant. It supports temporary objects and internal work used throughout the workload. Which restriction has affected your troubleshooting?
Reference: TempDB reference.
TempDB is not a recovery copy of user data, it is a shared workspace recreated at startup.
Published by Pinal Dave on SQLAuthority. More of my work at pinaldave.com.
Discover more from SQL Authority with Pinal Dave
Subscribe to get the latest posts sent to your email.





4 Comments. Leave new
Hi,
In this article you mention Adding filegroups. is a restriction in TEMP DB. Recently in an interview some one asked me question on TEMP db is
1. What is the Maximum no of files can be added in temp db?
2. What is the minimum no of files can be added in temp db?
I search a lot but I got some where as many as possible, somewhere 8, somewhere two…..I fully confused.
Request you to clarify my doubt?
Regards,
Munia
I can see I have 8 temp dbs. That could be the correct answer.
Good.
Sir as i checked, We can’t changed recovery (Simple to any other) model as well . Default is simple