Informix

Informix

Connect with Db2, Informix, Netezza, open source, and other data experts to gain value from your data, share insights, and solve problems.

 View Only
  • 1.  delete time series data using tscontainerpurge

    Posted 09/13/22 04:03 AM
    Edited by System Admin 01/20/23 04:48 PM
    Hi,
    i tried to delete time series data through a specified timestamp using tscontainerpurge with this script:
    - unload to "regular_purgetest.unl"
    SELECT GetContainerName(para_values),InstanceId(para_values),GetIndex(para_values,'2018-01-01 23:00:00.00000'::datetime year to fraction(5))::varchar(25)
    FROM meter_ts_tbl
    WHERE GetContainerName(para_values)='dlog1_meter';

    afterall the control file is generated and located in informix directory however when i try to execute time series deletion function with this statement:
    - EXECUTE FUNCTION TSContainerpurge('regular_purgetest.unl',1);

    and it return error: (UTSBW) - location argument to routine TSContainerPurge was bad.

    so, i tried other statement:
    -EXECUTE FUNCTION TSContainerpurge("regular_purgetest.unl");

    Then, it return another error
    (UTSGR) - control file error: The file regular_purgetest.unl cannot be opened.

    Anyone know how to resolve this?






    ------------------------------
    nasiha zailan
    ------------------------------
    #Informix


  • 2.  RE: delete time series data using tscontainerpurge

    Posted 09/13/22 07:17 AM
    Try adding full path and 'server'

    Cheers
    Paul

    Paul Watson
    Oninit LLC
    +1-913-387-7529
    www.oninit.com
    Oninit®️ is a registered trademark of Oninit LLC





  • 3.  RE: delete time series data using tscontainerpurge

    Posted 09/13/22 10:26 PM
    Hi, you mean this?

    EXECUTE FUNCTION TSContainerpurge("regular_purgetest1.unl","C:\Program Files\IBM Informix Software Bundle\regular_purgetest1.unl""tlms_db_server",1);

    I've executed then but still it returns the same error: (UTSBW) - location argument to routine TSContainerPurge was bad.

    ------------------------------
    nasiha zailan
    ------------------------------



  • 4.  RE: delete time series data using tscontainerpurge

    Posted 09/13/22 10:42 PM
    Sometime like 'full path to file', 'client', 1 as the parameters.  

    Cheers
    Paul

    Paul Watson
    Oninit LLC
    +1-913-387-7529
    www.oninit.com
    Oninit®️ is a registered trademark of Oninit LLC





  • 5.  RE: delete time series data using tscontainerpurge

    Posted 09/13/22 11:54 PM
    Ok it works, thanks for your help.

    ------------------------------
    nasiha zailan
    ------------------------------



  • 6.  RE: delete time series data using tscontainerpurge

    Posted 09/14/22 07:47 AM
    In my experience it's not a good idea for rely on the defaults when using TS functions, better to populate . And, IMHO, makes the function calls more readable.

    Cheers
    Paul

    Paul Watson
    Oninit LLC
    +1-913-387-7529
    www.oninit.com
    Oninit®️ is a registered trademark of Oninit LLC