Hi,
Can you afford a SQL Server service restart? Tempdb is recreated at =
every restart.If so, you can execute the below code thus moving tempdev =
and templog to e: drive, restart the server and then delete tempdev2 by =
doing ALTER DATABASE tempdb REMOVE FILE( which will be empty anyway)
<begin quote>
Moving Tempdb
You can move tempdb files by using the ALTER DATABASE statement.=20
1.. Determine the logical file names for the tempdb database by using =
sp_helpfile as follows:
use tempdb
go
sp_helpfile
go
The logical name for each file is contained in the name column. =
This example uses the default file names of tempdev and templog.=20
2.. Use the ALTER DATABASE statement, specifying the logical file name =
as follows:
use master
go
Alter database tempdb modify file (name =3D tempdev, filename =3D =
'E:\Sqldata\tempdb.mdf')
go
Alter database tempdb modify file (name =3D templog, filename =3D =
'E:\Sqldata\templog.ldf')
go
You should receive the following messages confirming the change:=20
File 'tempdev' modified in sysaltfiles. Delete old file after =
restarting SQL Server.
File 'templog' modified in sysaltfiles. Delete old file after =
restarting SQL Server.=20
3.. Using sp_helpfile in tempdb will not confirm these changes until =
you restart SQL Server.=20
4.. Stop and restart SQL Server.
<end quote>
The above snippet is from :
INF: Moving SQL Server Databases to a New Location with Detach/Attach
http://support.microsoft.com/defaul...b;en-us;Q224071
Sandeep
******************************************************
Sandeep Kataria
University of Minnesota Cancer Center,
Suite 310 Dinnaken Office Building,
925 Delaware St. SE
Telephone: (612) 624-3994 | Fax: (612) 624 1057
Email: [Email Address Removed]
******************************************************
PRIVACY & CONFIDENTIALITY NOTICE: This e-mail message, including any
attachments, is for the sole use of the intended recipient(s) and may
contain business confidential and privileged information. Any unauthorized
review, use, disclosure or distribution is prohibited. If this e-mail was
not intended for you, please notify the sender by reply e-mail that you
received this in error. Destroy all copies of the original message and
attachments.
MS Sql Server LazyDBA home page