|
|
|
Forum Member
      
Group: Forum Members
Last Login: 9/21/2008 8:53:19 PM
Posts: 28,
Visits: 108
|
|
Is there any query which will tell me who all are using a particular table?
Suppose i am inserting into a table A and someone else is selecting data from A at the same time .
Can i get the information who all are accessing that table(here A)
|
|
|
|
|
Junior Member
      
Group: Forum Members
Last Login: 7/24/2008 2:40:40 AM
Posts: 18,
Visits: 28
|
|
Try this...
SELECT *
FROM
(SELECT QueryID, UserName
FROM DBC.qrylog) QL,
(SELECT QueryID, SQLTextInfo
FROM DBC.QrylogSql
WHERE SQLTextInfo like ' ') QLS
WHERE
QL.QueryId= QLS.QueryId;
|
|
|
|
|
Junior Member
      
Group: Forum Members
Last Login: 7/24/2008 2:40:40 AM
Posts: 18,
Visits: 28
|
|
In the like clause pass the databaseName.TableName
Eg.: '%DatabaseName.TableName%'
|
|
|
|
|
Junior Member
      
Group: Forum Members
Last Login: 8/25/2008 5:46:43 PM
Posts: 23,
Visits: 73
|
|
how come we dont have qrylog and qrylogsql tables? We are using Teradata V2R5. We have table call DBQLogTbl, but the data is not as current time. It may have one day delay. Teradata manager can see all the current running sessions.
Ivy
|
|
|
|
|
Junior Member
      
Group: Forum Members
Last Login: 8/25/2008 5:46:43 PM
Posts: 23,
Visits: 73
|
|
they are in the view session.
Ivy
|
|
|
|