Solved

How to upgrade SQL database from '08 to '08 R2?

Posted on 2014-12-10
5
68 Views
Last Modified: 2014-12-16
A client has a Windows '03 Server with SQL '05, '08 and '08 R2 installed on it   All are the Express version.  I've got a database instance in '08 and I'd like to migrate it to '08 R2.  I feel like this is something that's pretty easy and straightforward but I can't remember how to do it (if it was hard, I would have documented it the last time I did it) and Googling returns a bunch of "how to upgrade SQL '08" responses but nothing on how to migrate an instance to a newer version of SQL on the same server.  Thanks!
0
Comment
Question by:SINC_dmack
5 Comments
 
LVL 75

Expert Comment

by:Aneesh Retnakaran
ID: 40492808
If you have the installation  media, you can use in place upgrade; before you do that make sure that the backups are taken
0
 
LVL 18

Expert Comment

by:Simon
ID: 40492836
I normally use backup then restore (to the new instance), then transfer any necessary logins that don't exist on the new instance.

See this blog - http://www.karaszi.com/SQLServer/info_moving_database.asp for further details.

Pinal Dave (SQL authority.com) uses the Copy Database method
0
 
LVL 7

Expert Comment

by:Dung Dinh
ID: 40493298
Hi,

There are some ways to help you migrate a database from old version to newer version
1- Backup/ Restore
BACKUP DATABASE Test TO DISK='D:Backup\Test.bak' WITH COMPRESSION
GO

Open in new window

After you backup the database successfully, you could restore to newer instance on your server
-- List of files
RESTORE FILELISTONLY FROM DISK='D:\Backup\Test.bak'
GO
RESTORE DATABASE Test FROM DISK='D:\Backup\Test.bak' WITH
MOVE 'Test' TO 'D:\Data\TestNew.mdf',
MOVE 'Test_log' TO  'D:\Log\TestNew_log.ldf'
GO
ALTER DATABASE Test SET MULTI_USER

Open in new window


2- Use Copy database feature as above link Pinal Dave

Beside, you should make sure that Users of security model are added to newer instance.


Thanks,
0
 
LVL 47

Accepted Solution

by:
Vitor Montalvão earned 500 total points
ID: 40493923
If you only want to migrate that single database and being in the same server of the SQL Server 2008R2 instance you just need to detach it from SQL Server 2008 and attach it in the SQL Server 2008R2 instance. You don't even need to change the compatibility level. Simple as that.
0
 

Author Closing Comment

by:SINC_dmack
ID: 40502638
Vitor's answer sparked my memory to what must have been the way I've done it in the past--creating a new instance in the desired version of SQL, detaching the database from its existing instance, and then attaching it to the new database.  (The other answers will presumably work too but they aren't the simple solution that Vitor's is.)

I used this document to create a new instance.  http://dharmendrablogs.blogspot.com/2013/02/to-create-new-sql-server-instance-in.html(Basically re-running the SQL '08 Express R2 client, adding features, and then telling it to create a new instance controlled by Network Service.  The document has a some steps that were not needed in Express which are presumably required in the full version of SQL.)  

I haven't actually done the migration yet as the new instance has a different name than the original instance and I'll have to log into about 15 different workstations to update their client software to connect to the new name.
0

Featured Post

Windows Server 2016: All you need to know

Learn about Hyper-V features that increase functionality and usability of Microsoft Windows Server 2016. Also, throughout this eBook, you’ll find some basic PowerShell examples that will help you leverage the scripts in your environments!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

In this article I will describe the Copy Database Wizard method as one possible migration process and I will add the extra tasks needed for an upgrade when and where is applied so it will cover all.
This article explains how to reset the password of the sa account on a Microsoft SQL Server.  The steps in this article work in SQL 2005, 2008, 2008 R2, 2012, 2014 and 2016.
This Micro Tutorial will give you a basic overview how to record your screen with Microsoft Expression Encoder. This program is still free and open for the public to download. This will be demonstrated using Microsoft Expression Encoder 4.

809 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question