Ah, ok, then the original problem is thus:
I need to shrink it when the volume tempdb resides on is not available, so
my original solution was:
A) start sql
E:\MSSQL\Binn>sqlservr.exe -f -T3608
B) Change location
use master
go
Alter database tempdb
modify file (name = tempdev, filename = 'e:\mssql\data\tempdb.mdf')
go
Alter database tempdb
modify file (name = templog, filename = 'f:\mssql\data\templog.ldf')<NOTE:
HERE YOU CANNOT SHRINK IT BECAUSE ALTER FILE WILL NOT LET YOU....>lastly:
> Hi,
> ..If 100GB tempdb size is okay with you, then its fine :-).I didnt track
> the thread all the way back and thus I missed the original request.
> You can get more details about alter file command in this article :
> HOW TO: Shrink the Tempdb Database in SQL Server
> http://support.microsoft.com/default.aspx?scid=kb;en-us;307487
> --
> Dinesh.
> SQL Server FAQ at
> http://www.tkdinesh.com
> > trees... forest. The tempdb size is not the problem to solve. Pick any
> > size of tempdb.
> > I'm really just looking for a solution to the original problem, that is,
> > shrinking tempdb while the volume is unavailable.
> > I'm thinking using alter file to change the location, stoppping it, and
> then
> > restarting sqlservr.exe -c -f to force it back to 1 MB, then doing
alter
> > file... that MIGHT work, I'll do some testing. That would at least be a
> > supported option.
> > > Hi,
> > > In that case, some denormalization would help reduce the number of
joins
> > and
> > > thus minimise tempdb usage.
> > > --
> > > Dinesh.
> > > SQL Server FAQ at
> > > http://www.tkdinesh.com
> > > > Aaron, it's a data warehouse - 100GB tempdb is required because
that's
> > the
> > > > size of sorts a variety of queries need to do. It has nothing to
do
> > with
> > > > "an application's" use of tempdb, the space used in TEMPDB is
> dominated
> > by
> > > > sql server using it to perform sorts for very very very large
queries
> > > (like
> > > > 1B rows)
> > > > > I'm just curious why you (think you) need 100 gb of tempdb space.
> > That
> > > > > seems like either overly cautious or a system that relies far too
> > > heavily
> > > > on
> > > > > tempdb...
> > > > > > Well, it's either that or suffer the pain of growing it after
> every
> > > > > restart.