Sybase NNTP forums - End Of Life (EOL)

The NNTP forums from Sybase - forums.sybase.com - are now closed.

All new questions should be directed to the appropriate forum at the SAP Community Network (SCN).

Individual products have links to the respective forums on SCN, or you can go to SCN and search for your product in the search box (upper right corner) to find your specific developer center.

Data Migration from mysql to Sybase

2 posts in Migration Last posting was on 2000-11-30 02:55:42.0Z
Anonymous Posted on 2000-11-28 15:36:42.0Z
From: Anonymous@sybase.com
Date: Tue, 28 Nov 2000 10:36:42 -0500
Newsgroups: sybase.public.sqlserver.migration
Subject: Data Migration from mysql to Sybase
Message-ID: <946BF9F673EB117A0055C1E4852569A5.0055C205852569A5@webforums>
Lines: 14
MIME-Version: 1.0
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: 7bit
Path: forums-1-dub!forums-master.sybase.com!forums.sybase.com!webforums.sybase.com!news
Xref: forums-1-dub sybase.public.sqlserver.migration:360
Article PK: 1067783

Hello,
I have my present database in MYSQL. I am trying to export this data to my
new database in Sybase. I have dumped the database from Mysql and now
trying to import this dump to Sybase. Everything is fine except with the
'identity' and the 'datetime' fields.
I am not sure how to set 'identity_insert <table name> on'. Where do I do
that? On the command line?
The datetime field from Mysql is in the format of 20001127103523 (Nov 27th
2000 10:35:23 AM). But this format is not accepted in Sybase. Is there
anyother way I can do this?
Please help. Thank you in advance.

ps: Migrating to MS-Access from Mysql and then to Sybase is an option and
is it simpler than directly to Sybase from Mysql?


Anthony Mandic <am Posted on 2000-11-30 02:55:42.0Z
Date: Thu, 30 Nov 2000 13:55:42 +1100
From: Anthony Mandic <am@*t.com.au>
Organization: Mandic Consulting Pty. Ltd.
X-Mailer: Mozilla 4.72 [en] (X11; U; Linux 2.2.14-5.0 i686)
X-Accept-Language: en
MIME-Version: 1.0
Subject: Re: Data Migration from mysql to Sybase
References: <946BF9F673EB117A0055C1E4852569A5.0055C205852569A5@webforums>
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
Message-ID: <lSiIKNoWAHA.299@forums.sybase.com>
Newsgroups: sybase.public.sqlserver.migration
Lines: 34
NNTP-Posting-Host: 210.9.51.46
Path: forums-1-dub!forums-master.sybase.com!forums.sybase.com
Xref: forums-1-dub sybase.public.sqlserver.migration:357
Article PK: 1067780


Anonymous@sybase.com wrote:

> I have my present database in MYSQL. I am trying to export this data to my
> new database in Sybase. I have dumped the database from Mysql and now
> trying to import this dump to Sybase.

Can you explain wht you mean by 'dumped' and 'import' here. You
won't be able to load a dump into Sybase from anything other than
Sybase - and even then only if the hardware is compatible.

So, I'll have to assume that you exported the data into a text file
from MySQL and are attempting to use bcp to import that text file.

> Everything is fine except with the 'identity' and the 'datetime' fields.
> I am not sure how to set 'identity_insert <table name> on'. Where do I do
> that? On the command line?

You won't be able to do that with bcp. It has a command line option
to handle it though. Set commands only work within a T-SQL session
(as with isql). An alternative solution is to bcp int oa temp table
first and then select into the target table with the above set option.

> The datetime field from Mysql is in the format of 20001127103523 (Nov 27th
> 2000 10:35:23 AM). But this format is not accepted in Sybase. Is there
> anyother way I can do this?

That should work (but I'm absolutely certain without testing it).
Perhaps using a format file may work.

-am