Migrating a box with SQL server 2008 from Win 7 to Win 10: SSMS prep required?

  • I am running SQL Server 2008 on a Windows 7 machine.  I just use the databases locally; don't have external users or other programs connecting.  I need to upgrade to Windows 10 before year end because Microsoft are stopping Windows 7 security updates from  January.

    I've been reluctant to do so because of the work involved, other time  commitments.  I haven't previously upgraded a Windows box running T-SQL databases and SSMS before.

    I understand that my C: will get wiped during the upgrade.  I had a few questions, would be grateful to hear from anyone who has done this previously:

    1. I don't have any of the database files that I created on C:.  However my System databases like master.mdf etc. are on C:.  If C: will be wiped, I assume that means I need to move all of those before upgrading to Windows 10 or after the upgrade SSMS won't be able to run my databases as before.  Is that correct?
    2. Will my SQL Server 2008 licence be migrated or do I need to find my old licence key?
    3. What about the  install files?  I guess I need to find those?
    4. When I open SSMS I'm presented with a 'Connect to Server' login dialogue where I authenticate using SQL server authentication and a username and password.  It's a database that isn't accessed by other programs or users or from other machines.  Just all local access by me through SSMS.  Is there any other authentication I need to be thinking about preserving authentication keys or passwords for?
    5. Does anyone have a checklist or walkthrough of other items that I need to be thinking about for this upgrade?

     

    Maybe it's all going to be easy and will just work, but if it isn't I'm hoping to identify any time sink landmines that I can avoid in advance of stepping on them during the upgrade process.

  • Step 1 is going to be to upgrade your SQL Server unfortunately.

    https://social.technet.microsoft.com/Forums/en-US/4fdede66-c47e-4c88-8e39-4f63dad29a03/can-you-install-sql-server-2008-on-windows-10

    SQL Server 2008 and 2008 R2 are not supported on Windows 10 or Windows Server 2016.

    IF the SQL instance is being used for testing and/or development, you could migrate it over to a SQL Server 2017 Developer edition and migrate your databases onto that?  If this is NOT for testing/development and the databases are under 10 GB in size, you could use Express.  Either way, you will need to upgrade the SQL instance before or after you do the OS upgrade; and in my opinion, this will be a LOT easier to do before the OS upgrade... except SQL Server 2017 doesn't support Windows 7.

    That being said, when I upgraded from 7 to 10 on my home machine, I didn't have any drives wiped; everything I had installed stayed installed.

    So my steps for this "upgrade" would be:

    PRELIMINARY STEP - determine which version of SQL Server you NEED.  If you can get by with Express, download a copy of Express.  If it is for testing/development only, grab a copy of Developer.  If it is for production use, buy a license for 2017 at the level you require (standard/enterprise).

    1 - do a full backup of ALL SQL databases (user and system) and store them in a good location

    2 - run DBCC CHECKDB on ALL of the SQL databases (user and system) to make sure you have no corruption

    3 - IF you have any errors or corruption, correct that and repeat steps 1 and 2 until you have no corruption or errors

    4 - stop the SQL instance and set the SQL instance startup to be manual (this is just in case the drives don't get wiped)

    5 - make sure your most recent backup is NOT on the C drive and, if possible, unplug that drive to prevent accidental deletion with windows upgrade/install

    6 - Upgrade to Windows 10 and plug the drive with the backups back in (if you unplugged it)

    7 - Install SQL 2017

    8 - restore the backup of all system databases, with NEW names and NEW locations, which should result in them being upgraded.  These will be moved later.

    9 - Once ALL of the system databases are restored, restore the user databases overwriting the user databases you had on disk before.

    10 - sop the SQL instance

    11 - back up the current system databases to a safe location (you should not need them, but I like to have a roll back point to go to just in case)

    12 - copy the system databases with the new names to the location of the current system databases and rename them to match what the system databases SHOULD be

    13 - start the SQL instance and cross your fingers

    If all went well, it should start up and automatically Mount the user databases.  If things went sideways, begin troubleshooting.  If the user databases didn't Mount, manually Mount them.  If it fails to start, delete the current system databases and put the default ones back.

    In the event you don't have many custom objects in the system databases (hopefully this is the case), it may be better and safer to just script out re-creating all user objects from the system databases and run that script after installing SQL 2017 and the restore should just work.  You will need to map the database users to logins if you don't restore your system databases, but that is a simple alter user command.

    Also, if everything comes up nicely, you will likely want to update statistics and possibly rebuild indexes and checkdb again as well as have a backup on 2017.

    As for a checklist, this is mine:

    1 - check if what I am doing is possible (ie SQL 2008 on Windows 10 is not supported.  To me, not supported means not possible)

    2 - create valid backups of PC/VM and SQL databases

    3 - CHECKDB before and after

    4 - upgrade

    5 - update statistics with SQL upgrade

    6 - new backups once everything completed successfully

    The above is all just my opinion on what you should do. 
    As with all advice you find on a random internet forum - you shouldn't blindly follow it.  Always test on a test server to see if there is negative side effects before making changes to live!
    I recommend you NEVER run "random code" you found online on any system you care about UNLESS you understand and can verify the code OR you don't care if the code trashes your system.

  • I need to upgrade to Windows 10 before year end because Microsoft are stopping Windows 7 security updates from January

    You don't once mention upgrading your version of SQL Server though. 2008 is already outside of support.

    As far as I recall (I haven't checked) SQL Server 2008 does not run on Windows 10, so it seems like it's time to upgrade both.

    • This reply was modified 4 years, 6 months ago by  Thom A.

    Thom~

    Excuse my typos and sometimes awful grammar. My fingers work faster than my brain does.
    Larnu.uk

  • Thanks so much for the replies folks and to bmg002 for the very helpful step by step guide.  Yes it is just a testing/development box.

    • This reply was modified 4 years, 6 months ago by  caspersql.
  • Mr. Brian Gale wrote:

    In the event you don't have many custom objects in the system databases (hopefully this is the case), it may be better and safer to just script out re-creating all user objects from the system databases and run that script after installing SQL 2017 and the restore should just work.  You will need to map the database users to logins if you don't restore your system databases, but that is a simple alter user command.

     

    bmg002 thanks again for your very helpful step by step process.   I do not believe that I have added anything custom to the system databases.  If that is the case, if I understand this quote correctly you're saying I could skip the system database backup steps and just modify the user database access after following the  other steps to switch to SQL server 2017?

    So if I understand correctly I will have to install SQL Server 2017 after upgrading to Win 10 (since it's not supported in Win 7). Given there's nothing custom in the system databases, I can avoid migrating those and post OS migration, in SQL Server 2017 I would essentially just restore the SQL Server 2008 user databases which I had backed up prior to the OS switch and then configure the logins to reinstate user access, right?

     

  • Things to check that you may not realize are stored in the "system" databases:

    hope this helps

  • Chris Harshman wrote:

    Things to check that you may not realize are stored in the "system" databases:

    hope this helps

     

    Yes that is a terrific help, thank you Chris. I had been wondering how I might check to ensure I wasn't forgetting anything there, this is great!

  • I almost forgot, check if you have any SQL Agent jobs on the instance.  You can script those from the Object Explorer Detail window in SSMS.

  • Chris Harshman wrote:

      <li style="list-style-type: none;">

     

      <li style="list-style-type: none;">

     

    When I execute the script to get the proxies from sp_help_proxy in SQL Server 2008, SSMS returns this message:

    Msg 2812, Level 16, State 62, Line 3

    Could not find stored procedure 'sp_help_proxy'.

    I suspect this is because that stored procedure was not available in SQL Server 2008.  If that is the case, is there another way of achieving the same end goal?

  • Sorry I missed that point, you can find them and script them out in the Object Explorer Detail view in SSMS.  I believe the info is in the msdb.dbo tables:

    sysproxies, sysproxylogin, sysproxysubsystem

     

Viewing 10 posts - 1 through 9 (of 9 total)

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