Please be aware that the content in SAP SQL Anywhere Forum will be migrated to the SAP Community in June and this forum will be retired.

-sn can be used to define an alternate server name for a single database. This approach cannot be used for multiple databases running in the same dbsrv process. Therefore I would like to suggest an option to give the whole database server multiple names. Especially in migration scenarios it could be very convenient, if the database server could have more than one name.

asked 03 Apr '12, 10:46

Martin's gravatar image

Martin
9.0k130169257
accept rate: 14%

4

Interesting suggestion... but I'm not quite sure I understand the usage case. Perhaps you could elaborate on the usage cases where you would find this useful?

(03 Apr '12, 11:20) Mark Culp
Replies hidden

When going from pre-v12 to v12, you might be able to use

  1. ENG for pre-v12 connections and
  2. HOST (without ENG/SERVER) for v12 connections,

so the same databases on one engine could be reached via different "names" (ENG vs. HOST), and the ENG value could be different (as it would not be relevant for v12) - but I'm not sure if that would meet your requirements...

(04 Apr '12, 16:37) Volker Barth

Mark you have fully understood my request. Such a feature would make life much easier for us in scenarios where we migrate clients from one server to another hardware box. It is comparable to a webserver responding to multiple domain names.

(05 Apr '12, 03:10) Martin

Could you still tell more about this: Do you want to be able to "automatically" switch clients from one server to another without having to change client connection strings? (That would be doable with simply changing ENG/SERVER names (or HOST names or IP addresses) but would not work when not all clients should be "switched" in the same time.)

It might be a help if you tell what exactly should work (and does not currently)...

(05 Apr '12, 03:26) Volker Barth

The core part is, that I would like to have a server side influence without the need to change all client configurations. It is like having multiple IP-adresses for the same server, or in my desire having a db server with mutliple names. I don't say that there might by other solutions, I think it would just be more convenient.

(05 Apr '12, 05:05) Martin

AFAIK, a server surely can list on different IP addresses if it has several network adapters (i.e. -x "tcpip(MyIP=192.75.209.12,192.75.209.32)"), so it could serve clients using different server IP addresses.

However, it would still require to use the same ENG/SERVER name for all clients - unless they are v12 and do use the HOST connection parameter, as that will work without having to supply a SERVER/ENG connection parameter...


I agree that this is a workaround (in case it does work) and not the solution you are looking for.

(05 Apr '12, 05:28) Volker Barth
showing 2 of 6 show all flat view

You can use the -n Option to name each Database you load into the server.

 database-file -n string ...

http://dcx.sybase.com/index.html#1201/en/dbadmin/db-n-database-dbengine.html

Is that what you are looking for ?

permanent link

answered 04 Apr '12, 14:41

Thomas%20Duemesnil's gravatar image

Thomas Dueme...
2.7k293965
accept rate: 17%

1

Thomas: no I do not believe this is what Martin is looking for. The -n switch that comes after a database file name gives a name to the database, not the server. I believe that Martin would like to have multiple names given to a server so that it would respond to any one of those names. I am just not sure what the usage case would be to have a server responding to multiple names. Note the -sn database switch was implemented so that both partner servers hosting the copies of a single database in an HA system could respond to the same server name when the server is acting as the primary. Since the -sn switch only applies to a particular database running on the server all connection requests using the -sn alternate server name must be to its respective database.

(04 Apr '12, 16:05) Mark Culp

I was stuck with "multiple databases running in the same dbsrv process". This was for me the keyword for the -n switch. But we will see what Martin is really interested in.

(04 Apr '12, 16:34) Thomas Dueme...
Your answer
toggle preview

Follow this question

By Email:

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

By RSS:

Answers

Answers and Comments

Markdown Basics

  • *italic* or _italic_
  • **bold** or __bold__
  • link:[text](http://url.com/ "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:

×113

question asked: 03 Apr '12, 10:46

question was seen: 1,680 times

last updated: 05 Apr '12, 05:29