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. asked 07 Sep '20, 10:21 Bud Durland MRP |
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. answered 07 Sep '20, 10:56 Breck Carter Old thread: https://sqlanywhere-forum.sap.com/questions/13036/how-to-change-the-owner-of-a-database-object
(07 Sep '20, 11:38)
Vlad
Replies hidden
Note that v16 introduced to facility to change the owner of tables, which was not valid at the time of that old discussion...
(07 Sep '20, 15:24)
Volker Barth
ah, ok. I thought this link might be helpful because of the discussion from there.
(08 Sep '20, 02:46)
Vlad
I think so, too :)
(08 Sep '20, 05:41)
Volker Barth
2
> change the owner of tables IMO that eliminates most use cases for "rename user".
(08 Sep '20, 10:26)
Breck Carter
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.
(09 Sep '20, 08:21)
Bud Durland MRP
|