Ora-30657:operation not supported on external organized table

Source: Internet
Author: User

ORA-30657 error when you update the Mail field of a User information table

sql> Update class_users set email= ' XXXXXXXXX@qq.com ' where id = 73257;
Update class_users set email= ' XXXXXXXXX@qq.com ' WHERE id = 73257
*
ERROR at line 1:
Ora-30657:operation not supported on external organized table


This error is because the Class_users table is an external table and cannot be updated directly to update the contents of the referenced text file directly

Sql> Select Object_name,object_type from user_objects where object_name= ' class_users ';

object_name object_type
----------------------------------- -------------------
Class_users TABLE

Sql> SELECT * from tab where tname= ' class_users ';
Tname Tabtype Clusterid
------------------------------ ------- ----------
Class_users TABLE

Sql> Set Long 9999999
Sql> Select Dbms_metadata.get_ddl (' TABLE ', ' class_users ') from dual;

Dbms_metadata. GET_DDL (' TABLE ', ' class_users ')
--------------------------------------------------------------------------------

CREATE TABLE "Newcourse". " Class_users "
("ID" number (10,0),
"User_name" VARCHAR2 (150),
"PASSWD" VARCHAR2 (32),
"CHANNEL" VARCHAR2 (50),
"PROPERTIES" number (19,0),
"EMAIL" VARCHAR2 (250),
"MOBILE" VARCHAR2 (20),
"Email_verified" number (1,0),
"Mobile_verified" number (1,0),
"ROLE" Number (1,0)
)
ORGANIZATION EXTERNAL
(TYPE Oracle_loader
DEFAULT DIRECTORY "Dpdir"
ACCESS PARAMETERS
(Records delimited by newline
Fields terminated by ', '
)
Location
(' Class_users.info '
)
)
REJECT LIMIT UNLIMITED

Sql> Select Directory_path from dba_directories where directory_name= ' Dpdir ';

Directory_path
--------------------------------------------------------------------------------------------------------------- ---------
/tol/backup/dmp

ql> Col Email for A35
Sql> Select Id,email from class_users where id = 73257;

ID EMAIL
---------- -----------------------------------
73257


sql> desc class_users;
Name Null? Type
----------------------------------------- -------- ----------------------------
ID Number (10)
User_name VARCHAR2 (150)
PASSWD VARCHAR2 (32)
CHANNEL VARCHAR2 (50)
PROPERTIES Number (19)
EMAIL VARCHAR2 (250)
MOBILE VARCHAR2 (20)
Email_verified Number (1)
Mobile_verified Number (1)
ROLE Number (1)

+ + + Edit the Class_users.info file in the/tol/backup/dmp directory, find the record for id=73257, and change to:
73257,amosquito6,63c4d05e73b829727c1ff47bd4388d00,class,0,345305538@qq.com,,0,0,0

+ + + Query again:
Sql> Select Id,email from class_users where id = 73257;

ID EMAIL
---------- -----------------------------------
73257 345305538@qq.com


Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.