Moving tempdb to new luns on mount points

  • We're going to move our 8 tempdb data files to separate luns. I thought I could create all of them with new names on the new luns, restart sql, then drop the originals. ( thinking that's safer than the usual approach. I was concerned about sql not starting if it couldn't find the new files ) But you can't remove the primary mdf.

    So I can create 7 of the new "ndf" files, verify via xp_cmdshell that sql can in fact see the new lun where the primary data file ( MDF ) goes. Then run the command below to tell sql where to recreate the primary data file, and restart sql.

    ALTER DATABASE tempdb

    MODIFY FILE (NAME = tempdev, FILENAME = 'K:\split_data\CM_TempDBData1\tempdb.mdf')

  • Sounds like a round about way to do this. You could just create a small test database on the new drives. If it works SQL can see it and you can delete it. Then do the ALTER database for all the TempDB files (MDF, NDF & LDF if you want), then restart SQL.

    Cheers

    Leo

    Leo
    Nothing in life is ever so complicated that with a little work it can't be made more complicated.

  • Excellent idea Leo !

Viewing 3 posts - 1 through 2 (of 2 total)

You must be logged in to reply to this topic. Login to reply