02 September,2015 by Tom Collins
Question: I am new to DB2 and have a question about the post SQL0286N A default table space could not be found - DBA DB2
I want to access a database schema from a client on my desktop. However, I am not sure how to grant my windows username to the new schema
Answer: On Windows , users and groups in db2 are handled by the OS, use OS tools to find the list of users. You can then use various commands within DB2 to confirm privileges. And execute any GRANT statements
This includes local Windows users and Active Directory users
SQL0286N A default table space could not be found - DBA DB2 - DBA DB2 outlines steps on how to grant privileges to a schema - but prior to executing these commands the user needs to be set up and added to a group
There are a number of different ways to organise users. The method below is based on users being added to a Windows group. Privileges are then assigned to the group.
Before you make any changes – find out whether the username you’re using is in the right Windows group. Typically – Windows groups are set up such as these examples:DB2ADMNS and DB2USERS. Then users are added to these groups.
Check in computer management | Local Users and Groups
If the intended user is not in the relevant group , then add to the group.
Proceed with granting privileges to the group by using similar commands as on :SQL0286N A default table space could not be found - DBA DB2
Depending on your specific set up – you may need to grant to GROUP rather than USER. Follow this link to GRANT (schema privileges) statement
Some other useful sql commands
To list all schemas on a database
select SCHEMANAME from syscat.schemata
To check user authority levels – check the sysibm.sysuserauth
Select * from sysibm.sysuserauth where grantee = ‘user’
DB2 – Audit Failed logons - DBA DB2
This is only a preview. Your comment has not yet been posted.
As a final step before posting your comment, enter the letters and numbers you see in the image below. This prevents automated programs from posting comments.
Having trouble reading this image? View an alternate.
Posted by: |