Link to home
Start Free TrialLog in
Avatar of SINC_dmack
SINC_dmack

asked on

How to migrate SQL '05 instance (with databases) to existing SQL '08 installation on same server?

One of our clients has a server that is running SQL '05 Express and SQL '08 Express.  I've been having a bit of difficulty getting scripted backups to work properly and I'd like to do a little housekeeping before continuing work on the backups by getting everything running on SQL '08.

Currently there is the following setup:
SQL '05
INSTANCE1 (contains several databases)

SQL '08
INSTANCE2 (contains several databases)

INSTANCE1 hosts data for PROGRAM SUITE 1 and INSTANCE2 hosts data for PROGRAM SUITE 2.  Importing the databases from INSTANCE1 into INSTANCE2 is a no-brainer--detach the databases from SQL '05 and reattach them in SQL '08, but that will put those databases under INSTANCE2 and I'm concerned that PS1 expects to connect to INSTANCE1 and will not be able to find the databases if I import them into INSTANCE2.

What I'd like to end up with is this:
SQL '05
No instances

SQL '08
INSTANCE1 (with databases)
INSTANCE2 (with databases)

I'm confident that PS1 will be able to access its data as long as the instance stays named INSTANCE1, even when it has been moved to SQL '08.  However, I am unsure how to go about getting INSTANCE1 into SQL '08.  Do I need to:

1) Move the INSTANCE1 databases into INSTANCE2, delete INSTANCE1 from SQL '05, create a new instance in SQL '08 called INSTANCE1, and then move the databases there?
2) Import the entire INSTANCE1 into SQL '08?  (Not sure this is even possible.)
3) Something different?

Please advise.  Step-by-step instructions would be appreciated.  Thanks in advance!
Avatar of didnthaveaname
didnthaveaname

I would, personally, just setup an alias for the instance: http://www.mssqltips.com/sqlservertip/1620/how-to-setup-and-use-a-sql-server-alias/

Unless you really want to keep it in a separate instance?
Avatar of arnold
How wide is your transition window?
You could use the GUI SSMSE to backup the db on sql2005 and restore on the sql2008.
There are the login export script

http://support.microsoft.com/kb/918992

This way you will have a fall back.  There powershell cmdlets that can be used to backup/restore DBs. Not sure you need it. IMHO, a transition has to be manually done a db/application at a time which provides for a straight forward way to verify the transition works. Rather than migrating all and then if trouble comes up, roll back everything rather than a single item that may have missed...
ASKER CERTIFIED SOLUTION
Avatar of Mark Damen
Mark Damen
Flag of United Kingdom of Great Britain and Northern Ireland image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of SINC_dmack

ASKER

markusdamenous, I don't think I can do an inplace upgrade since SQL '08 is already installed.  When I try to run the SQL '08 Express installer, it says that all of the components are already installed and it won't let me continue as there is nothing new selected.  

didnthaveaname, I am not positive that I need to keep it in a separate instance, but I think that might be preferable since the existing SQL '08 instance has databases for a different program.  I am going to try the alias but have the alias point to a separate SQL '08 instance for the migrated databases.

arnold, backing up the databases in SQL '05 and then restoring them in SQL '08 will still leave me with the databases in an instance that is named differently than it is in SQL '05.  That won't help.  Please clarify, in case I misunderstood.

Thanks!
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
A brief update--the existing SQL '08 installation is actually R2.  Just realized that.
IT does not matter.  When you run the install of sql 2008 express, there is an option to select an existing instance using advanced settings.

Are you certain that your applications will support access to sql 2008? Consider that if you upgrade and the applications fail, you will be in a difficult situation.

Using a new instance provides for incompatibilities that were not thought of resolved by reverting the configuration of the application to point back to the old instance.
Well, that was so easy, I feel silly for having asked in the first place.  I downloaded SQL '08 R2 Express.  At the first prompt, I selected "Upgrade from SQL 2000, 2005 or 2008".  The second prompt asked me what instance I wanted to upgrade.  Sure enough, INSTANCE1 was listed, so I upgraded it.  It completed successfully.  

I had previously tried SQL '08 Express (non R2) and gone through the same prompts but the spot where I could select an instance to upgrade was greyed out.  Not sure why it was available in the R2 installer but not regular '08.

Now I just have to wait until tomorrow morning to see if the client's software can still connect to the database successfully.  Thanks everyone!