Re: Forms 4 & User Sessions
Date: Tue, 26 Apr 1994 23:44:26 GMT
Message-ID: <1994Apr26.234426.18748_at_oracle.us.oracle.com>
In article <2pjq4m$895_at_nic.hookup.net> pberger_at_nic.hookup.net (Paul Berger) writes:
>Hi guys,
>
>I need some help (as usual). Thanks in advance for your replies.
>
>I would like to be able to alter a user session within Forms 4
>such that the user's session is optimized for maximum
>response (or feedback) from the database.
>
>ie. I'd like to invoke:
> "alter session set optimizer_goal = first_rows"
> at forms startup.
>
>I was looking at the "supplied packages" for use with PL/SQL but
>such a beast appears not to exist, at least as it pertains to "alter
>session set optimizer...".
>
>Any observations as to how I might ensure that user sessions get set
>with "first_rows" irrespective of the "optimization_goal" setting
>within Oracle's init.ora?
>
>Thanks,
>PB
Check the Forms_DDL built-in described in the release notes. These types of operations should be done at "transaction safe points [sic]" -- that is, do them when they won't negatively impact pending database queries by forcing an implicit commit, like on start-up or right after a user commit.
Here is one of the paragraphs from the release notes that will help a little more:
(4) Realize that all DDL operations issue an implicit COMMIT and will end the current transaction without giving Forms a chance to process any pending changes. Issuing DDL commands using Forms_DDL() while a form has pending changes to commit, is emphatically discouraged and could have unpredictable results on the pending changes in the form. Make sure all pending changes in the form are committed or rolled back before issuing such commands.
Here is an example of the syntax and a sample usage:
A built-in command has been added to allow the designer to issue dynamic SQL statements at runtime, including server-side PL/SQL and DDL. Valid syntax is: Forms_DDL( statement ); Where 'statement' can be any string expression up to 32K. For example, the string argument can be a string literal: Forms_DDL('create table temp( n number )');
Hope this helps! Good luck, and remember that the stuff quoted from the release notes is used by permission, (C) 1994 Oracle Corporation.
Thanks,
- Dennis Moore, my own opinions, etcetcetc