Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ISQL command SHOW USERS display only me [CORE4503] #4822

Closed
firebird-automations opened this issue Jul 30, 2014 · 8 comments
Closed

ISQL command SHOW USERS display only me [CORE4503] #4822

firebird-automations opened this issue Jul 30, 2014 · 8 comments

Comments

@firebird-automations
Copy link
Collaborator

Submitted by: @sim1984

Use CONNECT or CREATE DATABASE to specify a database
SQL> connect 'localhost:test' user 'sysdba' password 'masterkey';
Database: 'localhost:test', User: sysdba
SQL> show users;
Users in the database
#⁠ SYSDBA
SQL> set list on;
SQL> select * from sec$users;

SEC$USER_NAME SYSDBA
SEC$FIRST_NAME <null>
SEC$MIDDLE_NAME <null>
SEC$LAST_NAME <null>
SEC$ACTIVE <true>
SEC$ADMIN <false>
SEC$DESCRIPTION <null>

SEC$USER_NAME TEST
SEC$FIRST_NAME <null>
SEC$MIDDLE_NAME <null>
SEC$LAST_NAME <null>
SEC$ACTIVE <true>
SEC$ADMIN <false>
SEC$DESCRIPTION <null>

Since FB3 appeared pseudo table sec$users, you can use its commands to show users, rather than service api now.
Command will show users could be more. In addition to the user name in the same output FIRST_NAME, MIDDLE_NAME, LAST_NAME, ACTIVE and ADMIN columns.

Commits: 5a896e2 FirebirdSQL/fbt-repository@abae9cc

@firebird-automations
Copy link
Collaborator Author

Modified by: @AlexPeshkoff

assignee: Alexander Peshkov [ alexpeshkoff ]

@firebird-automations
Copy link
Collaborator Author

Commented by: @AlexPeshkoff

One detail to discuss. (I've already thought about changing SHOW USERS, but...)
Currently isql shows users, connected to database. This set may be wider than one present in security database if you use some unrelated to sec db plugin (for example, windows trusted auth).
What do you suggest to do in that case?

@firebird-automations
Copy link
Collaborator Author

Commented by: @sim1984

I do not know the answer to this question. Will show that in this case, the query "select * from sec$users"?
Perhaps that in such cases keep the current behavior or focus on what is there on the mapping security.fdb.
In Realese Notes said "This feature depends highly on the user management plug-in. Take into an account that some options are ignored when using the legacy user management plug-in."

@firebird-automations
Copy link
Collaborator Author

Modified by: @dyemanov

Regression: 3.0 Alpha 2 [ 10560 ]

@firebird-automations
Copy link
Collaborator Author

Commented by: @AlexPeshkoff

ISQL now displays both users logged in into database and present in security database. Current user (as before) is marked with '#⁠' sign. Users logged but not present in security database are marked with '-' sign. Also number of connections for each user is shown (may be zero when user is defined in security database but not logged in).

@firebird-automations
Copy link
Collaborator Author

Modified by: @AlexPeshkoff

status: Open [ 1 ] => Resolved [ 5 ]

resolution: Fixed [ 1 ]

Fix Version: 3.0 Beta 2 [ 10586 ]

@firebird-automations
Copy link
Collaborator Author

Modified by: @pavel-zotov

status: Resolved [ 5 ] => Resolved [ 5 ]

QA Status: Done successfully

@firebird-automations
Copy link
Collaborator Author

Modified by: @pavel-zotov

status: Resolved [ 5 ] => Closed [ 6 ]

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants