on 2020 Sep 07 11:21 AM
Using SQL Anywhere 17, is there really still no way to easily rename a user? Deleting and re-creating the user seems a bit clunky.
That's right, the inability to rename a user has been baked into SQL Anywhere since the beginning of time.
But wait, it gets worse: Dropping a user drops all the objects owned by that user... "a bit clunky" is too kind 🙂
It's a clear violation of The Watcom Rule ("Watcom does things the way they should be done") but it's unlikely to be changed any time soon.
There is a kludgy workaround: Create a new user with the new name. Remove the password from the user with the old name so it can't be used to connect. If necessary GRANT GROUP to the old user, and make the new user a member of that group so it can "see" all the objects still owned by the old user. Grant other privileges as necessary, so the new user can do all the same stuff as the old user. This is fraught with errors, but the errors involve ease of use rather than loss of data.
In some setups this is not too difficult, since ordinary users don't own anything.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
> change the owner of tables
IMO that eliminates most use cases for "rename user".
I saw the old thread, but took away that is was more about changing table owners than renaming users. And I was hoping in v17 something had changed.
One of Breck's comments in that thread hit close to home for me: "If someone wants to **** around with "schemas" they should switch over to Oracle or some other offense against nature". We (as in the PTB, not me) are looking to move to a different ERP system, which has Oracle on the backend, so I started poking around to learn about it. Eek.
User | Count |
---|---|
68 | |
10 | |
10 | |
7 | |
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.