Adsense Ad

Thursday, 18 May 2017

Oracle: ORA-06564 Error Message

ORA-06564 Error Message

Learn the cause and how to resolve the ORA-06564 error message in Oracle.

Description

When you encounter an ORA-06564 error, the following error message will appear:
  • ORA-06564: object name does not exist

Cause

You tried to reference an object that either does not exist or you do not have privileges to access it.

Resolution

The option(s) to resolve this Oracle error are:

Option #1

If the object does not exist, create this object.
You can use the CREATE TABLE statement to create a table.
CREATE TABLE table_name
( 
  column1 datatype [ NULL | NOT NULL ],
  column2 datatype [ NULL | NOT NULL ],
  ...
);
For example, you can create a table called customers which has 3 columns as follows:
CREATE TABLE customers
( customer_id number(10) not null,
  customer_name varchar2(50) not null,
  city varchar2(50)
);

Option #2

If you do not have privileges to this object, ask the object owner or DBA to grant you access to it.
You can use the GRANT statement to grant privileges to the object using the following syntax:
GRANT privileges ON object TO user;
For example, if you wanted to grant SELECT, INSERT, UPDATE, and DELETE privileges on a table called customers to the user smithj, you would run the following GRANT statement:
GRANT SELECT, INSERT, UPDATE, DELETE ON customers TO smithj;

No comments: