Results 1 to 7 of 7
  1. #1
    Join Date
    Oct 2009
    Posts
    3

    Unanswered: Legacy db export

    I have a SQL Server 6.5 database that I need to export the data and create table DDL from. I will be importing it into MySQL. How can I export csv or insert statements from 6.5?

    TIA

  2. #2
    Join Date
    Jan 2003
    Location
    Massachusetts
    Posts
    5,800
    Provided Answers: 11
    You can generate CSV files by using BCP to export the data from SQL Server. Youc an also generate scripts of the table structures by using Enterprise Manager for 6.5. These scripts will be in 'T-SQL-ese', though, and you will have to edit them to run on a MySQL database.

  3. #3
    Join Date
    Oct 2009
    Posts
    3
    I guess I should have mentioned that I tried BCP and I can get the data out, but it has odd characters in it (almost like binary data), but the fields I am exporting are just plain text. I didn't see anything in Enterprise Manager 6.5...do you know what the option is called?

  4. #4
    Join Date
    Jan 2003
    Location
    Massachusetts
    Posts
    5,800
    Provided Answers: 11
    Are you specifying character format (-c) for BCP? I would expect that behaviour only if you specified Native format (-n).

  5. #5
    Join Date
    Oct 2009
    Posts
    3
    I wasn't specifying any format, but it worked fine when I used -c for bcp! I found the script generator in Enterprise Manager, but it doesn't export data that I can see. I am going to use the script generator for the DDL, then bcp for the data....is that really the only way?

  6. #6
    Join Date
    Jan 2003
    Location
    Massachusetts
    Posts
    5,800
    Provided Answers: 11
    For SQL Server 6.5 that is the way to do it.

  7. #7
    Join Date
    Jun 2004
    Location
    Long Island
    Posts
    696
    are you using -n (native format) ? that would explain funky characters.

    I see mCr got to this already, rollback.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •