Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How to grant access or view users in sql

Status
Not open for further replies.

lpblauen

Technical User
Dec 2, 2004
193
US
I need to be able to find out what users have been added to the sql database for cashdb and cauniidb.

Also what there access levels are or have connect and or dba granted in the sql.

I had to add a user and I need to make sure he has the same access as another user.

Is there a way to see this. This is how I added the user.

sql

connect to cashdb;
grant connect to userid;
release;
quit;

Sorry I’m not a dba so I’m lost in this area.

 
open up SQL enterprise manager and then open up the server and then look at the database. you will see an option there that says "Users" click on that and you will be able to see what users are added and if you double click on the user, you will be able to see their rights.

If you are new to Unicenter I would suggest getting a basic understanding of SQL. There are honestly things that can be with SQL that are lot easier to handle then going through Unicenter
 
I need a command line option. Its AIX we are running on and we are not using the security piece. I have no gui interface to the database.
 
try this resource Sorry I cant help you as there are a number of versions of SQL and my background is with Microsofts version of SQL (TSQL)
 
To answer your questions, please run the following commands as the <root> user:
The commands from the caiunidb/cashdb/secdb are:
SQL: connect to <db>;
SQL: grant <dba/connect> to <userid>; // grant dba or connect to users
SQL: revoke <dba/connect> from <userid>; // revoke dba users
SQL: select * from system.specauth; // list dba/connect users
SQL: release; quit;
--------------------------------------------------------------------------
To add a user to the caiunidb 'UNIGRP' use the following:
SQL: connect to caiunidb;
SQL: add <userid> to group unigrp; // adds users to group UNIGRP
SQL: release;
SQL: quit;
To double check which user have 'unigrp' authority for the caiunidb:
SQL: connect to caiunidb;
SQL: select * from system.group where groupid='UNIGRP';
SQL: release;
SQL: quit;
To remove a user from the UNIGRP:
SQL: connect to caiunidb;
SQL: remove <userid> from group unigrp;
SQL: release;
SQL: quit;
To see all permissions/groups for a database:
SQL: connect to <db>;
SQL: select * from system.specauth;
SQL: release;
SQL: quit;
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top