Results 1 to 8 of 8
  1. #1
    Join Date
    Sep 2008
    Posts
    33

    Unanswered: which users connected to a table

    Is there anyway we can know which users are connected to a table in a database......

  2. #2
    Join Date
    Nov 2004
    Posts
    143
    You can do that by running a query against sysmaster db

    select *
    from syssqlstat
    where sqs_statement where matches '*<tabname>*';

    this would give you session id, dbname, sql statement being run and some more info.

    Hope it helps.

    Nitin

  3. #3
    Join Date
    Sep 2008
    Posts
    33
    Thanks Nitin

  4. #4
    Join Date
    Sep 2008
    Posts
    33

    Hi Nitin

    is there any command that helps us in knowing the database lock mode apart from extracting dbschema.I wanna see at lock mode at database level not at table levels.please correct me if my question is wrong

  5. #5
    Join Date
    Apr 2007
    Location
    Jundiai / SP - Brasil
    Posts
    311
    What exactly you want means with this?
    There no exists database lock mode.

    If you want the default lock mode , this is not define on the database , is defined over the all instance in the ONCONFIG file with parameter DEF_TABLE_LOCKMODE.
    by default the lock mode is PAGE lock.

    Another parameter is the IFX_DEF_TABLE_LOCKMODE enviroment variable. This override the DEF_TABLE_LOCKMODE parameter on the ONCONFIG , but is valid only to the session where the variable is set.

    to get the lock mode of each table , you can use the dbschema with -ss parameter.
    ________________________________________
    César Inacio Martins
    Jundiai / SP - Brasil
    http://www.imartins.com.br/informix - em Português
    http://www.imartins.com.br/informix - English (translated by Google).
    ________________________________________

  6. #6
    Join Date
    Nov 2004
    Posts
    143
    Hi,

    I am not aware about locking modes of databases.

    What exactly you want to do with this info?

    Nitin

  7. #7
    Join Date
    Sep 2008
    Posts
    33

    Hi

    Hi Nitin,

    my point is instead of extracting the schema and checking for the locking level set to all the tables in the schema do we hav any shortcut.......

  8. #8
    Join Date
    Nov 2004
    Posts
    143
    Use below query

    select tabname , locklevel from systables where tabid > 99


    This will provide you the table locking level info.

    regards,

    Nitin

Posting Permissions

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