what kind of query being logged in dbqlogtbl? how to enable logging for an account?

Database
N/A

what kind of query being logged in dbqlogtbl? how to enable logging for an account?

I did

select distinct(clientid) from dbc.dbqlogtbl;

The result come back does not include all the accounts in our databases, which means some of the account do not have any query log history. How could I check to see whether an user's query has been logged? and how could I turn it on....

Thanks,
Ivy
3 REPLIES

Re: what kind of query being logged in dbqlogtbl? how to enable logging for an account?

To check if a user has logging enabled in DBQL, do a select form the DBQL Rules table and look for the desiered user/account or for the profile of the desiered user/account and check if any logging is enabled or not.

If logging is not enabled you can enable logging for the user/account by BIGIN QUERY LOGGING statement.

Look in Teradata PDFs for discription on Bigin query logging
N/A

Re: what kind of query being logged in dbqlogtbl? how to enable logging for an account?

If I enable the query log of every account for every query step, will it use up a lot of DBC sapce?

Re: what kind of query being logged in dbqlogtbl? how to enable logging for an account?

That depends on how many users you have in your database and whats the usage level of each user.
Generally we log users we want to monitor.

A good way to setup DBQL logging is to enable DBQLogTbl for specific users only and enable DBQLSummaryTbl (on some specific threshold) for other users, this way you can monitor all database activity with fine granularity over desired users.