I currently have a Windows 2003 server installed with SQL Server 2000 and 2005 on it.
We have the disk partitioned in two:
C:
contains the operating system and applicationsE:
contains the DB files
I need to reinstall the server due to license changes, and reinstall the databases as well. Is it possible to do this:
- Reinstall Windows on
C:
- Reinstall SQL Server 2000 and 2005 (ok, maybe only 2005)
- Reattach all the DBs and have the server work as if nothing had happened to it.
From a 10,000 foot view, yes this is possible.
From a 1 foot view you'll need to account for things like: the server name, the server ip address, SQL logins, local user accounts, backing up and restoring the databases, etc., etc.
Ensure you backup all the databases (including the system databases except TempDB).
Then once Windows and both SQL Server's are install you restore the databases. By restoring master you will also restore server level objects (like logins).
When you restore a database you can specify different locations for the files (if you need to).
MSDN (and probably technet: SQL Server Books online seem to be on both) include lots of details.