Results 1 to 2 of 2
  1. #1
    Join Date
    Nov 2002
    Location
    India
    Posts
    4

    Post Unanswered: Oracle syntax to Informix syntax

    Could anybody help me in converting the oracle syntax to informix syntax or help me where can I get a good help for this. I am seriously in trouble with this.

    The Oracle sql statements :

    1. SELECT MACHINE
    INTO :HOST FROM V$SESSION
    WHERE SID = '1'

    2. SELECT BANNER INTO :BANNER FROM V$VERSION
    WHERE BANNER LIKE '%Windows%'
    OR BANNER LIKE '%OSF%'
    OR BANNER LIKE '%Tru64%'

    3. SELECT SUBSTR(SPID,1,5), S.SID,
    BLOCK_GETS, CONSISTENT_GETS, PHYSICAL_READS,
    S.SQL_ADDRESS
    INTO :WP_THREAD, :WPTABLE-WP_ORA_SID,
    :WPTABLE-WP_BL_GETS, :WPTABLE-WP_CS_GETS,
    :WPTABLE-WP_PHYREAD,
    :WPTABLE-WP_SQL_ADR
    FROM V$SESSION S, V$PROCESS P, V$SESS_IO I
    WHERE S.PADDR = P.ADDR
    AND S.PROCESS LIKE
    :WP_PID
    AND S.SID = I.SID AND S.STATUS = 'ACTIVE'

    4. SELECT SPID, S.SID,
    BLOCK_GETS, CONSISTENT_GETS, PHYSICAL_READS,
    S.SQL_ADDRESS
    INTO :WPTABLE-WP_ORA_PID, :WPTABLE-WP_ORA_SID,
    :WPTABLE-WP_BL_GETS, :WPTABLE-WP_CS_GETS,
    :WPTABLE-WP_PHYREAD,
    :WPTABLE-WP_SQL_ADR
    FROM V$SESSION S, V$PROCESS P, V$SESS_IO I
    WHERE S.PADDR = P.ADDR
    AND S.PROCESS LIKE
    :WP_PID
    AND S.SID = I.SID AND S.STATUS = 'ACTIVE'

    5. SELECT ADDRESS, PIECE, SQL_TEXT
    FROM V$SQLTEXT
    WHERE ADDRESS IN (
    :ADDRESS1 , :ADDRESS2 , :ADDRESS3 , :ADDRESS4 ,
    :ADDRESS5 , :ADDRESS6 , :ADDRESS7 , :ADDRESS8 ,
    :ADDRESS9 , :ADDRESS10 , :ADDRESS11 ,
    :ADDRESS12, :ADDRESS13 , :ADDRESS14 ,
    :ADDRESS15 , :ADDRESS16 ,
    :ADDRESS17 , :ADDRESS18 , :ADDRESS19 , :ADDRESS20
    )
    INTO :THREAD_SQL_STMT

    Thanks in Advance

  2. #2
    Join Date
    Oct 2009
    Posts
    15
    In informix, we use "onstat" to query on the dbstatus. You can check onstat --help.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •