Methods and considerations for SQL Server 2005 import to 2000

Source: Internet
Author: User
Tags management studio sql server management sql server management studio

Because your development environment uses MS SQL Server 2005, and the server is still deployed with MS SQL 2000, you have to import MS SQL Server 2005 into MS SQL Server after system development is complete 2000, although the same Ms family of products, import and export is also convenient, but sometimes there will be problems, analogy said this operation:

1. In SQL Server Management Studio, select data, Generate scripts

2, select Next, and then choose SQL Server 2000 in "Scripting for server versions"

3. Next, select the table or view that you want to generate, finalize it, and then copy the resulting script to SQL Server 2000 for execution.

From the above process, there is no problem, but in the execution of the process can not be executed, you need to make the following adjustments in the script:

Find the phrase "with (Ignore_dup_key = off) on" and replace it with all null

Find "sys.objects" and replace it with "sysobjects"

Find "sys.views" and replace it with "sysobjects"

Find "object_id" and replace all with "id" [Note: The object_id here is case-sensitive]

Find "Sys.sp_addextendedproperty" and replace it with "dbo.sp_addextendedproperty" or "sp_addextendedproperty."

Find "EXEC sys.sp_addextendedproperty @name =n ' xxx", @value =n ' xxx ', @level0type =n ' SCHEMA ', @level0name =n ' xxx ', @ Level1type=n ' xxx ', @level1name =n ' xxx ', will @level0type=n ' SCHEMA ' into @level0type=n ' user ', then @name=, @value =, @level0type =, @level0name =, @level1type =, @level1name = Replace all empty

If you write script for all objects in the selected database when you generate the script, and the other steps are the same, you can generate a completely normal script that doesn't need to be modified anywhere.

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.