Topic
  • 4 replies
  • Latest Post - ‏2014-03-07T15:13:46Z by carlolunghi
carlolunghi
carlolunghi
3 Posts

Pinned topic Difficulty with INSTEAD OF trigger on DB2i

‏2014-03-05T21:16:33Z | triggers views

Dear Forum,
All my jobs on DB2 are accomplished on DataStudio. Now I'm involved in a DB2 project on an iSeries V5R4 machine, while the test environment is a V5R3 old machine. As usual I started to use DataStudio 4.0.1, and I have discovered the following points:
- in the Data perspective, the Data Source Explorer view allows you to connect to the V5R3 machine, looking at the db2 objects and browse the tables data;
- and then the Explore Data Project view allows to define a project and design a diagrams of table objects and relashionships, etc., and then deploy it; or viceversa you can start by means of a reverse engineering;
- you can open a windows to write a script and execute it;
- and then design a trigger on tables.
I didn't succeed into designing one trigger on views (INSTEAD OF trigger). Is it a my error or currently DS does not support such a type of objects for iSeries DB2 ?
Of course I can define the trigger outside the DS, but in such a way I lose a big strength point of DS that is to have all DB2 objects, stored procedures, functions and triggers all defined and maintained in the same place. Unless to pay for a different tool ...

Very appreciated comments about DS and suggestions for my new adventure in working on DB2i.
Thank for the cooperation and regards.

c.l.

  • tomliotta
    tomliotta
    55 Posts

    Re: Difficulty with INSTEAD OF trigger on DB2i

    ‏2014-03-06T01:59:01Z  

    I didn't succeed into designing one trigger on views (INSTEAD OF trigger).

    Why not? What happened? Was there an error message or did it simply give unexpected results? It's hard to know how to respond without knowing what happened. If an error came up, be sure to include any error identifiers.

    I don't have direct info on DS itself used with V5R3. "Instead Of" triggers were introduced back in V5R3. Minimum support required DB V5R3M0 fix pack (SF99503, level 4) and PTF SI17399. In V5R3, updatability applied only to single-table views. Multi-table view support became available in V5R4.

    Tom

  • krmilligan
    krmilligan
    450 Posts

    Re: Difficulty with INSTEAD OF trigger on DB2i

    ‏2014-03-06T22:38:31Z  

    I would ask your question on the Data Studio forum:

    https://www.ibm.com/developerworks/community/forums/html/forum?id=11111111-0000-0000-0000-000000001086

  • carlolunghi
    carlolunghi
    3 Posts

    Re: Difficulty with INSTEAD OF trigger on DB2i

    ‏2014-03-07T15:12:38Z  
    • tomliotta
    • ‏2014-03-06T01:59:01Z

    I didn't succeed into designing one trigger on views (INSTEAD OF trigger).

    Why not? What happened? Was there an error message or did it simply give unexpected results? It's hard to know how to respond without knowing what happened. If an error came up, be sure to include any error identifiers.

    I don't have direct info on DS itself used with V5R3. "Instead Of" triggers were introduced back in V5R3. Minimum support required DB V5R3M0 fix pack (SF99503, level 4) and PTF SI17399. In V5R3, updatability applied only to single-table views. Multi-table view support became available in V5R4.

    Tom

    Hello Tom, 

    Here some details, working on DS 4.1.0.1.  In the perspective Database Development and view Data Source Explorer, open a connection to iSeries DB2 server; in the list of schemas select the library you want to work on; on a table you are allowed to display properties and data, etc.;
    you can also create what you want, for instance a new trigger (right click and create); simply this is not given on the right click menu for a view.

    Please, look at the DataStudio Forum

    https://www.ibm.com/developerworks/community/forums/html/topic?id=6eadc263-12b7-49ef-9a7e-31ed64879772&ps=25

    where I did post the same question as in DB2i Forum (and where we have now a precise response). 

    Thank you for your message.

    c.l.

  • carlolunghi
    carlolunghi
    3 Posts

    Re: Difficulty with INSTEAD OF trigger on DB2i

    ‏2014-03-07T15:13:46Z  

    OK, thank you krmilligan.