cancel
Showing results for 
Search instead for 
Did you mean: 

What is the default user id, password, server name and database name to connect to sql anywhere DB

Former Member
0 Kudos
7,496

What is the default user id, password, server name and database name to connect to sql anywhere DB

Accepted Solutions (0)

Answers (2)

Answers (2)

Breck_Carter
Participant
0 Kudos

dba, sql, demo, demo

...for the SQL Anywhere 16 sample database C:\\Users\\Public\\Documents\\SQL Anywhere 16\\Samples\\demo.db

...and the SQL Anywhere 17 sample database C:\\Users\\Public\\Documents\\SQL Anywhere 17\\Samples\\demo.db

VolkerBarth
Contributor
0 Kudos

Hm, AFAIK, the server name for the sample database is different for each version, i.e. "demo16" for SQL Anywhere 16 and "demo17" for SQL Anywhere 17, when started via the according menu entries/ODBC DSN entries - in case that is what the question is really all about...:)

Breck_Carter
Participant
0 Kudos

I liked your original answer better because it was a practical answer: "There's no default" 🙂

However... the ODBC DSNs you mention contain override values for the default server names.

The default dbeng -n server name is the same as the database name. In turn, the default dbeng -n database name is the same as the file name, which in this case is demo.

This can be demonstrated as follows:

Start - All Programs - SQL Anywhere 16 - Personal Server

In the popup window, browse to C:\\Users\\Public\\Documents\\SQL Anywhere 16\\Samples\\demo.db

This method is arguably more direct ( more "default" 🙂 than using an ODBC connection to auto-start a database. It also doesn't specify any values for server or database name, hence the defaults demo and demo.

VolkerBarth
Contributor
0 Kudos

Well, I had no machine available when I made my comment but have confirmed it now (at least for my setups but I have not modified those):

With SQL Anywhere 12, 16 and 17, both the default ODBC system DSNs for the sample database and the according program menu entries to start the sample database (both 32-bit and 64-bit) do name the server explicitly via -n demo12/demo16/demo17 resp. via supplying that as a connection parameter.

Of course one can override that, but I guess they are different by design to prevent the "mixing" of those databases. (Personally, I use them mostly for answering forum questions, and find myself often with "left open demo databases", and then find that I try to connect to the demo database of another version, noticable by the different server name.)

Of course, YMMV, and I'm still not sure that's the question here at all:)

Breck_Carter
Participant

I used to believe "ODBC Is Evil" but finally saw the light: DSNs are the problem.

...in other words life became easier after I stopped using DSNs altogether 🙂

And now it's time to

justin_willey
Participant
0 Kudos

Abandoning DSNs is definitely helpful in the battle to retain sanity.

Breck_Carter
Participant
0 Kudos

It really irks me that it . . . took . . . so . . . many . . . years for me to realize DSNs are the problem, not ODBC.

Now I have to decide: Should the "DSN" tab be dropped from Foxhound? Alas, probably not...

VolkerBarth
Contributor
0 Kudos

Hm, in my book, for SQL Anywhere, DSNs are primarily “meta“ or “super“ connection parameters, and have there advantages and disadvantages like other abstractions, so I don't treat them as evil.

Even when omitting them, SQL Anywhere can still make it somewhat difficult to predict connecting behaviour, think of the SQLCONNECT environment variable or the many defaults...

Vlad
Product and Topic Expert
Product and Topic Expert
0 Kudos

How did he disappear?!

VolkerBarth
Contributor
0 Kudos

There's no default database, and therefore there's no default server name or database name - it depends on the particular database.

For SQL Anywhere 16 and below, you can find the default DBA credentials here in the section “Product-wide behavior changes and deprecated or removed features“.