Sybase 10 not working, 9 doesn't install. Time 4 MySQL?

Okay, I’m having a terrible time right now with SQL Anywhere. This is all on an 10.4.9 Intel Mac with the latest downloads of Servoy (4/2007). I’m about ready to pitch it and use MySQL instead.

BACKGROUND
I’m a Servoy newbie trying to create my own database (trial run) for a very simple project I’m beginning.

I started out downloading Sybase 10 Developer’s Edition, thinking that I might as well go for the latest versions and not knowing that these databases are incompatible from version to version!?!? Other newbies reading this should heed that as a warning.

SYBASE 10 DB CREATION_
The Sybase 10 install went fine – I even caught the ‘secret’ message to reboot at the end of the install (watch out for that). After reboot, when I went to create a brand new DB, it just failed and gave the “Could not Connect to Database” error (see THIS THREAD =>> Sybase iAnywhere 10 not creating databases on Intel Mac - Classic Servoy - Servoy Community)

After screwing around with all sorts of options and such, I figured out how to create a DB in Sybase 10. The trick is to (1) Use the DB Launcher to start up the a DB server… select the demo.db file in the Sybase/System/ folder. (2) THEN launch Sybase Central to create a new database.
With the new DB created, I edited the /Servoy/sybase_db/sybase.config file to point to my database and launched Servoy.

LET THE SYBASE 10 PROBLEMS BEGIN
(1) Servoy says it didn’t like the 4k page size (so created a new DB with a 2k page size).
(2) Servoy’s Preferences->DB Servers file to add my new DB. Servoy refused to connect to the database siting some apache errors (similar message to this thread ==> Old DB not connecting in Servoy 3.1.2 - Classic Servoy - Servoy Community ). I verified and tried all permutations of my username/password (DBA/sql). No luck.
(3) Now the funny part: I shut down Servoy, killed the dbsvr9 process, re-launched the Sybase DB Launcher and opened Sybase’s demo.db to get the service started. Then I launched Sybase Central and tried to connect to my new servoy database to see what up. AT THIS POINT, Sybase Central 10 claimed that it could not connect to the database because it was made in a different version!!! So now I have a DB (thankfully empty) that neither Servoy nor Sybase can talk to – scary.

LET THE SYBASE 9 PROBLEMS BEGIN
So, I decided to download Sybase Developer 9 in hopes it would “just work”.

(1) Upon launching Sybase Central (9) I get 2 errors: The first saying that “library dbput9_r could not be loaded” and the second saying that “library dbmlput9_r” could not be loaded. I have found these files and can’t understand why Sybase 9 can’t find them… How do I point Sybase9 to the right place?
QUESTION: Does anyone know where these files are supposed to end up so I can put them there manually???
(2) So, with this crippled version of Sybase Central, it will not let me create a database. Once again, I am stuck.
(3) Furthermore, I can’t connect to databases… I keep getting a nasty java stack trace that’s pages long.

SOME ADDITIONAL SERVOY 9 / 10 NOTES
I learned about ~/.MacOSX/environment.plist today while looking into something totally unrelated (long story). But when I opened it, I found that Sybase’s apps definitely modify this.
So, I did a little cleanup to remove various traces of SQLAnywhere10 from the various paths and keys. I also removed all traces of Sybase 10 from my ~/Library/Preferences.
I even did the same with Sybase 9 (removing all files I could think of) and performed a fresh install with Sybase 9 installer located in the Applications directory.

Sadly, this did not help my problem getting SybaseCentral 9 to run. Am I missing something obvious?

QUESTIONS / FRUSTRATIONS
RANT: I’ve spent >4 hours trying to get Sybase 9 / 10 to create a database, and (more importantly) create a database for use with Servoy.
QUESTION: Any words of wisdom on how to get Sybase to behave and/or “just work”?

I’ve installed and created MySQL databases from the command line in a small fraction of the time by following MySQLs online instructions. For my level of “purchasing power” there seems to be far better support with MySQL.
QUESTION: How are people’s experiences with MySQL?

Thanks any and all for guidance & help.
-Red

Hello Red,

Hopefully the following will help you out.

Servoy comes with SQL Anywhere 9, and I recommend that you stick to that version since I am not 100% certain that Servoy has been certified with SA10.

SQL Anywhere 9 was designed to run on Mac PPCs - although it will run on the Mac Intel via Rosetta (you don’t need to do anything, OS X takes care of everything). The error you saw about dbmlput9_r is normal in this scenario and you can safely ignore it. What you need to do is make sure to connect to the db using jConnect instead of the default iAnywhere JDBC driver. Please have a look at the following thread that describes the process: http://forum.servoy.com/viewtopic.php?t=7285.

Your feedback about creating new databases for new Servoy users is valuable. I will start a new thread and explain how to do this; basically you can just issue the command “dbinit mynewdb.db”.

Regards,

Jose Ramos
Product Manager
Sybase iAnywhere

Thanks, Jose.

I have Sybase Central (9) installed. The problem is that I cannot create a database or connect to an existing database.

Currently, Sybase Central 9 will walk me through the database creation process up until the very last step and then hang completely. I have not attempted to connect Servoy to the DB.

Oh, and thanks for your Database Creation post. I have copied it down and will see if I can make the command-line method work.

More details:

Startup Error Message
The actual error message on startup of Sybase Central 9 reads:

The library dbput9_r could not be loaded. This may be because the provider is being re-loaded (in which case you need to restart the viewer) or because the library could not be found in the Adaptive Server Anywhere installation. Service management will not be available.

Database Creation Error Message
assuming I click “OK” to get through the error messages, I can begin the database creation process. However, as soon as I click on the “FINISH” button, I get the following error:

±----------------+
| Stack Trace |
±----------------+

Current thread: AWT-EventQueue-0
java.lang.UnsatisfiedLinkError: /Applications/SQLAnywhere9/System/lib32/libdbjodbc9.dylib: [pages of stuff removed for brevity]

NOTE: I have included the full text of the error as an attachment.

Does this help explain the problem at all?
Sincerely,
Red Byer
[/b]

scj_errors.txt (39.3 KB)

Jose,

(I’ll keep this post in this thread so as not to pollute the Database Creation thread, as mine might be an isolated issue).

I followed your steps for command line database creation, and had some issues/comments:

Here’s what I did:

cd /Applications/SQLAnywhere9/System/bin32/
chmod +x asa_config.sh
./asa_config.sh
./dbinit /Applications/Servoy/database/recipetwo.db

You’ll note the chmod command. This is because the asa.config.sh is not installed executable. I also stayed in the SQLAnywhere9 directory for running the ./dbinit command (should not matter).

However, I got the following response when I ran the dbinit command:

      dyld: Library not loaded: libdbtool9_r.dylib
  Referenced from: /Applications/SQLAnywhere9/System/bin32/dbinit
  Reason: image not found
Trace/BPT trap

I have verified that libdbtool9_r.dylib is in fact installed in the SQLAnywhere9/System/lib32/ directory:

% ls -al /Applications/SQLAnywhere9/System/lib32/libdbtool9_r.dylib 
-r-xr-xr-x   1 red  admin  1251908 Jul 13  2005 /Applications/SQLAnywhere9/System/lib32/libdbtool9_r.dylib

Incidentally, I also tried using the SQL Interactive application, and it too has the same set of issues with the .dylib files. I have attached the stack trace for reference. Guess I’m 0/3 on the creation options right now.

Sincerely,
Red

isqlInternalError.txt (36.1 KB)

redbyer:
I’ve installed and created MySQL databases from the command line in a small fraction of the time by following MySQLs online instructions. For my level of “purchasing power” there seems to be far better support with MySQL.
QUESTION: How are people’s experiences with MySQL?

Hi, the great thing about Servoy is that you can use whatever SQL database you are the most confortable with. So, if you feel more at home with mySQL, I recommend you use it - it will save you time.

Personally, I have used both PostgreSQL and mySQL with good results. Search the forum and www.servoymagazine.com, I think Nicola Gervasi has written a longer article about using mySQL with Servoy.

It’s a bummer, for I was really trying to keep the pieces simple and use Servoy and the DB as it ships “out of the box”. If Sybase can figure out my install issues, then perhaps I’ll switch back.

That said, it took approx 30 minutes last night to:
(1) download MySQL 5.0 http://dev.mysql.com/downloads/mysql/5.0.html
(2) get the GUI Tools for admin http://dev.mysql.com/downloads/gui-tools/5.0.html
(3) download the Java connector and install into the Servoy directory http://dev.mysql.com/downloads/connector/j/5.0.html
(4) Download the Servoy&MySQLminihowto This is an outstanding piece of work!!! http://www.sintpro.com/downloads.php
(5) Using MySQL Admin GUI, create a database, setup a “servoy” user
(6) Use MySQL Query Browser to give the “servoy” user access to the database (per Sintpro’s mini howto)
(7) Launch and connect Servoy to the MySQL database.

A note to the Servoy developers. Step #7 took longer than the rest, simply because servoy’s “new” database connection (with auto-setup) has numerous options and there is some enigmatic trial and error to get the settings perfect. As a newbie, the process involves a lot of guessing (especially with the URL). This is a case where a “wizard” or improved error messages would be nice. Case in point, I have learned that the “apache” error is really a username/password failure. How cool would it be if Servoy AUTO_DISCOVERED the servers available on the development machine?

-Red

How cool would it be if Servoy AUTO_DISCOVERED the servers available on the development machine?

That will not be possible. How should Servoy figure out what database you are running on what hosts? On top, Servoy can easily handle several database connections even from different vendors.

I agree, it would be impossible for Servoy to auto-discover databases not on the development machine. However, during development, it would be groovy if Servoy could scan the localhost:xxxx ports for known database ports and provide a list of options and even possible URL combinations. Might take lots of work, but would greatly enhance some of the black magic in the DB Connection dialog.
Since this still is most likely not possible – then more guidance in selecting a URL format string would also be of help. It’s almost like the URL format string needs it’s own dialog box (see Aqua Data Studio for an example…that made it easy to connect to my DB).

But this is a different topic entirely and not really related to the problems I encountered with Sybase (see above).

-Red

Red,

I’m sorry you experienced all these problems with SQL Anywhere 9. The Developer Edition should just work out-of-the-box.

redbyer:
Here’s what I did:

cd /Applications/SQLAnywhere9/System/bin32/

chmod +x asa_config.sh
./asa_config.sh
./dbinit /Applications/Servoy/database/recipetwo.db




You'll note the **chmod** command. This is because the **asa.config.sh** is not installed executable. I also stayed in the SQLAnywhere9 directory for running the ./dbinit command (should not matter).

However, I got the following response when I ran the dbinit command:


  dyld: Library not loaded: libdbtool9_r.dylib

Referenced from: /Applications/SQLAnywhere9/System/bin32/dbinit
Reason: image not found
Trace/BPT trap

There is no need to change permissions to asa_config.sh. You can simply issue this command:

source /Applications/SQLAnywhere9/System/bin32/asa_config.sh

This sets up the correct path for the libraries, which is what the error above is pointing out. Hopefully this gets you a bit further.

Thanks,
Jose

Thanks Jose. :) The “source” was one of the missing pieces. I finally was able to create a Sybase DB from the command line (The GUI apps still won’t start up).

For those of you following along, here is exactly what I did. NOTE: This is all done in the bash shell

source /Applications/SQLAnywhere9/System/bin32/asa_config.sh
cd /Applications/Servoy/database
dbinit recipetwo.db 
chmod 600 recipetwo.db //the db file is not created with write priveledges
sudo kill dbsrv9             //a restart is necessary or it servoy won't connect up
nano /Applications/Servoy/sybase_db/sybase.config
                                    //add your database location to the end of this file
       
//Startup Servoy, add the database.  Default username/password is dba/sql

The 2 tidbits that I had to stumble on were the chmod (may not be necessary) because the db file is created without write access (444).

I also found it absolutely necessary to kill the dbsrv9 process prior to starting servoy up. Otherwise, the new database is not recognized and Servoy refuses to connect to it at all.

Side note to the Sybase Guys: It would be a blessing to have man pages on the various command line tools–or at least a pdf with examples and usage instructions. The Sybase site is difficult/impossible to navigate for finding information regarding the command line tools.

redbyer:
(4) Download the Servoy&MySQLminihowto This is an outstanding piece of work!!! http://www.sintpro.com/downloads.php

Thanks! Compliments are always welcome… :D

redbyer:
Step #7 took longer than the rest, simply because servoy’s “new” database connection (with auto-setup) has numerous options and there is some enigmatic trial and error to get the settings perfect. As a newbie, the process involves a lot of guessing (especially with the URL). This is a case where a “wizard” or improved error messages would be nice.

Just select “MySQL” from the autosetup server menu and all the fields will be precompiled with the right sintax.

Red,

I’m glad things are progressing. Let’s see if we can get the GUI apps to start properly for you.

redbyer:
Thanks Jose. :) The “source” was one of the missing pieces. I finally was able to create a Sybase DB from the command line (The GUI apps still won’t start up).

Try to start Sybase Central or Interactive SQL via the command line. You will still need to source asa_config.sh as before, then run either of these two commands:

scjview

dbisql

Do you still get the errors on startup?

redbyer:
Side note to the Sybase Guys: It would be a blessing to have man pages on the various command line tools–or at least a pdf with examples and usage instructions. The Sybase site is difficult/impossible to navigate for finding information regarding the command line tools.

Thanks for the feedback. I will make a point to come up with a plan to share this information with the Servoy users in this forum. For now, a complete listing of the command-line utilities is available here:

http://www.ianywhere.com/developer/product_manuals/sqlanywhere/0902/en/html/index.html

Look for ASA Administration Guide | Database Administration Utilities.

Thanks,
Jose

redbyer:
I agree, it would be impossible for Servoy to auto-discover databases not on the development machine. However, during development, it would be groovy if Servoy could scan the localhost:xxxx ports for known database ports and provide a list of options and even possible URL combinations. Might take lots of work, but would greatly enhance some of the black magic in the DB Connection dialog.
Since this still is most likely not possible – then more guidance in selecting a URL format string would also be of help. It’s almost like the URL format string needs it’s own dialog box (see Aqua Data Studio for an example…that made it easy to connect to my DB).

But this is a different topic entirely and not really related to the problems I encountered with Sybase (see above).

-Red

Just an FYI in relation to this specific point. SQL Anywhere has a “dblocate” utility which will discover all instances of SQL Anywhere servers running on the local network. I don’t think it is exactly what you want (it doesn’t list what databases are running on the servers it finds), but it may be a step in making the connection process easier from Servoy.

This is not a knock on Sybase as I like and use it without reservation on windows servers (plus Sybase has some very cool out of the box features). But on Macs Sybase is not the best option in my experience. The GUI tools have not been updated and there is a major bug when importing medium to large solutions that was never figured out with the default Sybase 9 install (the import process can and will hang). It’s possible that the latter could be Servoy’s fault and not Sybase’s.

In any case, with MySQL or Postgres both issues go away completely. I haven’t had a chance to test out Sybase 10 yet.

Edit: one other thing that always annoyed me with Sybase on the Mac – I was always killing the dbsrv9 process for various and sundry reasons. In over a year of heavily using MySQL I have killed the MySQL process once.

Jose,

I just verified that the GUI apps still fail to launch properly – even from the command line. Same exact set of errors.

Also: Thanks for the link to the Sybase iAnywhere Documentation. For those of you also looking for the DBTools info, go to Jose’s link:
http://www.ianywhere.com/developer/product_manuals/sqlanywhere/0902/en/html/index.html
Click on: Adaptive Server Anywhere Programming Guide
Click on: The Database Tools Interface

Others: Thanks for the help/support. Even though I’m a newbie, I’m realy cautious about DB choice, as I want my little project to last (without need for update) for a long time (years and years).

-Red

Having used both mysql and Sql anywhere for the past ten years I can tell you that SQL Anywhere is at least 3x easier to manage and install than mysql is.

On our website we recommend to download the tools for 9, plus we provide a link for that. At the top of the downloads page of SQL anywhere 10 there is another link to downloading 9. There are also quite some warnings on our website and forum indicating to use 9 as that is the version we ship with. Having said that I have personally been running 9 and 10 without any problems.

Again, we don’t mind which database you use whether it is SQL Anywhere or mysql but SQL Anywhere is definetely easier to manage.

Having said that: there is always room for improvement both for us and for iAnywhere. You’ll notice that from both companies there are reactions on this thread to help you out. We are in the progress of creating a solution that can automatically create iAnywhere databases from within Servoy.

Auto discovery of databases is an interesting item: How about you start an opensource or a plugin project to make this? I’m sure that would be highly appreciated by a lot of developers! I’d buy a copy!

jaleman:
Having used both mysql and Sql anywhere for the past ten years I can tell you that SQL Anywhere is at least 3x easier to manage and install than mysql is.

On our website we recommend to download the tools for 9, plus we provide a link for that. At the top of the downloads page of SQL anywhere 10 there is another link to downloading 9. There are also quite some warnings on our website and forum indicating to use 9 as that is the version we ship with. Having said that I have personally been running 9 and 10 without any problems.

Again, we don’t mind which database you use whether it is SQL Anywhere or mysql but SQL Anywhere is definetely easier to manage.

Are you referring to windows Jan? Because this is simply not true when using a Mac.

I really LOVE Sybase. I must be honest that we are working with almost Windows only. I discovered also that Mac, can be more difficult.

I really like the ability to convert the log-file back to SQL file, for un-doing mistakes, that customers make.

I now had to use it two times, and this can NEVER be done with mySQL
(or I don’t know a way of way doing this ;-) )

HJK:
I really like the ability to convert the log-file back to SQL file, for un-doing mistakes, that customers make.

I now had to use it two times, and this can NEVER be done with mySQL
(or I don’t know a way of way doing this ;-) )

Start up MySQL with the binary log enabled. This log tracks all statements that modify or can potentially modify data. Then use the mysqlbinlog utility to process the binary log back to SQL output to re-execute.

Sign me up

I have the identical problems to Red’s. Sybase iAnywhere 9.0.2 does not work even vaguely reliably on Intel Mac, Sybase iAnywhere 10 is not the database of choice for Servoy. It is an impasse which I have had no option so far but to use alternative PowerPC or Windows machines to solve. Create the databases on another machine and carry on development on my intel Mac.

I have been struggling with this since I got my MacBook Pro, 12 months ago.

My previous thread about this: http://forum.servoy.com/viewtopic.php?t=7800&highlight=

My solutions have been to run Sybase Central in Windows in Parallels on my Mac, this worked for a while but doesn’t anymore (stacktrace error which survives uninstalling / reinstalling Sybase)

Although it works very well once created, and I second what Harjo said about the invaluable use of log files to undo stupid mistakes. There seems though to be a major barrier in every direction when trying to use iAnywhere to create and manage databases on intel Macs. I have looked into AquaDataStudio but am worried about what it might do to the Repository. I think that the only solution possibly is to use the command line and searching for command line commands to do this today (12 months after my trouble started) is how I stumbled on this thread… If the command line is the best way to get intel macs creating Sybase database files, I think it can hardly be called user friendly or easy (I’m happy to do it mind you).

Just my 2p.

Bevil