How to access a SQL Anywhere database

authenticationsqlanywheresybase

Currently I have a SQL Anywhere (version 10) database (.db and .log files) – the idea is to extract the data and utilize it for a MS SQL database.

The problem is that I start a SQL Anywhere server and attach the database in question to it, but then when I try to connect to the server, I cannot pass the authentication (I've tried the default dba/sql combo and Windows integrated security).

However, I can use the same server to access the SQL Anywhere demo database without any problems. This leads me to believe that the user authentication is tied to each SQL Anywhere database and not to the SQL Anywhere server which is currently running.

I've read some of the SQL Anywhere Database Administration official documentation, but I didn't come across any strict details on how authentication is handled.

In short, the question is if one can connect to a random SQL Anywhere database which has been just provided by a 3rd party?

Best Regards,
Borislav

Best Answer

Disclosure: I work in SQL Anywhere engineering.

You are correct - to connect to a SQL anywhere database, you need to provide a username / password recognized by that database. When a database is created, a user called "dba" is created with a password of "sql", but users are free (and encouraged!) to change this password. You can even drop the "dba" user if you want, though doing this without having already created another user with DBA authority will lead to problems later.

The answer to your final question is "you can't". To connect to a database, you must have a valid user name for that database and know the password for that user. If you don't have these, you will need to contact the third party that gave you the database.