首页  ·  知识 ·  数据库
sql2005转到2000的方法
网友    MS-SQL  编辑:dezai   图片来源:网络
sql2005转到2000的方法
Step 1: Generating Scripts for the Database Elements and Structures
Right-click over the desired Database at 2005, Choose Tasks and the Generate Scripts (Option).
At the pop-up Dialog Box click at the Script All Objects in the selected Databases check box, to activate it and then Click the Next Button.
Set the following Elements to the following Values
Script Collation , set to TRUE
Script Database Create, set to TRUE
Script of SQL Version, set to SQL SERVER 2000
Script foreign keys, set to FALSE
Script Triggers, set to FALSE Then Hit the Next button
Select the way the generated scripts should be saved (There are different selections. The most common one is Clipboard). Finally click the Next button till you reach the end.

Click Finish




Step 2: Moving the data from 2005 to 2000
After completing the previous step successfully, moving the data follows. Right-click at the 2005 database you used to run the previous step and select Tasks and then choose the Export Data (option).
From the pop-up Dialog Box, select the Source Db and Click at the Next Button.
At the next step you will have to choose the destination server and the destination Database for the Data to be exported. Then Click Next.


A List of all the Source Database’s Elements will appear in the screen. Select one by one all the Elements you wish to move and for each one click at the button Edit Mappings (Located at the bottom right corner of the Dialog Box just under the Elements list). A new Dialog box will pop-up. Select the Delete rows in Destination Tables option and activate the Enable Identity Insert Option. (Remember to repeat this action for each of the selected Element from the list that will be moved.


Step 3: Generating Scripts for the Database Foreign Keys and Triggers

Finally, to successfully finish the downgrade of the Database, the Triggers and the Foreign Keys of the DB must be produced. The procedure that should be followed is the one stated next:
Right-Click at the SQL 2005 Database and Select from Tasks Menu the Generate Scripts Option.
Using the pop-up Dialog Box make sure that the check box Script All Objects in the selected Databases is not enabled and hit the Next Button.
Set all the Elements on the List to a False Value except the ones that follow:
Include IF NOT EXISTS , set to TRUE
Script Owner, set to TRUE
Script of SQL Version, set to SQL SERVER 2000
Script foreign keys, set to TRUE
Script Triggers, set to TRUE
Then Hit the Next button
After finishing reading the Elements of the Database, a new list will appear at the Dialog Box. Make sure that you select ONLY THE TABLES of the Database and hit the Next Button.
At the screen that follows hit the Select All button and the Next.
Select the way the generated scripts should be saved (There are different selections. The most common one is Clipboard). Finally click the Next button till you reach the end.


Click Finish Button.

After completing this procedure, we have to move to the SQL SERVER 2000 environment. Here, by using the Query Analyzer, we will have to run the scripts that were generated using the master database. Copy and Paste the script at the Query Analyzer and run it. After that the Foreign Keys and the Triggers of the Database will be created. 
本文作者:网友 来源:网络
CIO之家 www.ciozj.com 微信公众号:imciow
    >>频道首页  >>网站首页   纠错  >>投诉
版权声明:CIO之家尊重行业规范,每篇文章都注明有明确的作者和来源;CIO之家的原创文章,请转载时务必注明文章作者和来源;
延伸阅读