- Trending Categories
Data Structure
Networking
RDBMS
Operating System
Java
iOS
HTML
CSS
Android
Python
C Programming
C++
C#
MongoDB
MySQL
Javascript
PHP
Physics
Chemistry
Biology
Mathematics
English
Economics
Psychology
Social Studies
Fashion Studies
Legal Studies
- Selected Reading
- UPSC IAS Exams Notes
- Developer's Best Practices
- Questions and Answers
- Effective Resume Writing
- HR Interview Questions
- Computer Glossary
- Who is Who
What is -551 error code in DB2? How will you resolve it?
When we get -551 in the SQLCODE then there is some privilege level issue. It signifies that the user does not have access to the database/tablespace/view/table that he is trying to access. As per the IBM documentation -551 SQLCODE states that.
Example
-551 auth-id DOES NOT HAVE THE PRIVILEGE TO PERFORM OPERATION operation ON OBJECT object-name
There are DCL (Data control language) statements which are used by DBAs in order to control the access on DB2 objects. We can raise a request with DBA to provide access to the particular object for which user is getting -551 SQLCODE.
Following DCL statement will give access to user id Z5564 to execute PLAN ORDERPLAN:
GRANT EXECUTE ON PLAN ORDERPLAN TO Z5564
In a practical scenario, the access on DB2 objects such as PLAN, TABLES, VIEWS, etc., is given at RACF level rather than at user level. RACF stands for Resource Access Control Facility which is a Z/OS security management product used for providing access control and auditing purposes.
The RACF contains its own database having different RACF groups. Each user in the mainframe will be assigned to a RACF group.
For example, there are 3 departments in an organization: SALES, MARKETING, WARRANTY. So, 3 RACF groups can be created for each department and each RACF group has employee user ids for respective employees. The access to DB2 can be given based on RACF groups. So the SALES group can have access to ORDERS, TRANSACTIONS table. The MARKETING group can have access to DEALERS and INCENTIVE table and WARRANTY group can have access to PRODUCTS and VENDORS table.
If the user from one RACF group will try to access the table assigned for a different group, then the user will get -551 DB2 error code.
- Related Articles
- Resolve MySQL ERROR 1064 (42000): You have an error in your syntax?
- What is STORED PROCEDURE in a DB2? How will you create a new stored procedure?
- Error 1046 No database Selected, how to resolve?
- What is Babel, and how will it help you write JavaScript?
- What is the nature of non-metallic oxides? How will you test it?
- What is a use of DSNTIAR? How will you implement it in a COBOLDB2 program?
- Resolve the MySQL error 'TYPE=MyISAM'?
- How will you keep the CURSOR open after firing COMMIT in a COBOL-DB2 program?
- How will you extract multiple rows from a DB2 table in a single FETCH call?
- Unreachable Code Error in Java
- Resolve Unknown database in JDBC error with Java-MySQL?\n
- Resolve Syntax error near “ORDER BY order DESC” in MySQL?
- What is Code Injection? (How it Works, How to Prevent)
- How will you find out all the indexes which are built in a particular DB2 table?
- What is the purpose of OPTIMIZE FOR ROWS in DB2 SQLs? How is it useful?
