Help with a basic trigger to capture OS_USER

Below is the trigger and it does not work - help very much appreciated
CREATE OR REPLACE TRIGGER trg_master_tab_aft
AFTER INSERT OR UPDATE OR DELETE
ON master_tab
REFERENCING NEW AS NEW OLD AS OLD
FOR EACH ROW
DECLARE
BEGIN
     IF INSERTING THEN
     INSERT INTO master_tab_hst values (:NEW.col1,
     :NEW.OSUSER := SELECT SYS_CONTEXT('USERENV', 'OS_USER')  FROM dual
     ,'I'
     ,SYSDATE);
     ELSIF UPDATING THEN
     INSERT INTO master_tab_hst (:NEW.col1,
     :NEW.OSUSER := SELECT SYS_CONTEXT('USERENV', 'OS_USER')  FROM dual
     ,'U'
     ,SYSDATE);
     ELSIF DELETING THEN
     INSERT INTO master_tab_hst (:OLD.col1,
     :NEW.OSUSER := SELECT SYS_CONTEXT('USERENV', 'OS_USER')  FROM dual
     ,'D'
     ,SYSDATE);
     END IF;
EXCEPTION
     WHEN OTHERS THEN
       -- Consider  the error and then re-raise
       RAISE;
END ;

Hello Srini,
Please see if it helps you.
CREATE OR REPLACE TRIGGER trg_master_tab_aft
BEFORE  INSERT OR UPDATE OR DELETE
   ON master_tab    FOR EACH ROW
BEGIN
   IF INSERTING THEN
   INSERT INTO master_tab_hst
   ( STR_NUM,
     TERM_ID,
     HOST_ENV,
     USR_TERMINAL,
     SESSION_USR,
     OS_USER,
     ACTION_DATE,
    ACTION_NAME)
   VALUES
   ( :NEW.STR_NUM,
     :NEW.TERM_ID,
          sys_context('USERENV', 'HOST'),
          sys_context('USERENV', 'TERMINAL'),
          sys_context('USERENV', 'SESSION_USER'),
          sys_context('USERENV', 'OS_USER'),
               SYSDATE,
               'INSERT');
    ELSIF UPDATING THEN
   INSERT INTO master_tab_hst
   ( STR_NUM,
     TERM_ID,
     HOST_ENV,
     USR_TERMINAL,
     SESSION_USR,
     OS_USER,
     ACTION_DATE,
    ACTION_NAME)
   VALUES
   ( TRUNC(:OLD.STR_NUM)||','||:NEW.STR_NUM,
     TRUNC(:OLD.TERM_ID)||','||:NEW.TERM_ID,
          sys_context('USERENV', 'HOST'),
          sys_context('USERENV', 'TERMINAL'),
          sys_context('USERENV', 'SESSION_USER'),
          sys_context('USERENV', 'OS_USER'),
               SYSDATE,
               'UPDATE');          
    ELSIF DELETING THEN
   INSERT INTO master_tab_hst
   ( STR_NUM,
     TERM_ID,
     HOST_ENV,
     USR_TERMINAL,
     SESSION_USR,
     OS_USER,
     ACTION_DATE,
    ACTION_NAME)
   VALUES
   ( :OLD.STR_NUM,
     :OLD.TERM_ID,
          sys_context('USERENV', 'HOST'),
          sys_context('USERENV', 'TERMINAL'),
          sys_context('USERENV', 'SESSION_USER'),
          sys_context('USERENV', 'OS_USER'),
               SYSDATE,
               'DELETE');
    END IF; 
EXCEPTION
     WHEN OTHERS THEN
       -- Consider  the error and then re-raise
       RAISE;
END;

Similar Messages

  • Need a help with something basic, renaming pages made in muse

    Hi All
    can someone help me with a basic task,
    I need to rename a page ivve made in muse containing slide shows or forms,
    when I upload via FTP it over writes the websites index.html page
    any suggestions on what i do to rename Ive tried everything
    Thank you, In anticipation
    Julie

    Hi Julie,
    To rename a page name in Muse, please right click on page and go to page properties. You can rename the page name of all the pages as well as the "file name" in Muse but you can't change the 'File name" of the index page in Muse. Please refer to the following screenshot :
    If you choose to export the site as HTML, you can then change this as well but then the menu items links will be broken and you will have to manually link all the menu items outside muse.
    Hope this helps.
    Cheers!
    Aish

  • Help with create a trigger

    hello all
    i have a 4 tables and i would like to create a trigger in a tables
    CREATE TABLE CLIENT_INFO
    ( CLIENT_NO     VARCHAR2(10) CONSTRAINT CLIENT_INFO_CNO_PK PRIMARY KEY,
      CLIENT_NAME   VARCHAR2(50) NOT NULL,
      ORDERS_AMOUNT NUMBER(7)
    CREATE TABLE STOCK_INFO
    ( ITEM_NO              VARCHAR2(10) ,
      ITEM_DESCRIPTION     VARCHAR2(100),
      SELLING_PRICE        NUMBER(6),
      QTY_IN_HAND          NUMBER(6)    NOT NULL,
      CONSTRAINT ITEM_NUM_SPRICE_PK PRIMARY KEY (ITEM_NO , SELLING_PRICE)
    CREATE TABLE ORDER_INFO
    ( ORDER_NO     VARCHAR2(10) CONSTRAINT ORDER_INFO_ONO_PK PRIMARY KEY,
      CLIENT_NO    VARCHAR2(10),
      ORDER_DATE   DATE,
      ORDER_AMOUNT NUMBER(6),
      CONSTRAINT ORDER_INFO_CNO_FK  FOREIGN KEY (CLIENT_NO) REFERENCES CLIENT_INFO (CLIENT_NO)
    CREATE TABLE ORDER_LINES
    ( ORDER_NO       VARCHAR2(10),
      ITEM_NO        VARCHAR2(10),
      LINE_QTY       NUMBER(6),
      SELLING_PRICE  NUMBER(6),
      TOTAL_PRICE    NUMBER(6)
    ALTER TABLE ORDER_LINES
    ADD  CONSTRAINT ORDER_LINES_ONO_FK FOREIGN KEY (ORDER_NO) REFERENCES ORDER_INFO (ORDER_NO);
    ALTER TABLE ORDER_LINES
    ADD  CONSTRAINT ORDER_LINES_INO_FK FOREIGN KEY (ITEM_NO) REFERENCES STOCK_INFO (ITEM_NO);i would like to create this trigger
    1-order_amount in table 3 due to any (insert,update or delete ) in total_price in table 4
    2-orders_amount in table 1 due to any (insert,update or delete ) in order_amount in table 3
    i would like to ask another quotations r this relations in good for tables
    thank's all

    >
    plz i need a help to create a trigger
    >
    Using a trigger won't solve your problem. You are trying to use child table triggers to maintain parent table information.
    There is no transaction control to ensure that the parent table will be updated with the correct information.
    One process could update child record 1 while another process is updating child record two. Each process will see a different total if they try to compute the sum of all child records since the first process will see the 'old' value for the child record that the second process is updating and the second process will the 'old' value for the child record that the first process is updating.
    So the last process to commit could store the wrong total in the parent record withoug an exception ever being raised.
    See Conflicting Writes in Read Committed Transactions in the Database Concepts doc
    http://docs.oracle.com/cd/E14072_01/server.112/e10713/consist.htm
    >
    some one ask me this quotation in interview
    and im told him i can't understand this structure for database he said just do it
    >
    And I would tell them that using a trigger is not the right way to accomplish that since it could invalidate the data concurrency and data consistency of the tables.
    Sometimes you just have to tell people NO.

  • Need help with Visual BASIC

    I am in an intro to programming course, and I am writing a console on Visual Basic 2013.  My problem with Visual Basic right now is that I cannot get the formula to work.  All of my inputted values end up being 0's.  Am I using incorrect parameters,
    am I misunderstanding how to use arguments; am I not coding correctly?  The scenario for my problem is:
          Areas of Rectangles: The area of a rectangle is the rectangle’s length times its width.  Design a program that asks for the length and width of two rectangles. The program should tell the user which rectangle has the
    greater area, or if the areas are the same.
    //My code is 
    Module Module1
        Sub Main()
            Dim LENGTH As Double = 0
            Dim WIDTH As double = 0
            Dim AREA_1 As Double
            Dim AREA_2 As Double
            Dim RECTANGLE As String = " "
            area1(LENGTH, WIDTH)
            areaCalc1(AREA_1, LENGTH, WIDTH)
            area2(LENGTH, WIDTH)
            areaCalc2(AREA_2, LENGTH, WIDTH)
            decision(AREA_1, AREA_2, RECTANGLE)
            displayDec(RECTANGLE)
            Console.WriteLine("Press any key to exit...")
            Console.Read()
        End Sub
        Sub area1(ByVal LENGTH, WIDTH)
            Console.WriteLine("Please input the following for your first rectangle:")
            Console.Write("Length: ")
            LENGTH = Console.ReadLine()
            Console.Write("Width: ")
            WIDTH = Console.ReadLine()
        End Sub
        Sub areaCalc1(ByVal AREA_1, ByRef LENGTH, WIDTH)
            AREA_1 = LENGTH * WIDTH
            Console.WriteLine("This is the area for rectangle 1: " & AREA_1)
        End Sub
        Sub area2(ByVal LENGTH, WIDTH)
            Console.WriteLine("Please input the following for your second rectangle: ")
            Console.Write("Length: ")
            LENGTH = Console.ReadLine()
            Console.Write("Width: ")
            WIDTH = Console.ReadLine()
        End Sub
        Sub areaCalc2(ByVal AREA_2, ByRef LENGTH, WIDTH)
            AREA_2 = LENGTH * WIDTH
            Console.WriteLine("This is the area for rectangle 2: " & AREA_2)
        End Sub
        Sub decision(ByRef AREA_1, AREA_2, ByVal RECTANGLE)
            If AREA_1 < AREA_2 Then
                RECTANGLE = "rectangle 2"
            Else
                RECTANGLE = "rectangle 1"
            End If
        End Sub
        Sub displayDec(ByRef RECTANGLE)
            Console.WriteLine("The rectangle with the greater Area is " & RECTANGLE)
        End Sub
    End Module

    Hi,
      If you are just beginning to program i highly recommend setting the following options in the Visual Studio menu (Tools/Options). Open the Options window and go to the (Projects and Solutions) and click on (VB Defaults). Now set the options as follows.
    Option Strict - On
    Option Explicit - On
    Option Infer - Off
     And probably one of the most important things to do is learning to Debug your code. That will save you hours of headaches when you get unexpected results in your applications. You will know how to track it down and find where in the code your results
    are being thrown off. There are quite a few Debugging tutorials on the internet. Here are a few decent ones.
    Debugging Express
    Breakpoints and Debugging Tools
    If you say it can`t be done then i`ll try it

  • Can anyone help with a custom trigger?

    Hi - I know this is a tough one and appreciate anyone's help!
    I'm trying to create a custom trigger that confirms 2 fields belong to the same record. If they do, proceed with insert transaction.
    I have gone through the tutorial (from the old Interakt Discussion Board tutorial at http://www.interaktonline.com/Documentation/MXKollection/075000_tutorialdiscussionboard.h tm) on how to create a custom trigger that checks to see whether a duplicate message and subject exist in the table and if so, stop the insert. I have this working fine, using my own table and fields.
    Can anyone help me to change the script here to confirm that both fields belong to the same record? Here is what I have right now:
    $query = "SELECT * FROM dan_camptrans_login_familyid_confirmid WHERE family_id = ".KT_escapeForSql($tNG->getColumnValue("family_id"),$tNG->getColumnType("family_id"))." AND confirm_id = ".KT_escapeForSql($tNG->getColumnValue("familyconfirm_id"),$tNG->getColumnType("familycon firm_id"));
    $result = $tNG->connection->Execute($query);
    if(!$result) {
    $error = new tNG_error("Could not access database!",array(),array());
    return $error;
    } else {
    if($numberOfRecords = $result->recordCount()) {
    $uniqueFailed = new tNG_error("There is already a message with the same subject and content!",array(),array());
    return $uniqueFailed;
    } else {
    return NULL;
    Any help would be SUPER appreciated!
    Dan

    Thank you very much Shane for responding.
    Right now, if I fill out the form and enter any numbers in the family_id and familyconfirm_id fields that are currently NOT in the dan_camptrans_login_familyid_confirmid table, the form submits fine. If however, both fields already exist within the same record, the error is returned.
    I guess what I am looking for is the opposite. When the form is submitted, the table dan_camptrans_login_familyid_confirmid is checked. If both field entries are not within the same record, return the error.
    Basically, I am sending out a user ID and confirmation number via mail to users. When they register they need to enter in both of these numbers and only if they match the records will the registration proceed.
    The main recordset/form that this custom trigger is attached to is one for my user registration table. This custom trigger and associated table is only to confirm the user registering has the correct information to register.
    Thanks again - I hope that I am explaining this clearly.
    Dan

  • Help With creating a trigger

    Hello All!
    I am writing regarding a trigger I must create. I have a table that has roughly 10 columns. I must insert rows into a 'history' table when any column in the parent table is updated or, of course if there is an insert on the parent table. Is there a way to specify multiple columns in the triggering statement (i.e., UPDATE OF parts_on_hand ON inventory) to insert rows into the child table if any of the columns is updated? I am very new with triggers, and am hoping that someone might be able to offer any suggestions, or maybe sample code if available just to help start me out.
    Thanks in advance!
    Julie

    If you do not include a specific column(s), then the trigger will fire on an update to any column. So, for your case:
    create or replace trigger t_trigger
    before insert or update on t
    for each row
    begin
      insert into t_history values (:new.c1, :new.c2, ...);
    end;
    /

  • Help with creation of trigger

    Have to create trigger for DML statements on a table for certain columns, BUT any insertions,deletions and update must be recorded onto another schema table which also uses the sys_context() function.
    herewith the table that is already created
    SQL> desc oradba.oprfile_audit
    Name                                      Null?    Type
    OLD_OF_OPID                                        VARCHAR2(8)
    OLD_OF_DEFQUE                                      VARCHAR2(20)
    NEW_OF_OPID                                        VARCHAR2(8)
    NEW_OF_DEFQUE                                      VARCHAR2(20)
    SYS_TYPE                                           CHAR(1)
    SYS_CLIENT_IDENTIFIER                              VARCHAR2(64)
    SYS_OS_USER                                        VARCHAR2(64)
    SYS_HOST                                           VARCHAR2(64)
    SYS_IP_ADDRESS                                     VARCHAR2(64)
    SYS_TERMINAL                                       VARCHAR2(64)
    SYS_MODULE                                         VARCHAR2(64)
    SYS_DATE                                           DATEHerewith my trigger I tried creating:
    CREATE OR REPLACE TRIGGER MAC.oprfile_trg
    BEFORE DELETE OR INSERT OR UPDATE
    OF OF_OPID
      ,OF_DEFQUE
    ON MAC.OPRFILE
    REFERENCING NEW AS New OLD AS Old
    FOR EACH ROW
    DECLAREThe problem I have is where to put the insert into statement, and to declare the values to be inserted
    ANY HELP WILL BE MUCH APPRECIATED

    Hi,
    just had a quick test. I have removed the owner to create in my own schema in my local database.
    Also I did not know the structure of OPRFILE table and I made some assumptions.
    Check below
    CREATE TABLE OPRFILE (
    OF_OPID                                        VARCHAR2(8),
    OF_DEFQUE                                      VARCHAR2(20),
    SYS_TYPE                                           CHAR(1),
    SYS_CLIENT_IDENTIFIER                              VARCHAR2(64),
    SYS_OS_USER                                        VARCHAR2(64),
    SYS_HOST                                           VARCHAR2(64),
    SYS_IP_ADDRESS                                     VARCHAR2(64),
    SYS_TERMINAL                                       VARCHAR2(64),
    SYS_MODULE                                         VARCHAR2(64),
    SYS_DATE                                           DATE
    CREATE TABLE OPRFILE_AUDIT (
    OLD_OF_OPID                                        VARCHAR2(8),
    OLD_OF_DEFQUE                                      VARCHAR2(20),
    NEW_OF_OPID                                        VARCHAR2(8),
    NEW_OF_DEFQUE                                      VARCHAR2(20),
    SYS_TYPE                                           CHAR(1),
    SYS_CLIENT_IDENTIFIER                              VARCHAR2(64),
    SYS_OS_USER                                        VARCHAR2(64),
    SYS_HOST                                           VARCHAR2(64),
    SYS_IP_ADDRESS                                     VARCHAR2(64),
    SYS_TERMINAL                                       VARCHAR2(64),
    SYS_MODULE                                         VARCHAR2(64),
    SYS_DATE                                           DATE
    -- Keep the trigger simple, why repeating 3 times insert?
    CREATE OR REPLACE TRIGGER oprfile_trg
       BEFORE INSERT OR UPDATE OR DELETE OF of_opid, of_defque
       ON oprfile
       REFERENCING NEW AS new OLD AS old
       FOR EACH ROW
    DECLARE
       v_sys_type     CHAR (1);
    BEGIN
       IF INSERTING
       THEN
          v_sys_type := 'A';
       ELSIF UPDATING
       THEN
          v_sys_type := 'C';
       ELSIF DELETING
       THEN
          v_sys_type := 'D';
       END IF;
       INSERT INTO oprfile_audit (old_of_opid, old_of_defque, new_of_opid
                    , new_of_defque, sys_type, sys_client_identifier
                    , sys_os_user, sys_host, sys_ip_address
                    , sys_terminal, sys_module, sys_date)
            VALUES (:old.of_opid, :old.of_defque
                  , :new.of_opid, :new.of_defque
                  , v_sys_type, SYS_CONTEXT ('USERENV', 'CLIENT_IDENTIFIER')
                  , SYS_CONTEXT ('USERENV', 'OS_USER'), SYS_CONTEXT ('USERENV', 'HOST')
                  , SYS_CONTEXT ('USERENV', 'IP_ADDRESS'), SYS_CONTEXT ('USERENV', 'TERMINAL')
                  , SYS_CONTEXT ('USERENV', 'MODULE'), SYSDATE);
    EXCEPTION
       WHEN OTHERS
       THEN
          -- Consider logging the error and then re-raise
          RAISE;
    END oprfile_trg;
    -- Testing ....
    INSERT INTO oprfile (of_opid, of_defque)
         VALUES ('OF_OPID1', 'OF_DEFQUE1');
    INSERT INTO oprfile (of_opid, of_defque)
         VALUES ('OF_OPID2', 'OF_DEFQUE2');
    INSERT INTO oprfile (of_opid, of_defque)
         VALUES ('OF_OPID3', 'OF_DEFQUE3');
    UPDATE oprfile
       SET of_defque = 'OF_DEFQUE99'
    WHERE of_opid = 'OF_OPID1';
    DELETE oprfile
    WHERE of_opid = 'OF_OPID2';
    COMMIT;
    -- output
    SELECT * FROM oprfile_audit;
    OLD_OF_OPID OLD_OF_DEFQUE        NEW_OF_OPID NEW_OF_DEFQUE        SYS_TYPE SYS_CLIENT_IDENTIFIER SYS_OS_USER       SYS_HOST         SYS_IP_ADDRESS SYS_TERMINAL SYS_MODULE    SYS_DATE           
                                     OF_OPID1    OF_DEFQUE1           A                              TGDFAAL4          U187662          127.0.0.1      U187662      TOAD 10.5.1.3 14/06/2012 15:41:07
                                     OF_OPID2    OF_DEFQUE2           A                              TGDFAAL4          U187662          127.0.0.1      U187662      TOAD 10.5.1.3 14/06/2012 15:41:08
                                     OF_OPID3    OF_DEFQUE3           A                              TGDFAAL4          U187662          127.0.0.1      U187662      TOAD 10.5.1.3 14/06/2012 15:41:08
    OF_OPID1    OF_DEFQUE1           OF_OPID1    OF_DEFQUE99          C                              TGDFAAL4          U187662          127.0.0.1      U187662      TOAD 10.5.1.3 14/06/2012 15:41:08
    OF_OPID2    OF_DEFQUE2                                            D                              TGDFAAL4          U187662          127.0.0.1      U187662      TOAD 10.5.1.3 14/06/2012 15:41:08
    {code}
    Regards.
    Al                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               

  • Help with wii button trigger

    I'm fairly new to action script and struggling to get a
    wiimote to trigger a flash scene.
    Need the scene to be triggered by the IR and B button
    together.
    I currently have this piece of script which triggers the
    scene but only through the IR.
    if (bButtonPressed)(myWiimote.ir.x1 >=0.1);
    gotoAndStop(10);
    Can anyone help me please.
    Cheers
    Tom

    I suggest you move the procedure call from the button's pl/sql block to an explicitly defined WHEN-BUTTON-PRESSED event. Then Designer will not generate any message handling, so you can write your own.
    In your WHEN-BUTTON-PRESSED code block, put something like...
    BEGIN
    procedure_name;
    IF NOT form_success THEN
    qms$errors.show_message('XXX-00016',p_param0='procedure_name');
    END IF;
    END;
    For more information on qms$errors.show_message, see the Headstart User Guide, pg 16-6 through 16-7.
    On another subject, you reported about a month ago with using qms$menu_call_form. I was wondering if you were able to reproduce this problem with the Headstart Demo Application, or have any more information about when it happens. If so, can you email me at [email protected]
    Regards,
    Lauri

  • Flash Help with Flash Basic

    Hello Robohelp Users,
    we want to create our own Robo Flash Help. Does it works with
    the Flash Basic Version or do we need the Flash Professionell
    version?
    Margit

    Margit -
    Flash Help is a product of Robohelp; your users only need
    Macromedia's Flash player installed in order to view it. Which,
    according to MM, is about 97.7% of the Internet-connected PCs.
    So, it looks like you're good to go, yes?

  • Help with QoS basic configuration.

    Hi all, i want to configure qos in a cisco lan with non cisco phone. I read a lot of documentation and some basic videos. I don't want to configure it very granular, so, the most basic commands that i found:
    conf t
    int fa0/5
    switchport voice vlan 111
    mls qos trust cos
    auto qos voip trust
    How i'm be realy sure that QoS is working on mi lan?
    And how about the interface trunk configuration?
    Any suggestion?
    Here are the verification:
    In the show running-configuration :
    mls qos map cos-dscp 0 8 16 24 32 46 48 56
    mls qos srr-queue input bandwidth 70 30
    mls qos srr-queue input threshold 1 80 90
    mls qos srr-queue input priority-queue 2 bandwidth 30
    mls qos srr-queue input cos-map queue 1 threshold 2 3
    mls qos srr-queue input cos-map queue 1 threshold 3 6 7
    mls qos srr-queue input cos-map queue 2 threshold 1 4
    mls qos srr-queue input dscp-map queue 1 threshold 2 24
    mls qos srr-queue input dscp-map queue 1 threshold 3 48 49 50 51 52 53 54 55
    mls qos srr-queue input dscp-map queue 1 threshold 3 56 57 58 59 60 61 62 63
    mls qos srr-queue input dscp-map queue 2 threshold 3 32 33 40 41 42 43 44 45
    mls qos srr-queue input dscp-map queue 2 threshold 3 46 47
    mls qos srr-queue output cos-map queue 1 threshold 3 4 5
    mls qos srr-queue output cos-map queue 2 threshold 1 2
    mls qos srr-queue output cos-map queue 2 threshold 2 3
    mls qos srr-queue output cos-map queue 2 threshold 3 6 7
    mls qos srr-queue output cos-map queue 3 threshold 3 0
    mls qos srr-queue output cos-map queue 4 threshold 3 1
    mls qos srr-queue output dscp-map queue 1 threshold 3 32 33 40 41 42 43 44 45
    mls qos srr-queue output dscp-map queue 1 threshold 3 46 47
    mls qos srr-queue output dscp-map queue 2 threshold 1 16 17 18 19 20 21 22 23
    mls qos srr-queue output dscp-map queue 2 threshold 1 26 27 28 29 30 31 34 35
    mls qos srr-queue output dscp-map queue 2 threshold 1 36 37 38 39
    mls qos srr-queue output dscp-map queue 2 threshold 2 24
    mls qos srr-queue output dscp-map queue 2 threshold 3 48 49 50 51 52 53 54 55
    mls qos srr-queue output dscp-map queue 2 threshold 3 56 57 58 59 60 61 62 63
    mls qos srr-queue output dscp-map queue 3 threshold 3 0 1 2 3 4 5 6 7
    mls qos srr-queue output dscp-map queue 4 threshold 1 8 9 11 13 15
    mls qos srr-queue output dscp-map queue 4 threshold 2 10 12 14
    mls qos queue-set output 1 threshold 1 100 100 50 200
    mls qos queue-set output 1 threshold 2 125 125 100 400
    mls qos queue-set output 1 threshold 3 100 100 100 400
    mls qos queue-set output 1 threshold 4 60 150 50 200
    mls qos queue-set output 1 buffers 15 25 40 20
    mls qos
    In the interface configuration:
    interface FastEthernet0/5
    switchport access vlan 111
    switchport mode access
    switchport voice vlan 111
    srr-queue bandwidth share 1 30 35 5
    priority-queue out
    mls qos trust cos
    auto qos trust
    spanning-tree portfast
    In trunk port:
    interface GigabitEthernet0/1
    switchport mode trunk
    sh mls qos int f0/5
    FastEthernet0/5
    trust state: trust cos
    trust mode: trust cos
    trust enabled flag: ena
    COS override: dis
    default COS: 0
    DSCP Mutation Map: Default DSCP Mutation Map
    Trust device: none
    qos mode: port-based
    Thanks a lot !
    Martín.

    Hi, thanks for reply. I investigate a little more.
    When i want verify that QoS really work in the lan, first of all:
    - The marking (in my case verify traffic VoIP at 64)
    - Queue, that put first in the queue voice traffic, dscp 64
    To try, i make a call connecting an IP phone (in fa0/6) and call to analog phone. Wait for 2 minutes and see what changes in this command:
    Switch#sh mls qos int f0/6 stFastEthernet0/6 (All statistics are in packets)  dscp: incoming-------------------------------  0 -  4 :       4465744658 0            0            0            0  5 -  9 :           0            0            0            0            0 10 - 14 :           0            0            0            0            0 15 - 19 :           0            0            0            0            0 20 - 24 :           0            0            0            0            0 25 - 29 :           0         1196            0            0            0 30 - 34 :           0            0            0            0            0 35 - 39 :           0            0            0            0            0 40 - 44 :           0            0            0            0            0 45 - 49 :           0        41769 62163 0           91 98            0 50 - 54 :           0            0            0            0            0 55 - 59 :           0            0            0            0            0 60 - 64 :           0            0            0            0  dscp: outgoing-------------------------------  0 -  4 :      251670 272323 0            0            0            0  5 -  9 :           0            0            0            0            0 10 - 14 :           0            0            0            0            0 15 - 19 :           0            0            0            0            0 20 - 24 :           0            0            0            0            0 25 - 29 :           0            0            0            0            0 30 - 34 :           0            0            0            0            0 35 - 39 :           0            0            0            0            0 40 - 44 :           0            0            0            0            0 45 - 49 :           0         3393            0            0            0 50 - 54 :           0            0            0            0            0 55 - 59 :           0            0            0            0            0 60 - 64 :           0            0            0            0  cos: incoming-------------------------------  0 -  4 :       89094 109541 0            0            0            0  5 -  7 :           0            0            0  cos: outgoing-------------------------------  0 -  4 :      295699 316387 0            0            0            0  5 -  7 :        3393            0            0  output queues enqueued: queue:    threshold1   threshold2   threshold3----------------------------------------------- queue 0:           2           0           0 queue 1:      209108        1534      194272 queue 2:           0           0       56565 queue 3:           0           0       33762  output queues dropped: queue:    threshold1   threshold2   threshold3----------------------------------------------- queue 0:           0           0           0 queue 1:          57           0           0 queue 2:           0           0           0 queue 3:           0           0           0Policer: Inprofile:            0 OutofProfile:            0
    The underlined numbers is the variations in aprox. 2 minutes in the call. That mean that the traffic was marked as VoIP traffic, but i´m not sure that the traffic is queued right.
    I´m wrong?
    Thanks for the help
    PS:Later monitoring: with iperf or Cacti using IP SLA.

  • Can someone help with some basic answers on Premiere Elements 12

    I have used Premiere Elements in the past (up to Premiere Elements 9) but only once per annum to edit the past year's video of my Grandchildren. The change now is that I am using a Panasonic HC-V520 and have been shooting in 1080 50p. Premiere Elements 9 doesn't support this format I believe.
    My questions are:
    1     Can Premiere Elements 12 import and edit this format?
    2     If the answer is yes to question 1, can I mix older footage from my old Sony Camcorder with this newer footage for edit in Premiere Elements?
    3     Can I then output to either a Blu Ray disc to play on my DVD Player or an ordinary DVD disc to play on an older DVD Player which is not blu ray compatible?
    4     Am I wasting my time in recording in 1080 50p and should I instead be recording new footage in a different format?
    Thanks for any help you can give me.

    1. yes
    2. yes
    3. No. DVD players can't play BluRay discs -- even if they are burned to a DVD disc.
    4. 1080p50 is a perfectly legitimate mode for shooting, particularly if you're shooting video with a lot of action, since it has double the actual frames of 1080i50. However, your output video may or may not actually have 50p frames (or even be 1920x1080), depending on what form of media you're publishing as. The BluRay files that Premiere Elements outputs, for instance are 50i.

  • Need help with INSTEAD OF trigger on view

    Hi,
    I am trying to use INSTEAD OF on a view because I will be updating the calling table in my trigger, which will cause mutation. 
    I need to update attribute7 of another record based on the new attribute7 of the current record (record being updated in the form).  Below is my script.  My problem is it does not perform the update. 
    create or replace view xxont_oe_order_lines_vw as select * from oe_order_lines_all;
    CREATE OR REPLACE TRIGGER APPS.xxont_sync_ard
    instead of insert or update on xxont_oe_order_lines_vw
    referencing
    new as new
    old as old
    for each row
    begin
       update oe_order_lines_all
           set attribute7 = :new.attribute7
       where attribute18 = to_char(:new.header_id)
          and attribute17 = to_char(:new.line_id)
          and flow_status_code <> 'CANCELLED' ;      
      /*exception
      when others then
         null ;
      end ;*/        
    end ;

    Always make your code developer friendly. Do extensive code instrumentation. At lease you can do this.
    create or replace trigger apps.xxont_sync_ard
    instead of insert or update on xxont_oe_order_lines_vw
    referencing
    new as new
    old as old
    for each row
    declare
       zero_update exception;
    begin
       update oe_order_lines_all
          set attribute7 = :new.attribute7
        where attribute18 = to_char(:new.header_id)
          and attribute17 = to_char(:new.line_id)
          and flow_status_code <> 'CANCELLED' ;
       if sql%rowcount = 0 then
         raise zero_update;
       end if;
    exception
      when zero_update then
         raise_application_error
               -20001
             , 'OE_ORDER_LINES_ALL: 0 rows updated attribute18 = "'
               || attribute18
               || '" attribute17 = "'
               || to_char(:new.line_id)
               || '"'
    end ;
    This will help you raise error when the update does not update any row. This is just an example, make sure if this is what your requirement wants if you want to implement it. If you don't want to raise error then you can just log it in a log table or log file.

  • Need help with a basic script to resize image then resize the canvas

    I am new to photoshop scripting, and have come across a need to force an image to be 8"x10" at 300dpi (whether it is vertical or horizontal)
    I need to maintain the correct orientation in the file, so an Action will not work, I believe I have to implement a script to accomplish this.
    I have the below script so far, but I am not certain of how to input the variables / paramters
    doc = app.activeDocument;
    if (doc.height > doc.width) doc.resizeImage("2400 pixels","3600 pixels", "300", "BICUBIC");
    if (doc.height > doc.width) doc.resizeCanvas("2400 pixels","3000 pixels", "MIDDLECENTER");
    if (doc.height < doc.width) doc.resizeImage("3600 pixels","2400 pixels",300,"BICUBIC");
    if (doc.height < doc.width) doc.resizeCanvas(3000,2400,"MIDDLECENTER");
    When I run this script, I get the following error:
    Error 1245: Illegal argument - argument 4
    - Enumerated value expected
    Line: 5
    if (doc.height < doc.width) doc.resizeImage("3600 pixels","2400 pixels",300,"BICUBIC");
    The fact that its failing on lien 5 lets nme know that I have the "If" portions of my script correct, I just dont know how to accomplish the functions correctly.
    Any help would be appreciated!
    Thanks,
    Brian

    I know I'm late here but it seems to me your trying to automate a 8"x10 or 10"x8 300DPI  print.
    To do that you must first crop your image to a 4:5 aspect ratio to prevent distortion unless your shooting with a 4" by 5" camera.   I wrote a Plugin script a couple years ago that could help you do a centered crop.  You could do the whole process by recording a simple Photoshop action that uses two  Plugin Scripts only four steps would be needed.
    Step 1 Menu File>Automate>AspectRatioSelection  (My script based of Adobe Fit Image Plugin script) Set 4:5 Aspect ratio, center,  Rectangle, Replace, no feather. Llike Fit Image this script woks on both Landscape and Portrait images. The Selection will be correct for the images orientation.
    Step 2 Menu Image>Crop
    Step 3 Menu File>Automate>Fit Image set 3000 PX height and 3000 PX width the Image will be Resample so its longest side will be 3000 pixels.  Adobe Fit Image Plugin Script always uses BICUBIC resampling.  I have a modified version of Fit Image  that uses Bicubic Sharper whebndownsizing and BicubicSmoother when up sizing.
    Step 4 Menu Image>Size un check resample set resolution to 300 DPI.
    When you play the actions the Script Dialogs will not be displayed and the setting use when you recorded the action will ne used.
    The Plugin Script are included in my crafting actions package:
    http://www.mouseprints.net/old/dpr/JJMacksCraftingActions.zip
    Contains:
    Action Actions Palette Tips.txt
    Action Creation Guidelines.txt
    Action Dealing with Image Size.txt
    Action Enhanced via Scripted Photoshop Functions.txt
    CraftedActions.atn Sample Action set includes an example Watermarking action
    Sample Actions.txt Photoshop CraftedActions set saved as a text file. This file has some additional comments I inserted describing how the actions work.
    12 Scripts for actions
    My other free Photoshop downloads cam be found here: http://www.mouseprints.net/Photoshop.html

  • Help with my basic java

    Hello i am in a high school programming class and i need help. I have to make an application that draws a basic face, and then i put in different scrollbars, drop menus and checkboxes to control how the face works. I have gotten most of what i need to do but i am stuck on, I need to have a so if i press it they will get closer together of farther apart, which is where im stuck. i can only make them move in the same direction. any ideas???
    heres the code.
    import java.awt.*;
    import java.awt.event.*;
    public class Unit9q extends java.applet.Applet implements AdjustmentListener,ItemListener {
         Graphics g;
         Checkbox mybox1,mybox2,mybox3,mybox4,mybox5;
         CheckboxGroup mygroup1,mygroup2;
         Choice mymenubar1,mymenubar2;
         String colorword,shapeword,menuitem1,menuitem2,eyefill,eyesstring;
         Color clr;
         int yaxis,inteyes,ineyes;
         Scrollbar yaxisscroll,eyes;     
         public void init() {
              yaxisscroll=new Scrollbar(0,50,1,120,140);
              yaxisscroll.addAdjustmentListener(this);
              yaxisscroll.setBounds(100,10,100,20);
              add(yaxisscroll);
              yaxis=120;
              eyes=new Scrollbar(0,50,1,120,140);
              eyes.addAdjustmentListener(this);
              eyes.setBounds(100,10,100,20);
              add(eyes);
              inteyes=110;
              mygroup1=new CheckboxGroup();
              mybox1=new Checkbox("Red",mygroup1,false);
              mybox2=new Checkbox("Blue",mygroup1,false);
              mybox3=new Checkbox("Green",mygroup1,false);          
              mybox4=new Checkbox("Filled",mygroup2,false);
              mybox5=new Checkbox("Outlined",mygroup2,false);
              add(mybox4);
              add(mybox5);
              mybox1.addItemListener(this);
              mybox2.addItemListener(this);
              mybox3.addItemListener(this);
              add(mybox1);
              add(mybox2);
              add(mybox3);
              clr=Color.white;
              mymenubar1=new Choice();
              mymenubar1.addItem("Square");
              mymenubar1.addItem("Circle");
              mymenubar1.addItem("Rectangle");
              mymenubar1.addItem("Oval");
              mymenubar1.addItemListener(this);
              mymenubar2=new Choice();
              mymenubar2.addItem("Square");
              mymenubar2.addItem("Oval");
              mymenubar2.addItemListener(this);
              add(mymenubar1);
         public void adjustmentValueChanged(AdjustmentEvent event){
              yaxis=yaxisscroll.getValue();
              inteyes=eyes.getValue();
              repaint();
         public void itemStateChanged(ItemEvent event) {
              menuitem1=mymenubar1.getSelectedItem();
              menuitem2=mymenubar2.getSelectedItem();
              if (mybox1.getState()==true) {clr=Color.red;}
              else if (mybox2.getState()==true) {clr=Color.blue;}
              else if (mybox3.getState()==true) {clr=Color.green;}
              repaint();
         public void paint(Graphics g) {
              g.setColor(Color.black);
              if (menuitem1.equals("Rectangle")){
                   g.drawRect(100,100,70,90);}
              else if (menuitem1.equals("Oval")){
                   g.drawOval(100,100,75,90);}
              else if (menuitem1.equals("Circle")){
                   g.drawOval(100,100,80,80);}
              else if (menuitem1.equals("Square")){
                   g.drawRect(100,100,80,80);}     
              if (menuitem2.equals("Circle")){
                   g.drawOval(80,100,10,10);}
              else if (menuitem2.equals("Square")){
                   g.drawRect(80,100,10,10);}     
                        g.setColor(clr);
              if (mybox4.getState()==true) {
                   g.fillRect(inteyes,120,10,10);
                   g.fillRect(ineyes,120,10,10);}
              else if (mybox5.getState()==true) {
                   g.drawOval(inteyes,120,10,10);
                   g.drawOval(ineyes,120,10,10);}     
              ineyes=inteyes+42;
              g.setColor(Color.black);     
              g.fillOval(128,yaxis,15,22);
              g.drawArc(111,160,50,20,0,180);     
         } //thank you if you can solve it

    Next time you post code, use the CODE button or [code] and [/code] tags so that it maintains the formatting from your editor.
    If two things are moving int the same direction, your adding N to both of their x-coordinates. If you want one to move in one direction and the other in the other direction, then you have to add N to one and -N to the other.

  • Help with a basic query

    Hello
    I am looking at a set of records and need to query them but cannot work out what syntax to use to get the desired result.
    This is the query for the basic data
    SELECT
    SCE_STUC,
    SCE_CRSC,
    SCE_STAC
    FROM SRS_SCE
    WHERE SCE_AYRC = '2009/0'
    and Sce_stuc LIKE '0702794'
    This gives:
    SCE_STUC SCE_CRSC SCE_STAC
    0702794     OAKC3ZSKG     C
    0702794     UBSH1BINS W
    0702794     UBSH1WIDS C
    So I need to create a query that shows where a person (sce_stuc) has a C status for sce_crsc OAKC3ZSKG but also has another SCE_CRSC not OAKC3ZSKG that is not status C.
    I am using Oracle SQL developer btw
    Any help much appreciated

    Hi thanks for these
    So I am looking for people that are C on course OAKC3ZSKG but have a record that is not C for another course this could be an In ('W','N') etc.
    Sorry I have not been that clear so looking to return:
    SCE_STUC SCE_CRSC SCE_STAC
    *0702794     UBSH1BINS      W*
    where the student has
    SCE_STUC SCE_CRSC SCE_STAC
    0702794     OAKC3ZSKG     C
    0702794     OAKC3ZSKG     C
    0702794     UBSH1BINS     W
    Again many thanks

Maybe you are looking for