Please be aware that the SAP SQL Anywhere Forum will be shut down on August 29th, 2024 when all it's content will be migrated to the SAP Community.


I created one database running as a network server, but after I created another database running on the same network server, I could only connect the previous one.

I want to know if this is possible and how to do it, but couldn't find any example online. I have tried this but the service wouldn't start.

dbsrv12 -n server "c:dbdatabase1.db" -n database1 "c:dbdatabase2.db" -n database2

Any idea?

asked 25 Apr '13, 18:21

bravestone's gravatar image

accept rate: 0%

edited 25 Apr '13, 19:28

Mark%20Culp's gravatar image

Mark Culp

Thanks for all the helps! The issue has been resolved. Actually I should enter the parameters as follows:

-n server "c:\db\database1.db" -n database1 "c:\db\database2.db" -n database2"


dbsrv12 -n server "c:\db\database1.db" -n database1 "c:\db\database2.db" -n database2"

The extra "dbsrv12" caused the trouble(I was using GUI to set up the service).

The server log option works great too.

(26 Apr '13, 10:04) bravestone

You can run up to 254 databases on the same network database server.

To connect to a specific database you need to specify the database name in the client connection string. For example, using your database server command line,

  • to connect to the first database (dbdatabase1.db with alias name 'database1') as user 'dba' with a password of 'sql' you would use a connection string like: "servername=server;dbn=database1;uid=dba;pwd=sql"
  • to connect to the second database you would use a connection string similar to "servername=server;dbn=database1;uid=dba;pwd=sql"

Other connection examples can be found in the documentation.

The complete list of connection parameters can be found here. I would recommend that you read through these pages and become familiar with them.

Note the reason that you were able to connect to the first database is that the first database started on the server is the default database if no databasename (dbn) is specified in the connection string.


permanent link

answered 25 Apr '13, 19:27

Mark%20Culp's gravatar image

Mark Culp
accept rate: 41%

edited 26 Apr '13, 09:50

Yes, multiple databases can be run on one instance of the SQL Anywhere server.

If that service is starting, add a console log output to the start command using the -o parameter (and optionally -on or -os to limit size) like so:

dbsrv12 -n myserver -o server_log.out mydb1.db -n mydb mydb2.db -n mydb2

The output log (server_log.out above) may identify why the server is unable to start.

permanent link

answered 25 Apr '13, 19:21

Tyson%20Lewis's gravatar image

Tyson Lewis
accept rate: 22%

Your answer
toggle preview

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here



Answers and Comments

Markdown Basics

  • *italic* or _italic_
  • **bold** or __bold__
  • link:[text]( "title")
  • image?![alt text](/path/img.jpg "title")
  • numbered list: 1. Foo 2. Bar
  • to add a line break simply add two spaces to where you would like the new line to be.
  • basic HTML tags are also supported

Question tags:


question asked: 25 Apr '13, 18:21

question was seen: 4,136 times

last updated: 26 Apr '13, 11:59