Hi there, ALTER DATABASE tempdb MODIFY FILE (name = tempdev, filename = 'G:\NewTempDB\tempdb.mdf') go ALTER DATABASE tempdb MODIFY FILE (name = templog, filename = 'G:\NewTempDB\templog.ldf') go If you need the logical names for the tempdb files run sp_helpfile You will need to alter where the mdf and ldf files are going. Once this has been completed you will need to restart SQL Server
Lets start from the beginning. 1. You need to create the G:\NewTempDB\ directory\folder (or whatever name you choose to move the files too). 2. After you created NewTempDB folder, then you need to right click -> properties -> security and add your SQL Service account, set full control permissions for it. 3. Now you can run the alter database command, make sure that the files end up in the created folder in the command. 4. Restart the SQL Service 5. Delete the old tempdb files on the C:\ drive **NOTE** Up to SQL 2008 R2 there is a local computer group named "SQLServerMSSQLUser$YOURSERVERNAME$MSSQLSERVER" (default instance), your SQL Service account is a member of this group. SQL uses this group for folder permissions, so the best choice is to add folder permissions to this group instead of the actual service account. The advantage of using this group is if you change your service account then you won't have to add permissions on the NewTempDB folder again for the new account.