on 2017 Jul 28 2:22 PM
What is the default user id, password, server name and database name to connect to sql anywhere DB
Request clarification before answering.
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
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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.
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:)
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
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...
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“.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
87 | |
9 | |
9 | |
8 | |
6 | |
6 | |
6 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.