Copying a Database from SQL Server 2005 to SQL Server 2008 using the Copy Database Wizard

by Jayaram Krishnaswamy | April 2008 | .NET Microsoft

This article by Jayaram Krishnaswamy shows how to migrate a database from SQL Server 2005 (should work for 2000 as well) to SQL Server 2008 using the Copy Database tool in SQL Server 2008. In an earlier article we saw how this can be done manually by detaching the database from the SQL 2005 and then attaching it to the SQL 2008 server using the SQL Server Management Studio.

(For more resources on Microsoft, see here.)

Using the Copy Database Wizard you will be creating an SQL Server Integration Services package which will be executed by an SQL Server Agent job. It is therefore necessary to set up the SQL Server Agent to work with a proxy that you need to create which can execute the package. Since the proxy needs a credential to workout outside the SQL 2008 boundary you need to create a Credential and a Principal who has the permissions. Creating a credential has been described elsewhere.

The main steps in migration using this route are:

  • Create an Credential
  • Create an SQL Server Agent Proxy to work with SSIS Package execution
  • Create the job using the Copy Database Wizard

Creating the Proxy

In the SQL Server 2008 Management Studio expand the SQL Server Agent node and then expand the Proxies node. You can create proxies for various actions that you may undertake. In the present case the Copy Database wizard creates an Integration Services package and therefore a proxy is needed for this. Right click the SSIS Package Execution folder as shown in the next figure.

Copying a Database from SQL Server 2005 to SQL Server 2008 using the Copy Database Wizard

Click on New Proxy.... This opens the New Proxy Account window as shown.

Copying a Database from SQL Server 2005 to SQL Server 2008 using the Copy Database Wizard

Here Proxy name is the one you provide which will be needed in the Copy Database Wizard. Credential name is the one you created earlier which uses a database login name and password. Description is an optional info to keep track of the proxy. As seen in the previous figure you can create different proxies to deal with different activities. In the present case a proxy will be created for Integration Service Package execution as shown in the next figure. The name CopyPubx has been created as shown. Now click on the ellipsis button along the Credential name and this brings up the Select Credential window as shown.

Copying a Database from SQL Server 2005 to SQL Server 2008 using the Copy Database Wizard

Now click on the Browse... button. This brings up the Browse for Objects window displaying the credential you created earlier. Place a checkmark as shown and click on the OK button.

Copying a Database from SQL Server 2005 to SQL Server 2008 using the Copy Database Wizard

The [mysorian] credential is entered into the Select Credential window. Click on the OK button on the Select Credential window. The credential name gets entered into the New Proxy Account's Credential name. The optional description can be anything suitable as shown.

Place a checkmark on the SQL Server Integration Services Package as shown and click on Principals.

Copying a Database from SQL Server 2005 to SQL Server 2008 using the Copy Database Wizard

Since the present proxy is going to be used by the sysadmin, there is no need to add it specifically.

Copying a Database from SQL Server 2005 to SQL Server 2008 using the Copy Database Wizard

Click on the OK button to close this New Proxy Account window.

You can now expand the SSIS Package Execution node of the Proxies and verify that CopyPubx has been added. There are two other proxies created in the same way in this folder.

Copying a Database from SQL Server 2005 to SQL Server 2008 using the Copy Database Wizard

Since the SQL Server Agent is needed for this process to succeed, make sure the SQL Server Agent is running. If it has not started yet, you can start this service from the Control Panel.

 

Sign up for a Packt account to see the rest of this article

Now that you've read a few articles, you might want to consider signing up for a Packt account. It takes a matter of seconds, will give you access to all the articles on PacktPub.com, and once you've signed up you'll be returned here to carry on reading your article.

Furthermore, you'll gain access to nine free ebooks, and be offered a free trial of PacktLib, Packt's online library. Simply enter your details here, or log in to your existing account.

Log in

...or register

Version90 database compatibility level is not supported. by
When I try to copy a database from a 2005 DB to 2008, I get this error: "Version90 database compatibility level is not supported."
Fails due to compatiblity level error by
Version90 database compatibility level is not supported.
Migration DATABASES by
Good afternoon, This is my first post in the forum, and I'm already grateful for your help! ____________________ The intention is to migrate the databases (including reporting services) applications System Center Operations Manager and System Center Configuration Manager for SQL Server 2008 centralized. At a time when each of the servers there is a dedicated sql server 2005. ____________________ I would appreciate your help (with links, pdf's, whatever). If they need any more information, just ask (although novice in this area). Thank you. (My E-mail: q.uicks.ilver@hotmail.com) (I'm sorry aboiut my English)
Great advice by
This advice saved my life this afternoon - thanks!

Post new comment

Awards Voting Nominations Previous Winners
Judges Open Source CMS Hall Of Fame CMS Most Promising Open Source Project Open Source E-Commerce Applications Open Source JavaScript Library Open Source Graphics Software
Resources
Open Source CMS Hall Of Fame CMS Most Promising Open Source Project Open Source E-Commerce Applications Open Source JavaScript Library Open Source Graphics Software
Sort A-Z