Updating SQLEXPRESS from 2005 to 2008 R2

  • Hi, I've installed SQL Server 2008 R2 but when I connect to my local instance of SQLEXPRESS it is still using the data sources from 2005 and won't allow me to attach newer databases. Essentially, how do I redirect it to use \Microsoft SQL Server\MSSQL10_50.SQLEXPRESS\MSSQL\Data instead of \Microsoft SQL Server\MSSQL.1\MSSQL\Data?

  • To move the existing database files?

    Run ALTER DATABASE dbname MODIFY FILE (NAME = 'logicalname', FILEPATH = N'new_location')

    Take the database offline, move the files, then bring the db back online.

    More info here: http://msdn.microsoft.com/en-us/library/ms189133(v=sql.105).aspx

    You can change default data & log file locations for new db's in the Server properties screen in SSMS.

    Not sure about "won't allow me to attach newer databases." - what's happening when you try?

    Thanks

    Gaz

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

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