-------------------------------------------------------------------------------
Oracle Visual Information Retrieval Frequently Asked Questions
-------------------------------------------------------------------------------
Last Updated:  May 21, 1999

Here are some answers to questions that you might have while installing 
and using Oracle Visual Information Retrieval.
	
-------------------------------------------------------------------------------
Contents
	SECTION I: Configuration Issues
  	  Problem: I can't create a table using the ORDVIR type.
   	  Problem: I get errors while installing Visual Information Retrieval.
  	  Problem: The type exists, but I get errors when I try to use it.
   	  Problem: I'm sure I installed Visual Information Retrieval 
                   correctly, but I'm getting RPC errors:
   	  Problem: How do I know when it works? Is there an easy script to run?
	
	SECTION II: Usage Issues
   	  Problem: I have a simple select statement that doesn't seem to work: 
   	  Problem: Does the Import/Export utility support Visual Information 
	    	   Retrieval directly?
   	  Problem: Does SQL*Loader support Visual Information Retrieval?
  	  Problem: Does Visual Information Retrieval support read only media, 
                   such as CDROMs?
   	  Problem: How do I extract the full path from a directory object?

	SECTION III: General Questions
-------------------------------------------------------------------------------

-------------------------------------------------------------------------------
SECTION I: Configuration Issues
-------------------------------------------------------------------------------

-------------------------------------------------------------------------------
1)	Problem: I can't create a table using the ORDVIR type.
-------------------------------------------------------------------------------
	Symptom: ORA-00902: invalid datatype

	Answer:  Oracle Visual Information Retrieval was not configured.

	Solution I: Configure Oracle Visual Information Retrieval.
                Run DBCA to configure Oracle Visual Information Retrieval.    

	Solution II: Install by hand.
                If Solution I fails, install Visual Information Retrieval 
                by hand following the manual installation instructions in 
                the README.txt file, found in <ORACLE_HOME>/ord/vir/admin,
                where <ORACLE_HOME> is the location of the Oracle home
                directory.  On NT, the README.txt file is in
                <ORACLE_HOME>\ord\vir\admin.

 
-------------------------------------------------------------------------------
2) 	Problem: I get errors while installing Visual Information Retrieval.
-------------------------------------------------------------------------------
	Symptom: MGR-00072: Warning: PACKAGE BODY ORDVIR_PKG created with
		 compilation errors.

	Symptom: PLS-00201: identifier 'ORDVIRLIBS' must be declared                    
	Answer:  The shared library doesn't exist.

	Solution: Recreate the library.
	  For UNIX:
	    	create or replace library ordvirlibS as 
                       '<ORACLE_HOME>/lib/libordvir8.so';

	    	where <ORACLE_HOME> is the value of the ORACLE_HOME 
	    	environment variable.
	  For NT:
	    	create or replace library ordvirlibS as 
                       '<ORACLE_HOME>\BIN\ORAORDVIR8.DLL';

	    	where <ORACLE_HOME> is the location of the Oracle home 
                directory.

-------------------------------------------------------------------------------
3)	Problem: The type exists, but I get errors when I try to use it.
-------------------------------------------------------------------------------

	Symptom: ORA-06520: PL/SQL: Error loading external library
		 ORA-06522: ld.so.1: extprocextproc: fatal: 
                                     /path/libordvir8.so: 
		 can't open file: errno=2
		 ORA-06512: at "ORDSYS.ORDVIR_PKG", line 207
	         ORA-06512: at "ORDSYS.ORDVIRF", line 8

	Answer: The path for the shared library is invalid. 

	Solution: Recreate the library with the full path name of the library.
	  For UNIX:
	    create or replace library ordvirlibS as 
                   '<ORACLE_HOME>/lib/libordvir8.so';

	    where <ORACLE_HOME> is the value of the ORACLE_HOME 
	    environment variable.
	  For NT:
	    create or replace library ordvirlibS as 
                   '<ORACLE_HOME>\BIN\ORAORDVIR8.DLL';

	    where <ORACLE_HOME> is the location of the oracle home directory.

	Symptom: ORA-04068: existing state of packages has been discarded
	         ORA-04063: package body "ORDSYS.ORDVIR_PKG" has errors
		 ORA-06508: PL/SQL: could not find program unit being called
		 ORA-06512: at "ORDSYS.ORDVIRF", line 8

	Answer:  The library ORDVIRLIBS may not exist (see above) or the
                 package needs to be recompiled.

	Solution: Recompile the package.
		connect ordsys/<ordsys password>;
		alter package ordvir_pkg compile

                where <ordsys password> is the password for the ordsys
                account.

-------------------------------------------------------------------------------
4) 	Problem: I'm sure I installed Visual Information Retrieval correctly, 
                 but I'm getting RPC errors:
-------------------------------------------------------------------------------
	Symptom: ORA-28576: lost RPC connection to external procedure agent  
  
	Answer:  The connection information in tnsnames.ora and listener.ora
		 is correct, but the program failed. This is due to 
		 conflicting SID_NAME/SID entries in the listener.ora and 
		 tnsnames.ora files. In other words, the extproc SID_NAME
		 in listener.ora is also being used by another entry.

\	Solution:Change the SID_NAME for the extproc entry to something 
		 unique, e.g. extproc or extproc2. Be sure to update the
		 SID entry for extproc_connection_data in the tnsnames.ora 
		 file to also refer to extproc or extproc2.

	Solution:Test using virdemo with the virdemo1.dat image. If there are 
                 no errors with the virdemo1.dat image, but when you perform
                 the same operations on your custom images you get this error,
                 then you've found a bug. Please notify your support 
                 representative.

	Symptom: ORA-28575: unable to open RPC connection to external 
		 procedure agent
		 ORA-06512: at "ORDSYS.ORDVIR_PKG", line 207
		 ORA-06512: at "ORDSYS.ORDVIRF", line 8

	Answer:  The external callout program 'extproc' in your tnsnames.ora 
		 file is either invalid or not present.

	Answer:  The external callout program 'extproc' in your listener.ora 
		 file is either invalid or not present.

	Solution: Add/edit the extproc entry in tnsnames.ora. 
		  Check the network configuration guide for your platform
		  for details on creating an entry for extproc.
		
		For UNIX: Add this line in 
		          /<ORACLE_HOME>/network/admin/tnsnames.ora

		extproc_connection_data =
		(DESCRIPTION=(ADDRESS=(PROTOCOL=ipc)(KEY=yourkey))
		(CONNECT_DATA=(SID=extproc)))   

		For NT: Add/edit this line in
		        <ORACLE_HOME>\NETWORK\ADMIN\TNSNAMES.ora

		extproc_connection_data.world = (
		(DESCRIPTION = 
			(ADDRESS = 
				(PROTOCOL=IPC) (KEY=yourkey)
			)
			(CONNECT_DATA = (SID=PLSExtProc)
                                        (PRESENTATION = R0))
		)	

	Solution: Add/edit the extproc entry in listener.ora.
		  Check the network configuration guide for your platform
		  for details on creating an entry for extproc.
		  After you edit the listener.ora file, you must stop
		  and restart the listener. 

		For UNIX: Add/edit this line in 
		          /<ORACLE_HOME>/network/admin/listener.ora


		LISTENER = (ADDRESS_LIST=
 			(ADDRESS=(PROTOCOL=ipc)(KEY=yourkey))
		)

		SID_LIST_LISTENER = (SID_LIST=
 		(SID_DESC=(SID_NAME=yourdb)(ORACLE_HOME=youroraclehome))
 		(SID_DESC=(SID_NAME=extproc)(ORACLE_HOME=youroraclehome)
				(PROGRAM=extproc))
		)

		To stop and restart the listener: lsnrctl
		set password oracle
		stop
		start
		quit

		For NT: Add/edit this line in
		        <ORACLE_HOME>\NETWORK\ADMIN\LISTENER.ora
	
		SID_LIST_LISTENER = 
		  (SID_LIST=
 		    (SID_DESC=
		      (SID_NAME=ORCL)
		    )
 		    (SID_DESC=
		      (SID_NAME=PLSExtProc) (PROGRAM=extproc)
		    )
		  )

		To stop and restart the listener: lsnctl
		set password oracle
		stop
		start
		quit

		OR, open the control panel and open services. Stop and
		restart the OracleTNSListenerXX service.

-------------------------------------------------------------------------------
IMPORTANT NOTES ABOUT NETWORKING FILES:
-------------------------------------------------------------------------------

                If you install the enterprise edition of the server over
                an existing network installation, then your network
                files may not be properly updated with the new external
                procedure entries. In particular, the extproc entries
                in both tnsnames.ora and listener.ora may not be present at 
                all. This is a particular problem on NT. If you encounter
                this problem on NT and the above instructions don't work, 
                rename the network directory to something else, like 
                'onetwork' and install the enterprise edition components 
                again (without creating a database).  This will reinstall 
                the networking components. Your new network directory should 
                contain valid extproc entries. 
		Add any other entries from the old directories and then 
		you may delete the old directories.
		
-------------------------------------------------------------------------------
5) 	Problem: How do I know when it works? Is there an easy script to run?
-------------------------------------------------------------------------------
	Answer:  The virdemo program shipped with Visual Information Retrieval
                 should work without errors. (Read the manual for instructions
                 on how to set up the program)

-------------------------------------------------------------------------------
SECTION II: Usage Problems
-------------------------------------------------------------------------------

-------------------------------------------------------------------------------
1)      Problem: I have a simple select statement that doesn't seem to work:
                Assume the following 2 tables have been created and populated
                with  one row:
                create table images (image ORDSYS.ORDIMGF);
		create table image (width integer);

		select width, image.width from image,images;

		WIDTH      WIDTH     
		---------- ----------
       		123        123
-------------------------------------------------------------------------------
   	Answer: You should always use a table alias when using types to prevent
	   	naming conflicts.

   	Solution: Rerun the statement using a table alias.
		select width,t.image.width from image,images t;
		WIDTH      IMAGE.WIDT
		---------- ----------
       		123        600

-------------------------------------------------------------------------------
3) 	Problem: Does the Import/Export utility support Visual Information
		 Retrieval directly?
-------------------------------------------------------------------------------
   	Answer: Yes. The 8.0.4+ version of the import/export utilities support
		object types, so you don't need to do any extra work.
		Import your tables containing the ORDVIR type as you would any 
		other table.

-------------------------------------------------------------------------------
4) 	Problem: Does SQL*Loader support Visual Information Retrieval?
-------------------------------------------------------------------------------
	Answer: Yes.  The 8.1 version of the SQL*Loader will support loading
                Visual Information Retrieval objects directly.

	Solution: Visual Information Retrieval objects can be loaded into the
                  database by using the SQL*Loader BLOB interface.  Visual
                  Information Retrieval objects stored as external files can 
                  be loaded by loading the srcLocation, srcName, and srcType 
                  attributes using the SQL*Loader string interface.  
 
-------------------------------------------------------------------------------
5)	Problem: Does Visual Information Retrieval support read only media, 
                 such as CDROMs?
-------------------------------------------------------------------------------
	Answer: Yes. Create a directory mapping to your read-only media and
		treat it like any other directory.
	Solution:
		connect sys/change_on_install
		grant create directory to scott;
		connect scott/tiger;
		create directory myreadonlycds as 'E:\IMAGES';

-------------------------------------------------------------------------------
6) 	Problem: How do I extract the full path from a directory object?
-------------------------------------------------------------------------------
	Answer: The full path name may be found in the view named 
		ALL_DIRECTORIES.

	Solution: The following selects the full path for the images directory.
		select directory_path from all_directories 
		where directory_name = 'IMAGES';


-------------------------------------------------------------------------------
SECTION III: General Questions
-------------------------------------------------------------------------------

-------------------------------------------------------------------------------
1)	Question:  What specific image formats does Visual Information
                   Retrieval support?
-------------------------------------------------------------------------------
	Answer: Visual Information Retrieval currently supports TIFF, PICT, 
                BMP, PCX, JFIF, GIF, CALS, SUN Raster, TARGA, and RPIX. 
                Certain foreign image formats are also supported.  See the
                documentation for details of foreign image support.
 
-------------------------------------------------------------------------------
2)	Question: Can I store images in compressed format?
-------------------------------------------------------------------------------
	Answer: Yes, if the file format supports compression.  The following
                compression formats are supported: CCITT G3/G4, LZW, JPEG, and 
                RLE.
 
-------------------------------------------------------------------------------
3)	Question: Can I use Visual Information Retrieval to compress an 
                  image before sending it to the server or decompress an 
                  image at the client after retrieving it from the server? 
-------------------------------------------------------------------------------
	Answer: No, Visual Information Retrieval is server proximate - use 
                client code to compress/decompress at the client.
 
-------------------------------------------------------------------------------
4)	Question: Can an application using Visual Information Retrieval 
                  access a sub region within an image, such as a scan line, 
                  rectangular area, or individual pixel?
-------------------------------------------------------------------------------
	Answer: No. Cropping can be performed.  However, random scan line or 
		pixel level access is not supported.
 
-------------------------------------------------------------------------------
5)	Question: Is the core interMedia image intended to be an image 
		  processing engine? 
-------------------------------------------------------------------------------
	Answer: No, it is intended to provide for storage and data 
		management.  While a few highly useful image operations 
		are provided in the Process() method, no mechanism exists to 
		register new functions with interMedia image. Clients 
		who wish to do this could include a vast array of functions 
		as methods in a data type which extends the interMedia 
                image or Visual Information Retrieval.
  
-------------------------------------------------------------------------------
6)	Question: What is the relationship between Visual Information 
	Retrieval and the core Oracle interMedia image?
-------------------------------------------------------------------------------
	Answer: Visual Image Retrieval is built upon Oracle interMedia image.
 
-------------------------------------------------------------------------------
7)	Question: Will the core interMedia image offer index optimization? 
-------------------------------------------------------------------------------
	Answer: There is no image specific indexing available through 
		interMedia image. Images must be queried by other table 
		attributes (such as employee_id).
 
-------------------------------------------------------------------------------
8)	Question: What are the image storage options and how do I handle 
		  images which are stored on read-only media or large, 
		  pre-existing sets of flat file images?
-------------------------------------------------------------------------------
	Answer: Images may be stored internally to the database in BLOBs, or
                externally to the database in BFILEs or URLs.
 
-------------------------------------------------------------------------------
9)	Question: Does either interMedia image or Visual Information Retrieval
                  provide support for time sequences or volumetric images? 
-------------------------------------------------------------------------------
	Answer: Not intrinsically, but it is possible through composition.
 
-------------------------------------------------------------------------------
10)	Question: Do interMedia image or Visual Information Retrieval support 
                  video such as mpeg data?
-------------------------------------------------------------------------------
	Answer: interMedia image and Visual Information Retrieval are not
                designed to support isochronous data (real time base) such
                as mpeg 1 and 2 video streams.  However, interMedia video
                can be used to support video data.
 
-------------------------------------------------------------------------------
11)	Question: What do I do if I have two different applications which 
		  need to access the same images from time to time, but 
		  do not use a common image format?
-------------------------------------------------------------------------------
	Answer: Use the format conversion methods.
 
-------------------------------------------------------------------------------
12)	Question: Which data query languages can I use interMedia image and
                  Visual Information Retrieval? 
-------------------------------------------------------------------------------
	Answer: SQL3, PL/SQL, JDBC, JAVA and anything accessible through the 
                Oracle Call Interface (OCI).
 
-------------------------------------------------------------------------------
13)	Question: Images of mechanical assembly drawings are under 
		  tight version control in our application. Is there any 
		  concept of version in interMedia image or Visual Information
                  Retrieval?  And what about recovery?
-------------------------------------------------------------------------------
	Answer: While images may be referenced, the image object defined 
		by the foundational interMedia image provides no 
		concept of version. Each image in the database is considered 
		by the database to be entirely different from every other 
		image. The concept of versions can easily be added by 
		defining a new image set or collection object (see 
		extensibility question).  If the images are stored in 
		the database, the application has transactional control 
		over them.
 
-------------------------------------------------------------------------------
14)	Question: My customer has a distributed application involving 
		images. Can images be replicated in a distributed fashion?
-------------------------------------------------------------------------------
	Answer: Full type replication is not supported in this version. 
                Until it is supported, you replicate tables with image 
                types using an object view. 

-------------------------------------------------------------------------------
15)	Question: I have a customer who was representing images as RAWs in 
		  Oracle7.3. Can they use interMedia image and Visual 
                  Information Retrieval? 
-------------------------------------------------------------------------------
	Answer: Yes. They must write a simple program to create instances 
		of the new image object types and populate them with the 
		image data from their raws.
