Database promotion from sqlserver6.5 to sqlserver2000

Source: Internet
Author: User
IUPRG (original)
This article is intended for friends who are confused during database upgrade from sql6.5 to sqlserver2000.
The author has the honor to come across such a case: (There is a saying: The difficulty is big, the happiness is big, this is not, happiness is coming ~)
A power plant runs several application systems, among which material systems are the most important. The architecture is roughly like this: the NT4.0 server simplified Chinese version SQL server6.5 (material system data) application system is developed using powerbuilder6.0. It has been running for five years and the data volume is about 300 MB. As the system continues to be used, it is necessary to upgrade the existing system. From sql6.5 to sqlserver2000, it seems to be a digital change, or a simple import and export, but I thought it was too simple.
For this upgrade, I have used three solutions:
1. Run the bcp... out command on sqlserver6.5 and it;
Use one of the tables for testing and import the results to sqlserver2000
Fault 1: bcp... in Prompts "string data, right truncation ";
Fault 2: garbled characters are displayed in Chinese character fields;
Fault 3: Failed to import the time field format with Chinese characters in bcp in.
2. Use the 2000 Upgrade Wizard;

Fault 1: overcome many difficulties (requires patching, resetting login methods, etc.) report some uncheckable errors after the upgrade. Then, open the database and check for nothing;

Fault 2: The Upgrade Wizard is not available, the transparency is high, and error tracking is not available.
3. Use odbc configuration to access the sql6.5 data source, and then use the import wizard of sqlserver2000;
Fault: After more than 90 new table names are changed, the copy operation is successful. However, Chinese characters are garbled. Then, we re-create a latin general bin1 database on 2000 and import it again. The fault persists.
After a week of repeated tests and failures, we finally decided to adopt the first solution to make it more flexible. First, we sorted out the specific steps to help readers.
1) open sqlserver enterprise manager on nt server 4.0, select the database to be upgraded, select the table, and generate the script for creating the table;
2) generate a script for creating a stored procedure;
3) if a view exists, save it as text for future use;
4) open the isql/w tool, select the database to be upgraded, and run the following statement to generate the bcp out/in command (otherwise, manual editing is very difficult ):
Select 'bcp mydatabase. dbo. 'Name' out'
'/DATA/'name'. TXT'
'-Usa-P ***-Sservername-c-C1252'
From mydatabase .. sysobjects
Where type = 'u'
Note: mydatabase is the database name.
'/DATA/' is the data directory under the bcp directory, which must be created in advance.

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.