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.

Is it possible to change the database server name provided through the -n option during runtime?

Is it possible to add an alias to the server name during runtime?

asked 12 May '11, 07:12

Martin's gravatar image

Martin
9.0k130169257
accept rate: 14%

How would you expect running clients to behave, based on the fact the server name is usually a very important part of the connection string (at least for pre-12 servers, v12's HOST may make this less necessary)?

(12 May '11, 07:30) Volker Barth
Replies hidden

For v12 this seems to be the solution I am looking for

(12 May '11, 08:56) Martin

No, and no.

I am curious: What do you need it for?

permanent link

answered 12 May '11, 07:57

Breck%20Carter's gravatar image

Breck Carter
32.5k5417261050
accept rate: 20%

I am more interested in the second part to enable or disable an alias for the server name. This would be of use for us at times a client is switching between machines with identical databases.

(12 May '11, 08:46) Martin

When you start a database you can specify an alternate server name for the database. This is an additional server name that can be used only to connect to the database. The alternate server name is the closest thing to changing the server name that SQL Anywhere supports.

High availability uses alternate server names so that a client can use the alternate server name for the database. This alternate server name will be used by which ever of the two partner servers is currently the primary. Perhaps you should consider using high availability which will do this automatically for you.

permanent link

answered 12 May '11, 09:06

Ian%20McHardy's gravatar image

Ian McHardy
3.4k23557
accept rate: 40%

Interestingly - I always have thought -sn is only useful/allowed when using HA. But it isn't, apparently, if I do understand this correctly:)

Obviously when not using HA, you would have to make sure yourself that only one server at a time does use that according -sn alternate server name.

(12 May '11, 09:19) Volker Barth

Thanks Ian, can I change this alternate name for a database during runtime?

(12 May '11, 10:23) Martin
Replies hidden
1

Unfortunately No. An alternate server name can only be specified when starting a database. The is no way to change or add a alternate server name for a running database. Note that you can start and stop databases on a running server.

(12 May '11, 10:43) Ian McHardy
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:

×14
×12

question asked: 12 May '11, 07:12

question was seen: 3,161 times

last updated: 12 May '11, 10:44