July 20, 2009 at 9:20 am
HI
What is the Use of On-Line,Off-Line in ms sql.
Whether it can be used to reduce the TempDb Size by bringing TempDb to Offline and then Online(Is it is Possable to move TempDb OffLine)
Thanks
Parthi
July 20, 2009 at 9:43 am
parthi (7/20/2009)
HIWhat is the Use of On-Line,Off-Line in ms sql.
Whether it can be used to reduce the TempDb Size by bringing TempDb to Offline and then Online(Is it is Possable to move TempDb OffLine)
I take database offline when i don't want people to connect to it...But i may want to bring it backonline at some point...for example if i migrate a database between servers or take a database to a new version. I don;t want anyone connecting to the old database but i might want to revert back to it if something goes awry and i want to revert back to old database
I don't think you can take system databases offline, including tempdb
Gethyn Elliswww.gethynellis.com
July 20, 2009 at 10:01 am
If the question was urgent (as you stated), you should have checked Books Online. It's faster than waiting for someone to reply.
Books Online:
OFFLINE
The database is closed, shut down cleanly, and marked offline. The database cannot be modified while it is offline.
ONLINE
The database is open and available for use.
You can't set that option on TempDB. The TempDB database must always be available while the service is running.
If you try, you'll get an error:
Msg 5058, Level 16, State 4, Line 1
Option 'OFFLINE' cannot be set in database 'tempdb'.
Gail Shaw
Microsoft Certified Master: SQL Server, MVP, M.Sc (Comp Sci)
SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability
July 20, 2009 at 10:04 am
I use it for the same reasons, but I don't believe you can do this with tempdb.
tempdb is used for all sorts of operations in databases. If you take tempdb offline, likely it's the same as taking the application databases offline. Things will stop working.
Viewing 4 posts - 1 through 3 (of 3 total)
You must be logged in to reply to this topic. Login to reply