Triggers in Oracle Lite

I want to create a trigger using a java stored procedure.
CREATE OR REPLACE PROCEDURE test(tableName in VARCHAR2, tableID in VARCHAR2, ID int) AS LANGUAGE JAVA NAME 'DBTrigger.setReplicationFlag(java.sql.Connection, java.lang.String, java.lang.String, int)';
The tableName, tableID parameters are used to built the select statement in the Java Class, for the reason thet i don't want to write a class for every table. I just want to create the triggers based on one Class and one Stored Procedure.
Testing the Stored Procedure with:
select test('TESTMASTER','MASTER_ID',8) from dual; everything is OK
but when I try to create a trigger with:
CREATE OR REPLACE TRIGGER Trigg AFTER INSERT OR UPDATE OF FLOAT_COLUMN ON Testmaster FOR EACH ROW test('TESTMASTER','MASTER_ID', NEW.MASTER_ID);
I get the error message:
[POL-5228] Syntaxfehler
In the error message documentation I found the following:
POL-5228 Syntax error
Cause: SQL statement contained a syntax error.
Action: Inspect the statement for misspellings and missing parentheses, and
then reissue it. Refer to the online SQL help for the correct syntax for the
statement type.
Does anybody know where is the error or if it is possible to do so at all ?

Hi!
Triggers and stored procedures are indeed supported by Oracle 8iLite. You should consult the Oracle 8iLite Java Developers Guide chapter 2. Triggers and Stored Procedures.
null

Similar Messages

  • Oracle Lite Triggers

    Hi,
    What is the best way to handle triggers in Oracle Lite?
    The application table on my live server (oracle 9i) has many triggers and most of them are not required on oracle Lite. So, i don't include triggers will packaging. But I get error while publishing the application.
    Pls advice.
    Regards,
    Deepak

    Hi,
    I am qouting below from the oracle 8i Lite documentation which says it supports triggers . Please clarify.
    Oracle Lite DBMS
    Oracle Lite DBMS is a lightweight (50KB - 750KB), Java enabled database designed from the ground up for laptops, handheld computers, PDAs and smartphones. It supports industry standard ODBC, JDBC, SQLJ, and Java Stored Procedures and Triggers. It provides a streaming fast "C" interface, OKAPI, to its object kernel. It also supports Java Access Classes, JAC, a fast and easy way to make Java Objects persistent. Oracle Lite DBMS now supports all popular mobile platforms, including Palm OS, EPOC, and Windows CE, letting you deploy enterprise applications on virtually any mobile device.
    Regards
    null

  • Converting between tables in an Oracle Lite Database

    We have a standalone application that uses Oracle Lite. A requirement we have from a new customer is to use their Oracle Lite database structure or to come up with a mechanism that sends the data between the 2 different structures.
    Both the structures reside in the same database.
    Initial thoughts were to write triggers on both structures that convert the data or to use XML / XSL and treat them as seperate apps.
    However, I'm wondering if there is a different way. Do Oracle provide any tools that can help with mapping between 2 different structures that hold the same domain data?
    Anyone got any better ideas?
    Cheers, Matt

    We have a standalone application that uses Oracle Lite. A requirement we have from a new customer is to use their Oracle Lite database structure or to come up with a mechanism that sends the data between the 2 different structures.
    Both the structures reside in the same database.
    Initial thoughts were to write triggers on both structures that convert the data or to use XML / XSL and treat them as seperate apps.
    However, I'm wondering if there is a different way. Do Oracle provide any tools that can help with mapping between 2 different structures that hold the same domain data?
    Anyone got any better ideas?
    Cheers, Matt

  • Oracle Lite on Windows CE

    It is given in documentation that
    "Java stored procedures and triggers, and the Oracle Lite JAC and JDBC interfaces are currently not supported on Windows CE" is
    there is any other way to accomplish this task. I want to access Oracle Lite database
    and perform advance replication thr java program on Windows CE platform.
    null

    This may be helpful (if you still need it)
    In order to use Oracle Lite with Windows CE, I had to write a dll using the libraries and dll's from oracle that were compiled for Windows CE (depending on your processor type: MIPS, SH3, SH4 are supported) There are also sample applications (with source code) that I used to help write the dll. If you install Oracle Lite on a Win32 system, the source code for the sample applications is under /<oracle dir>/lite/pda40/wince and then look under the appropriate processor type.
    I am still working on getting Replication to work from the CE device. I am focusing on HTTP replication, but if you have any idea of how to replicate at all from CE....

  • Efragdb.exe in Oracle Lite 10g R3

    We have the following situation when working on Oracle LIte 10g R3. We used defrag.exe with a database created in Oracle Lite R2. During the "Dumping Triggers" phase, it shows the error message "Wrong trigger type 34 for trigger TRIG_INSUPDPVDETPAGCAJ.". The refered trigger is based on a java procedure, and it was created in the source database without errors.
    If we drop the trigger and defrag.exe is run again, the "Loading Extents" phase show the error message "Invalid opcode: 65!!!".
    I will appreciate any suggestion about this.
    Monica Bancayan

    Please open a service request with Oracle Support.
    Olaf

  • Talend oracle lite problem

    we want to use talend in order to migrate data from an sql server to a oracle 11g. the database in oracle 11g is the repository for our oracle lite server.
    When we migrate the data we select action on table none and action on data insert or update for the oracle 11g components. We encounter a problem in which oracle lite thinks that the entire table has been changed after talend has finished its update and foreces a full refresh of the table to the users. As you understand this is a great problem because even when only one record has changed (or even none) the entire table is redownloaded on the users.
    From what i know oracle lite uses a complicated system in order to understand which records have been changed and therefore require to be updated on the clients. It appears as if talend changes something in the table after it has finished its data migration (perhaps some kind of a timestamp?) and therefore makes oracle lite believe that the entire table with all its rows were changed. i do not know which of the two components cause the error, talend changing something or olite thinking wrong about tables updated
    1)why does this happen and how exactly does oracle lite understand which data have been updated?
    im using this forum in order to ask if someone has encountered this problem again and how did he solve it
    thank you for your time

    not used talend, but if i understand correctly, you are using this to transfer data from a sql server database to oracle. I assume the data being put into the oracle database is into tables in the main schema, rather than the mobileadmin schema itself.
    For the tables that are being written to in the oracle database, how are they defined in the oracle lite publication (fast refresh, complete etc.) and what happens in the MGP process after the data import has run.
    The default process is that for fast refresh objects the following happens.
    1) when data is inserted/updated/deleted from the base table, triggers (TABLENAMi/u/d) fire in the main schema, and this causes data to be inserted into mobileadmin.C$all_sid_logged_tables to show the table as changed, and updates made to the CVR$ table in the main schema
    2) based on the 'dirty' tables in c$all_sid_logged_tables then the MGP process logs phase will copy data from CVR$ tables to CLG$ tables, and then run the compose to populate the out queue CMP$ tables
    it may be that part of the settings are stopping the updates to the CVR$ tables and this is causing a versioning mismatch (normal trigger for complete refresh), so check to see what updates are done to this table as well as the manin data table

  • Conflicts resolution methods in Oracle Lite

    Can anyone please provide the answers of the following questions?
    1_What Methods are used for Conflict detection and resolution for concurrent updates by multiple clients in Oracle lite databases?
    2_ Is there any method that extract semantic relation from the concurrent update transactions and create a global update schedule?
    3_ Does oracle lite use conflict avoidance mechanism?
    4_ What replication method is used by Oracle Lite Database?

    In terms of conflict resolution with oracle lite, which end do you mean? conflict resolution in the client database (ie: oracle lite) or on the server side when processing client uploads (this is just a standard oracle database), also not sure what you are trying to achieve
    *1_What Methods are used for Conflict detection and resolution for concurrent updates by multiple clients in Oracle lite databases?*
    I assume in the following that you are talking about dealing with uploads
    Depending on how the publication items are defined, the process is quite different.
    a) fast refresh publication items
    When the client synchronises, the upload data is uploaded as a packed binary file which is then unpacked and inserted into in queue tables in the mobileadmin repsitory (table names begin CFM$ followed by the publication item name). This is the only action that happens during the actual sync process.
    A second and independent process, not linked to the actual synchronisation - the MGP process, runs on the mobile server, and this has three phases - apply, process logs and compose that run one after the other. You can set the MGP to only do the apply phase, or all three.
    during the apply phase the data in the in queue tables for a particular user/transaction will be applied to the server database. Normally the MGP process is set to have three threads (this can be changed, but three is the default), and therefore three client uploads will be processed in parallel, but each of these threads is independant of the others and therefore should be seen as seperate transactions.
    It should be noted that even if you have 50 or 100 users synchronising concurrently, only three upload sets will be processed at any one time, and almost certainly a period of time after the synchronisation has completed (may be many hours depending on the MGP cycle time)
    As each of the apply threads is a seperate transaction, there is no concept of concurrency built in, and the only conflict resolution by default is based on the server wins/client wins setting of the publication item. where multiple users are updating the the same server record with 'client wins', the first user will update the data, and then the next user will update the data (just a repeat of the previous one). NOTE also that in the case of an update, ALL columns in the record are updated, there is no column level update.
    There are customisation options available to provide finer grained control over the apply process, look at the PLSQL callback packages registered against each publication item for beforeapply, afterapply, beforetranapply and aftertranapply, Apply DML procedures against the publication items and also the CUSTOMIZE package at the MGP level
    b) complete refresh publication items
    where the publication as a whole has a mixture of fast and complete refresh publication items, these normally work in the same way as the fast refresh described above. Where however you just have complete refresh items the data MAY be written directly to the server table on upload
    c) queue based publication items
    These work in realtime, rather than with a delay for the MGP process to pick up the data.
    When the user synchronises, the uploaded data is is written to the in queue tables in the same way, but when this is completed, a package (defined as part of the publication definition) is called, and the procedure upload_complete is run passing in the user and transaction identifiers. This package needs to be hand crafted, but you have full control over what and how all of the uploaded data is processed, but again this is a single transaction for that user. If you want to look at other sessions running, you need to find a way to implement this.
    *2_ Is there any method that extract semantic relation from the concurrent update transactions and create a global update schedule?*
    As noted above, the uploads may be processed in parallel, but they are seperate transactions, so no built ins
    *3_ Does oracle lite use conflict avoidance mechanism?*
    Only the basic oracle stuff, unless you use the customisation options to write your own
    *4_ What replication method is used by Oracle Lite Database?*
    The different types of publication items select data from the server database for download in different ways
    a) fast refresh
    change logging tables and triggers are created in the server database. These are scanned during the MGP process logs phase to determine what changes have happened since the last MGP compose, and what publication items they affect. The MGP compose then runs and this uses the same three threads to process the users in alphabetical order using the change keys to populate data in out queue tables (prefixed CMP$) in the repository. These have the PK values for the data, plus a transaction types (insert/update/delete). All the MGP process does is populate these out queue tables.
    When the user synchronises, the data in the out queue tables is used as a key list to extract the data from the actual server tables into a packed binary file, and this is sent to the client.
    b) complete refresh
    there is no pre-preparation in this case, the data is streamed directly from the server database into the packed binary download file
    c) queue based items
    in real time when the user is synchronising after the apply has been done by the uploade_complete procedure, a second procedure download_init is called. Within this you have to code the data extract, and MUST populate tables (you also need to create them) CTM$<publication item name> these are effectively out queue tables, but contain all of the data, not just the PK values. At the end of the procedure, the data is streamed from these into the binary file for download.
    Depending on the definition of your apublication, you could have one or more of the above types (VERY bad idea to mix queue based and fast refresh unless you are very sure about what you are doing) and therefore there may be a mix of different actions happening at different times
    In conclusion i would say that try and send seperate data to clients so that they do not interfere with each other, and for inserts use uniqueue keys or sequences. If you MUST send the same data to different clients for update, then the queue based approach provides the best control, but as it is real time is not as scalable for large data sets.

  • Oracle Lite Correct Application?

    Hi,
    I'm looking into Oracle Lite at the moment as a possible solution to automating and speeding up our data synchronisation from one main database to various sites across the country. The remote devices are 90% laptops (running XP) and the other 10% are Windows 2003 or XP based servers.
    Currently we export from a main database and import individually and manually to the other sites. This is very slow process and costly and we would like to speed it up.
    From what I can gather Oracle Lite looks like a viable solution. The asynchronous nature is satisfied as well as avoiding full exports and imports but rather updating ammendments and new data.
    Do you think Oracle Lite best serves my purposes or should I look into other methods such as SQL Loader or something?
    Any advice will be greatly appreciated
    Thanks in advance

    Oracle Lite is great for replication. So if it replication you are looking for, this is the application you need. Just keep in mind some features such as PL/SQL PROCEDURES,TRIGGERS, and FUNCTIONS are not supported. You can use Java Stored Procedures though.

  • Oracle Lite 10g

    Hello,
    does spatial work with oracle lite 10g, is it possible to build mobile spatial application with oracle database?
    Thank you

    I have looked into this and believe that it is possible as follows.
    1. Add to you database table a CLOB field (supported by Lite) and have
    it contain a textual description of the SDO_GEOMETRY. Two formats
    are possible: SVG and WKT. I prefer SVG as then the mobile client
    gets a styled version of the shape that it can use in the PDA application
    without the need to worry about styling.
    2. You need table level before insert and update triggers that will convert
    from your CLOB <-> SDO_GEOMETRY. (I did this for my previous employer
    using SVG and SDO_GEOMETRY and could get the code for you to use.)
    Thus it doesn't matter is the Lite application creates/updates a shape or
    a "GIS" application creates one: both are kept in sync via the trigger.
    3. You then use Oracle Mobile to extract and return the data between Lite
    and the DBMS.
    4. In the client PDA you then purchase an SVG toolkit from one of the commercial
    vendors (or use Batik or SharpVectorGraphics in open source) to display
    the data in the Lite database.
    5. You also purchase a GPS control (or use open source) to communicate
    with a GPS for navigating to or capturing new data from it.
    My former employer is investigating use of Lite as a field recording tool.
    I hope to provide input into this project over time.
    Simon Greener
    Independent GIS Consultant
    Allens Rivulet Tasmania
    Australia
    Longitude: 147.2048
    Latitude: -43.0141

  • Does Oracle Lite support Oracle Spatial

    Does anybody know whether Oracle Lite or Personal Oracle supports the Oracle Spatial plug-in. Also, for extra credit does anybody know what the difference between Personal Oracle and Oracle Lite is?
    We will be needing to provide some attribute and spatial data from our Oracle Enterprise database to several laptops for field personnel using an electronic map we developed. We would like to use a portable version of Oracle that supports Oracle Spatial objects.
    Any help would be greatly appreciated.
    Thanks
    Dan

    oh, I didn't realize it was so limited. No, that won't do. We're looking for a "mini" version of the real production database including stored code, triggers etc. Should be scaled down enough to allow rapid syncing of data and schema changes from the production (or really QA) database, but full enough to include the objects necessary to allow the developers to test their code changes to the front end applicaiton on their own environment.

  • Oracle lite and Stored Procedures

    Hi, I have just installed Oracle lite, connected to Polite and created dropped tables etc. I notice that in Navigator there is no folder for stored procedures or triggers. I tried to compile a syntacally correct proc in SQL plus and it generated this error: Create or Replace Procedure SCORECARD.Gen_Fiscal_Year_Data AS
    ERROR at line 1:
    OCA-30021: error preparing/executing SQL statement
    [POL-5228] syntax error.
    Does this mean that stored procs are not supported in Oracle lite?
    Thanks, Paul
    null

    Oracle Lite database does not support the usual stored procedures/triggers like an Oracle database. You have to use java classes to create triggers/stored procedures to run them in Oracle Lite database. You can refer the documentation on Oracle 8i Lite for samples/detailed information.

  • Preventing trigger executing on oracle lite

    I am using Mobile Server and Oracle Lite to provide mobile copies of the database to a small set of users. We have an application that some users use to update data on the mobile databases, and the same application is used by other users who are permanently connected to the main central database. Mobile users will synchronize with the central database whenever they return to their home office.
    On both they central Oracle database and the Oracle Lite mobile databases there are several triggers written for functions such as creating unique primary keys from sequences and updating a "last updated" field on each table (plus a few more complicated scenarios).
    My problem is that I want these triggers to execute only on inserts, updates and deletes from actions initiated directly on the mobile workstation. I do NOT want these same triggers to be executed on either the central or mobile databases as a result of a synchronization with the central Oracle database.
    How do I prevent triggers from executing on the oracle lite mobile database as a result of table data changes from a synchronization with the central database?
    Edited by: user10300540 on Dec 22, 2009 3:58 PM

    We do use sequences to populate primary key ID values, but do not use triggers to set these (even on the server applications) due to the problems associated with foriegn key matching. Instead the sequences tend to be selected within the application and then used explicitly in the insert statements.
    On the clients (PDAs and laptops in outr case) we define sequences within the mobile publications (to ensure that the values are unique to each client - you do not mention how you create the client sequences, but you need to ensure that the range is different for each client otherwise you will get data overwritten), and then all insert statements are in the form insert into table (id,...) values (id_seq.nextval,..). I can see however that this would require more change to you application code to achieve this.
    It is possible to set triggers on the server end to populate/change the id values, but this can cause problems if the data is returned to the client as you will end up with two records.
    Our client app is java based and so sets up a SQL string that is executed by the execute statement methods. This could be wrapped with a method that sets the id values, but this could be a bit cumbersome
    NOTE When we define the sequences in the mobile applications we always set a start point considerably higher than the equivilent range on the server (start at 500 million) with a large range so that in practice they do not need to be reset. The range difference is also useful in that it makes it easy to identify client created data.

  • Oracle Lite for Windows CE H/PC

    I have one question about Oracle Lite for Windows CE on Handheld/PC.
    Which version of Oracle Lite for Windows CE supports Java stored procedures and
    triggers and the Oracle Lite JAC and JDBC interfaces on H/PC? I have version 3.6 and 4.0.1 but this versions don't support
    JAC, JDBC interfaces, Java stored procedures and triggers ( this is written in documentation ).
    I urgently need version of Oracle Lite for Windows CE on H/PC which
    mostly supports JDBC interface because I've developed an application for
    Oracle Lite in JDeveloper with
    JDBC interface and I intend to transfer this application on H/PC ( Velo
    Phillips ) with Widows CE 2.0 operating system.
    Does such version of Oracle Lite for Windows CE which supports JDBC
    interface exist at all?
    Please help me.
    Thank you in advance.
    null

    This is a forum for Forms questions. You should ask your question on one of the database forums.
    Regards,
    Robin Zimmermann
    Forms Product Management

  • Oracle Lite ( Windows CE version ) on H/PC

    Hi to all !
    Which version of Oracle Lite for Windows CE supports Java stored procedures and
    triggers and the Oracle Lite JAC and JDBC interfaces on H/PC? I have version 3.6 and 4.0.1 but this versions don't support
    JAC, JDBC interfaces, Java stored procedures and triggers ( this is written in documentation ).
    I urgently need version of Oracle Lite for Windows CE on H/PC which
    mostly supports JDBC interface because I've developed an application for
    Oracle Lite in JDeveloper with
    JDBC interface and I intend to transfer this application on H/PC ( Velo
    Phillips ) with Widows CE 2.0 operating system.
    Does such version of Oracle Lite for Windows CE which supports JDBC
    interface exist at all?
    Please help me.
    Thank you in advance.
    null

    I want to run Oracle lite on ARM based WINDOWS CE platform,For this it requires jdk1.1.8 version minimum or higher.Is it available to download this jdk version seperately for WIN CE? I searched in the Net but i didnt get jdk seperately made for ARM windows ce platform.
    Please help me to sort out this problem,any kind of support is appreciated.

  • Personal Oracle and Oracle Lite ??

    I'd like to know the difference between Personal Oracle (PO)
    and Oracle Lite:
    1. PO = multi user ? - Lite = single user ?
    2. PO = stronger/bigger database - Lite = small database ?
    2. PO = support PL/SQL ? - Lite = no PL/SQL ?
    3. Replica:
    Lite = Snapshotsite only;
    Support basic and advanced replica with
    Enterprise Edition (or Oracle 8i server ?)
    as Mastersite
    PO = Snapshotsite only ?
    Basic (read only) replication only ?
    Please help !
    Wilco Mulder - Inter Act Industrial Automation.
    null

    Wilco Mulder (guest) wrote:
    : I'd like to know the difference between Personal Oracle (PO)
    : and Oracle Lite:
    : 1. PO = multi user ? - Lite = single user ?
    : 2. PO = stronger/bigger database - Lite = small database ?
    : 2. PO = support PL/SQL ? - Lite = no PL/SQL ?
    : 3. Replica:
    : Lite = Snapshotsite only;
    : Support basic and advanced replica with
    : Enterprise Edition (or Oracle 8i server ?)
    : as Mastersite
    : PO = Snapshotsite only ?
    : Basic (read only) replication only ?
    : Please help !
    : Wilco Mulder - Inter Act Industrial Automation.
    Hi,
    Hereby are some answers:
    1 : PO is personal version of Oracle RDBMS, and available under
    Win95/98/NT. It is the same kernel than a normal Oracle RDBMS
    without some advanced feature (object, etc). Lite is another
    kernel and originally is a ODBMS (object DBMS). Lite is available
    under Win95/98/NT/CE, Epoc32 (coming) and Palm OS (coming). Both
    products are actually single user products. There will be a lite
    mini-server which will support mutli-user access.
    2 - Yes, PO is a full Oracle RDBMS and Lite is a foot-print
    database. But both database are mutil-sessions, row-level locking
    etc.
    3 - PO supports PL/SQL and Lite support Java Stored procedures.
    Both have database triggers.
    4 - For the replication feature, both PO and Lite fully support
    basic and advanced replciation. That means: readonly snapshot and
    updatable snapshots with subquery and subsettings. They can only
    play as snapshot sites. The master site must be Oracle 8 or 8i.
    Hope these can help,
    Regards,
    Xin WU
    null

Maybe you are looking for

  • Flash no longer works in Chrome

    I was playing apps on facebook on a Chrome browser last night, when at about midnight (cst) Flash crashed.  No problem, usually I just refresh & it's fine.  Not last night.  I uninstalled & reinstalled six times.  No luck.  Absolutely no Flash workin

  • Developing Custom Adapter in PI by using Sample Adapter provided

    Hi Experts, I am developing a custom adapter by looking into below link. http://help.sap.com/saphelp_nwpi711/helpdata/en/69/e1e6667710415a9c331ec2e0715561/frameset.htm Could anyone please clarify the below Queries. 1. Which project needs to be create

  • Want to Buy Mac Mini.... HELP!

    I want to buy a mac mini, but my fear is that it says it comes with Tiger as the OS. Anyone with experience? If this is the case... I will be very unhappy.

  • How to access two entity managers from two different servers?

    Hello My test programm is trying to access two glassfish application servers (gf 2.1). The code base of these servers is the same, the persistence layers are just accessing different databases -> one ist the staging/test system, the other the live se

  • Snow Leopard and iBooks author - why no go?

    Yet again a new software product will not instal on a Snow Leopard machine. Is there any way we can instal and use? If not why not? surely its powerful enough to run this . .