Is there any query which will tell me.....

Database
Enthusiast

Is there any query which will tell me.....

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)
4 REPLIES
Enthusiast

Re: Is there any query which will tell me.....

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;
Enthusiast

Re: Is there any query which will tell me.....

In the like clause pass the databaseName.TableName
Eg.: '%DatabaseName.TableName%'
Enthusiast

Re: Is there any query which will tell me.....

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.
Enthusiast

Re: Is there any query which will tell me.....

they are in the view session.