If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

 
Go Back  dBforums > Database Server Software > Informix > which users connected to a table

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 09-16-08, 17:45
mallik2004 mallik2004 is offline
Registered User
 
Join Date: Sep 2008
Posts: 33
which users connected to a table

Is there anyway we can know which users are connected to a table in a database......
Reply With Quote
  #2 (permalink)  
Old 09-17-08, 05:09
nitin_math nitin_math is offline
Registered User
 
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
Reply With Quote
  #3 (permalink)  
Old 09-17-08, 11:47
mallik2004 mallik2004 is offline
Registered User
 
Join Date: Sep 2008
Posts: 33
Thanks Nitin
Reply With Quote
  #4 (permalink)  
Old 09-17-08, 13:26
mallik2004 mallik2004 is offline
Registered User
 
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
Reply With Quote
  #5 (permalink)  
Old 09-18-08, 08:36
ceinma ceinma is offline
Registered User
 
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).
________________________________________
Reply With Quote
  #6 (permalink)  
Old 09-18-08, 08:38
nitin_math nitin_math is offline
Registered User
 
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
Reply With Quote
  #7 (permalink)  
Old 09-18-08, 11:19
mallik2004 mallik2004 is offline
Registered User
 
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.......
Reply With Quote
  #8 (permalink)  
Old 09-19-08, 07:14
nitin_math nitin_math is offline
Registered User
 
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
Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On