cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

Extracting data from old Sybase SQL Anywhere

Former Member
13,996

I have an old Database as archive for my pictures. The pictures are not stored in the database, only Chapter, pictureID and keywords. It is based on Sybase SQL Anywhere Database Engine Version 5.5.01 Build #1333. The application dose not offer to export listings. I would like to creat listings in a csv format or compareable. Or import the data to an open office database. In advance, thanks for help. If necessary I can upload the database (3.8MB)

p.s. I am not a specialist!!

View Entire Topic
Breck_Carter
Participant

Are you able to connect to your database using the SQL Anywhere 5 isql.exe utility?

Here is a sample command line:

"%SQLANY%\\win32\\isql.exe" -c "dbn=ddd5;eng=ddd5;uid=dba;pwd=sql"

On my Windows 7 computer, that is equivalent to this:

"C:\\Program Files (x86)\\Sybase\\SQL Anywhere 5.0\\win32\\isql.exe" -c "dbn=ddd5;eng=ddd5;uid=dba;pwd=sql"

Then you can use the SELECT and OUTPUT command to create a CSV file. Here is an end-to-end demo with a new table called tt:

CREATE TABLE tt ( x integer, y integer );
insert tt values ( 1, 1 );
insert tt values ( 2, 2 );
commit;
select * from tt;
output to 'c:\\temp\\tt.txt';

Here is the output file:

1,1
2,2

If your database needs to be started before running isql.exe, here is a sample command for that:

"%SQLANY%\\win32\\dbeng50.exe" ddd5.db
VolkerBarth
Contributor
0 Likes

Is the environment variable called SQLANY or SQLANY5 for v5?

(I have no v5.5 version currently available, but newer versions always include the version number...)

Breck_Carter
Participant

Back in the day it was SQLANY... what, you think I would post untested code? 🙂

VolkerBarth
Contributor
0 Likes

Oops, now I've put my foot in it:)

I guess my brain memory (possibly the swapped part) told my there was something particular with the environment variable in 5.5 - but I just noticed the "issue" was the fact that 5.5 by default installed in a "C:\\SQLANY50" directory (at least in all our setups...). - That's just another reason to make use of these environment variables - as you have done in your typical exemplary manner:)

Breck_Carter
Participant
0 Likes

Yes, I remember C:SQLANY50, haven't seen it for a while... it might have dated from Windows 3 or DOS days. For my Windows 7 installation I think I just let the setup do it's thing, which resulted in C:Program Files (x86)SybaseSQL Anywhere 5.0... I'm still grokking over the fact it worked at all. The engine itself crashes a lot, probably because it's not supposed to run on Windows 7.

VolkerBarth
Contributor
0 Likes

That's my impression as well. We have a v5.5 third-party legacy app that runs fine on XP and almost fine on W2K3 but rather instable with Win7. Never mind:)


Though Sybase itself is more confident that v5.5 may run well on Win7 though it is not tested and supported at all: http://sqlanywhere-forum.sap.com/questions/6356#6391...

Breck_Carter
Participant
0 Likes

My experience is that an idle dbeng50.exe just crashes after a few minutes on Windows 7. The client component keeps trying to connect and has to be manually terminated.

VolkerBarth
Contributor
0 Likes

I can confirm that: As we use dbeng5 with a local client and in autostart mode, the application seems to works for some time and then suddenly looses its database connection. - "So hurry up, dear user!" would be a fitting slogan:)