Hi,
You must use BCP in following manner to transfer data from one
database (A) to another database (B).
1. Use BCP to extract all the data from database A, in txt files...
2. Generate SQL Scripts for database object i.e tables, SPs, UDFs
etc.
from Database A.
3. Create a database B
4. Execute the SQL Scripts generated in step 2, on database B
5. Now use BCP or Bulk Insert to insert all data in databse B.
By following above steps, you will able to get data structure SQL
tables. It i.e. database B will be same as database A.
Make sure while inserting data in tables with Identity field, you must
switch Identity Insert On.
Just do this......., I am sure this will work for you........
Regards
Hari Sharma
[quoted text, click to view] "Murtix Van Basten" <nospam@nospam.org> wrote in message news:<3feccd3a$1_5@athenanews.com>...
> Hi,
>
> thank you very much for all your recommendations. I have already started
> to use OSQL commands before I saw your replies. It is still going. If it
> crashes I will use BCP method.
>
> But I guess in BCP method, I won't be able to use SQL structured file (I
> mean the file I have created by using MYSQLDUMP, it has all the table
> structures in it too). I guess I will have to dump only the data of the
> specific table from MYSQL and then use BCP for MSSQL to insert all of the
> "tab and newline structured" file to an existing database's existing table
> (the same structure of course which requires manual table creation). This is
> what I understand about how to use BCP. I hope I am not wrong.
>
> Regards.
>
> Murtix Van Basten.
>
> "Murtix Van Basten" <nospam@nospam.org> wrote in message
> news:3feb5a8d$1_6@athenanews.com...
> > HI all,
> >
> > I am trying to migrate a database from mysql to mssql2k. I use myODBC
> to
> > connect to mysql server to pull the database from DTS and insert in to sql
> > server. But in mysql server, there is one huge table. Size of it is 1.3 GB
> > and more than 12 million rows.
> >
> > While I try with DTS, it transfers all tables in the database except
> this
> > huge table. First I thought it would be the resources of the computer not
> > enough (512MB physical ram and P3-866 MHZ cpu), so I have enlarged the
> swap
> > size to 4GB. But each time I run DTS over this table, it dies after
> wasting
> > around total 2.5 GB of memory. (Since it is less then 4GB, I guess it
> would
> > not be a memory problem)
> >
> > To connect to Mysql server (by the way, mysql and mssql is on same
> > physical server), I use myODBC connectors. And DTS connecting it via an
> ODBC
> > driver I create to connect to Mysql server thru myODBC. I wonder if,
> myODBC
> > is not meant to handle big tables (such as bigger than 1 GB tables in this
> > case) ?
> >
> > What would be an alternate solution to this problem ?
> >
> > Best Regards.
> >
> > Murtix Van Basten
> >