Can't create a field of type ordsys.ordimage ?

Posted on 2003-03-04
Medium Priority
Last Modified: 2007-12-19
I was trying to store images in Oracle database, so I create simple table :

create table pictures
(id number,
 image ordsys.ordimage);

and i got this error for 'ordsys.ordimage':
ORA-00902: invalid datatype

I can see the ORDSYS schema in the database, so I presumed the object exists, what else I have to check ?
Question by:ck969
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2

Expert Comment

ID: 8064586
How did you check?. Also did you check if you had proper privileges inorder to access the ordsys objects. May be you need to grant privileges to your current schema in order to reference these objects.
LVL 35

Expert Comment

by:Mark Geerlings
ID: 8065777
Normally in a "create table..." statement the data type for each column is explicitly specified, like this:

create table pictures
(id number,
image blob);

In PL\SQL it is possible to create variables that get their datatype from an existing table in the database, using syntax similar to what you tried (ordsys.ordimage%type), but I haven't ever seen that syntax used in a "create table..." statement.

It is possible to create tables that use user-defined data types instaed of the standard data types that Oracle supports.  If "ordimage" is a datatype then it may be possible to use that in a "create table..." statement, but the type may need to be in the same schema as the table.  If "ordimage" is just a column in a table, then no, you cannot create a table with that syntax.

Accepted Solution

Datamonkey earned 150 total points
ID: 8071577
Mark - ORDIMAGE is an object datatype of Oracle Intermedia.

CK - It sounds like the Intermedia install on that instance is incomplete: ORDSYS.ORDImage is granted to PUBLIC as part of a successful install (by install script $ORACLE_HOME/ord/im/admin/imiordsy.sql which is called from ordinst.sql)

The  script to install Intermedia is $ORACLE_HOME/ord/admin/ordinst.sql and should be run as ORDSYS,
connect ordsys/password

Would suggest spooling the script and checking the resulting file for errors. If there is part-complete install you may want to drop user ordsys cascade ; first but obviously do this with caution in case someone else is using it!
LVL 35

Expert Comment

by:Mark Geerlings
ID: 8071869
Thank you, Datamonkey.  I haven't used or seen Oracle Intermedia so I didn't recognize that datatype.  Oracle is getting so broad these days that no one can be a master of all aspects of Oracle.

Featured Post

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Why doesn't the Oracle optimizer use my index? Querying too much data Most Oracle developers know that an index is useful when you can use it to restrict your result set to a small number of the total rows in a table. So, the obvious side…
When it comes to protecting Oracle Database servers and systems, there are a ton of myths out there. Here are the most common.
This video shows how to copy a database user from one database to another user DBMS_METADATA.  It also shows how to copy a user's permissions and discusses password hash differences between Oracle 10g and 11g.
This videos aims to give the viewer a basic demonstration of how a user can query current session information by using the SYS_CONTEXT function
Suggested Courses

765 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question