Change DB Password in Server

Hi,

I finally decided to change the password for a database with SQLAnywhere. Everything went fine in Developer, connects fine to it there, but when I run the solution from Server it is using the ‘old’ password and clients get an error message saying ‘form data cannot load’ (of course). I see on the Server pages it says to change the password directly in the properties file. However there the password is encrypted. Do I just type it in unencrypted (that doesn’t work)? Why when I change it in Developer (presumably using the same properties file) the solution loads correctly but when I run it from Server it doesn’t? Help please :o

Hi John,

john.allen:
Why when I change it in Developer (presumably using the same properties file) the solution loads correctly but when I run it from Server it doesn’t?

Eh? You run Developer and Server on the same machine? If so then you need to restart Server to make it see the changes.

john.allen:
Eh? You run Developer and Server on the same machine? If so then you need to restart Server to make it see the changes.

Thanks Robert for the help. Well to change the password of the database for the properties file that seemed to be the easiest way to do that. (Never changed the password before of a back end database for Servoy). Is that wrong? I’ve relaunched the server multiple times since (Mac OS 10.5, Servoy 3.5.10) using the ‘servoy_server.sh’ file under Terminal. Doesn’t work. Says can’t launch that database file. Shut it down. Run it under developer from the same directory, no problem. (That’s how I always start the database in fact is with Developer. Quit Developer and with dbserv running then start servoy_server.sh…). Can’t seem to figure out any other way to change the password even though it says specifically on the Admin Server page where your dataservers are all listed that the way to do that is by manually changing them in the properties file. Don’t Developer and Servoy Server share exactly the same properties file when run from the same directory?

Anybody got any suggestions on this? How do you go about changing the password that Servoy uses to access a database? Under Developer no problem. But Servoy Server doesn’t seem to pick up on that change. It’s weird but almost seems like it is using a different properties file… You can’t change it with the Admin pages and you can’t manually change it in the properties file as that page suggests because it is encrypted… I don’t get it.

john.allen:
you can’t manually change it in the properties file as that page suggests because it is encrypted

You can! Servoy can encrypt the password for you.

  1. Stop the server.
  2. Enter the pasword in plain text in the properties file, so without the “encrypted:”-part.
  3. Startup the server and on the admin pages, press the “Save settings”-button for the particular database.
  4. Restart the sever once more to save the changes, the password in the property file is encrypted again.

Thanks Joas for the reply. Unfortunately this doesn’t seem to work or I’m doing something really stupid.

I stop the server (presumably just the Servoy Server not the DB server). I change the password in the properties file from:
server.6.password=encrypted:tbwFDD+ZaaQ=
to
server.6.password=password
(I’ve tried different combinations leaving in the trailing backslash and/or the equal sign but nothing seemed to work so figure that this is what it needs as that is how it was done when the password was unencrypted back in the Servoy 2 days)
I then save the properties file in TextEdit. I then restart the Servoy server and press the “Save settings” button for that database. I do get the error message in that database box saying: “Could not get a connection with the updated server. See log for more details.
Reason: java.sql.SQLException: JZ00L: Login failed. Examine the SQLWarnings chained to this exception for the reason(s).” Nevertheless I close the admin page, restart Servoy Server but still have no connection and password in the properties file is still unencrypted.

Could this be a Mac thing? (running servoy_server.sh to start the server). I just can’t figure out now how to do this.

I’ve also now tried shutting everything down (DB and Server). Restarting Developer, removing that DB connection completely. Shut down the DB server and Developer. Confirmed that db connection was not in properties file. Restarted Developer, made new connection to that database. Shut down Developer, saw new/old connection was back in the properties file with the password again encrypted. Restarted Servoy Server. Still having the same problem. Can’t delete that Server connection in the Servoy Admin pages (it’s greyed out). Can’t make a new db connection to ‘override’ the current one as ‘it already exists under that name’. I’m pretty stuck…

Fixed. Don’t know quite how. But started developer on a second computer pointing to the SQLAnywhere running on the first computer. Reset the password and copied the properties file from that computer to the first. Then it worked… Must have been something funny in that properties file I guess. I am correct though that normally one should be able to change the password in a database, then go into Developer and reset the password there for that db connection, close Developer (but not SQLAnywhere if that is the database) and then restart Servoy Server, no? Normally everything should work correctly with that?