Does Oracle really offer any OCI demo/sample programs?

时间:2021-07-21 23:00:29

d I could download them from Oracle's own website. Seems not. Certainly no handy link from the above page.

I have a tried installing (onto windows):

  • An Oracle 10g XE database server, no such source files
  • Oracle client (sdk options on), no such source files
  • searched within our linux installations -- where did I find the fabled \rdbms\demo\ folder which contains a few make files referring to the demo source files, the but no source files. So running these makefiles fails.

Basically, no luck finding them.

If I google for cdemocp.c I find only:

  • the typical multiple copies of Oracle's own documentation
  • other people saying they cant find it.

( I finding using oracle's documentation is like lord of the rings, only a faint connection with reality, and probably too many words. I'm not enjoying it. )

share improve this question
 

3 Answers

up vote 3 down vote accepted

OK found the OCI demo files. It was a serious pain to find them.

From Oracle, get some "Companion Disk". Such as:

"Oracle Database 10g Companion CD Release 2" : 102010_win64_x64_companion.zip

For me all the various "Universal" installers I tried crashed, or refused to run. Even when run on the OS they were supposed to be run on. But, having expanded the installer you can just dig out .jar files. These .jar file are really just .zip files with a diffident extension. This file:

102010_win64_x64_companion\companion\Disk1\stage\Components\oracle.rdbms.companion\10.2.0.3.0\1\DataFiles\filegroup2.jar

when extracted, contains all the OCI demo files I wanted under rdbms/demo/. Voilà.

( I list them here so anyone googling for them might find this page. )

cdemdpco.c cdemdpin.c cdemdpit.c cdemdplp.c cdemdpno.c cdemdpro.c cdemdpss.c cdemo1.c cdemo2.c cdemo3.c cdemo4.c cdemo5.c cdemo81.c cdemo82.c cdemoanydata1.c cdemoanydata2.c cdemobj.c cdemocoll.c cdemocor.c cdemocor1.c cdemocp.c cdemocpproxy.c cdemodp.c cdemodp_lip.c cdemodr1.c cdemodr2.c cdemodr3.c cdemodsa.c cdemodsc.c cdemodt.c cdemoext.c cdemofil.c cdemofo.c cdemofor.c cdemoin1.c cdemoin2.c cdemoin3.c cdemol2l.c cdemolb.c cdemolb2.c cdemolbs.c cdemoplb.c cdemoqc.c cdemoqc2.c cdemorid.c cdemort.c cdemosc.c cdemoses.c cdemosp.c cdemostc.c cdemosyev.c cdemothr.c cdemoucb.c cdemoucbl.c cdemouni.c cdemoup1.c cdemoup2.c cdemoupk.c cdemoxml.c extdemo2.c extdemo4.c extdemo5.c extdemo6.c nchdemo1.c obndra.c oci02.c oci03.c oci04.c oci05.c oci06.c oci07.c oci08.c oci09.c oci10.c oci11.c oci12.c oci13.c oci14.c oci15.c oci16.c oci17.c oci18.c oci19.c oci20.c oci21.c oci22.c oci23.c oci24.c oci25.c ociaqarraydeq.c ociaqarrayenq.c ociaqdemo00.c ociaqdemo01.c ociaqdemo02.c ociucb.c readpipe.c strmmon.c cdemo6.h cdemo82.h cdemobj.h cdemocoll.h cdemocor.h cdemodp.h cdemodp0.h cdemodr1.h cdemodr2.h cdemodr3.h cdemodsc.h cdemoin1.h cdemoin2.h cdemoin3.h cdemolb.h cdemorid.h cdemort.h cdemoses.h cdemosp.h cdemostc.h cdemothr.h extdemo2.h extdemo4.h extdemo5.h extdemo6.h mdemo1.h mymdemo1.h cdemo6.cc mdemo1.cpp mdemo1o.cpp occiaqlis.cpp occiaqop.cpp occiblob.cpp occiclob.cpp occicoll.cpp occidesc.cpp occidml.cpp occiinh.cpp occilbar.cpp occimb1.cpp occiobj.cpp occipobj.cpp occipool.cpp occiproc.cpp occiscp.cpp occistre.cpp occiuni1.cpp occiuni2.cpp

share improve this answer
 

Update from above since some links changed

First download:

http://download.oracle.com/otn/linux/oracle11g/R2/linux.x64_11gR2_examples.zip

Then if you have 7zip on windows you can drill down to the zip and jar file like this:

Downloads\linux.x64_11gR2_examples.zip\examples\stage\Components\oracle.rdbms.companion\11.2.0.1.0\1\DataFiles\filegroup2.jar\rdbms\demo\

share improve this answer
 

After struggling to find the OCI sample programs for Oracle 12 on Windows, I found them here:

http://www.oracle.com/technetwork/database/enterprise-edition/downloads/database12c-win64-download-2297732.html

You need to log onto oracle and on the windows item, click "see all"

Microsoft Windows x64 (64-bit) File 1, File 2 (2.5 GB) See All

Oracle Database Examples (12.1.0.2.0) for Microsoft Windows (x64) Download winx64_12102_examples.zip (576,214,828 bytes)

share improve this answer