• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 1538
  • Last Modified:

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

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 ?
0
ck969
Asked:
ck969
  • 2
1 Solution
 
rramineniCommented:
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.
0
 
Mark GeerlingsDatabase AdministratorCommented:
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.
0
 
DatamonkeyCommented:
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,
e.g.
connect ordsys/password
@?/ord/admin/ordinst.sql

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!
0
 
Mark GeerlingsDatabase AdministratorCommented:
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.
0

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!

  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now