Go SQL Server 2005 Additional 2008 Database

Source: Internet
Author: User

1. Build for version 2005DatabaseScript
2008 of Manger Studio
--Open "Object Explorer" (no press F8), connect to your instance
--Right-click to go to the 2005 library
--Mission
--Generate Scripts
--In the Script wizard, in Select a database, select the library you want to go to 2005
--Tick "scripting all objects in the selected database" 5
--In the next "Select script Options", set "script to create database" to True to find "forServerversion scripting item, select SQLServer2005 "
--Other options set as needed
--finally save the script to a. SQL script file

2. Create the target database in 2005
in Query Analyzer (or 2008, Manger Studio opens the script file), connect to SQL Server 2005 and execute the script generated above. To create a new database

3. Lead the data from 2008 to 2005
Open Enterprise Manager for SQL Server 2005
--Right-click the database to import the data
--Mission
--Import data
--In the Select data source step of the SQL Server Import and Export Wizard, determine which database is selected for export
--In the Select data source step, connect to 2005 and select the source database
--In Select source table and Source view, select all Tables
--Final completion

Export data from SQL2008 database to another database, if there is a self-increment primary key in the database, then the export will be reported an error

Workaround: Click "Edit Mappings" button in the database import "Select source table and Source view"--clicking on the corresponding table, then click "Enable identity column insertion" to import.

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.