Focal Point Banner
Community Center Education Summit Technical Support User Groups
Let's Get Social!

Facebook Twitter LinkedIn YouTube
Focal Point    Focal Point Forums  Hop To Forum Categories  WebFOCUS/FOCUS Forum on Focal Point     [SOLVED] Query Banding for Teradata
Go
New
Search
Notify
Tools
Reply
  
[SOLVED] Query Banding for Teradata
 Login/Join
 
Platinum Member
posted
Has anyone used Query Banding with Teradata? So far I have not been able to enable the Query Band and execute SQL Passthru together. I can do each separately but not together. The second connection is removing the QUERY BAND from the first connection.

This will enable the Query Band:
SQL SQLDBC
SET QUERY_BAND='ClientUser=jdoe;' FOR SESSION;
END

This works for sql passthru:
SQL SQLDBC SET DEFAULT_CONNECTION devdss
SQL SQLDBC
select branch_id, branch_name order by 1 from dss_tables.branch;
TABLE FILE SQLOUT
PRINT *
END

Both are SQL statements that are terminated with a semi colon. The first SQL statement enables the QUERY BAND. The next SQL statement reads data from a table and has to have the SQL SQLDBC to connect to the table. The connection is removing the QUERY BAND from the first connection.

This message has been edited. Last edited by: <Kathryn Henning>,


WF 8 version 8.2.04. Windows.
In focus since 1990.
 
Posts: 189 | Location: pgh pa | Registered: October 06, 2004Reply With QuoteReport This Post
<Kathryn Henning>
posted
Hi Spence,

Thank you for opening a case for this issue. Please keep us updated on the outcome.

Thanks and regards,

Kathryn
 
Reply With QuoteReport This Post
<Kathryn Henning>
posted
Hi,

For those who find this topic on future searches, here is the resolution from the case.

The following passthru request at the top of the focexec will set QUERY_BANDING for the focexec:

SQL SQLDBC
SET QUERY_BAND='ClientUser=user_a;' FOR SESSION;
END

where 'user_a' is the user you want to set in the Query Banding. To show that the Query_band is being set correctly, add the following after it is set in the same focexec:

SQL SQLDBC HELP SESSION;
TABLE FILE SQLOUT PRINT
Transaction_Semantics
QueryBand
User_Name
Account_Name
Logon_Date
Logon_Time
Current_DataBase
END

Check the QueryBand column to confirm it is populated with 'user_a'.

Cheers!

Kathryn
 
Reply With QuoteReport This Post
Platinum Member
posted Hide Post
To add to this topic Query Banding is being used to control user security to the Teradata tables.

The query banding required an END to be placed after each of the SQL queries. Without the END after the queries the Query Band was not set for the second query.

SQL SQLDBC SET DEFAULT_CONNECTION devdss
SQL SQLDBC
SET QUERY_BAND='proxyuser=&WF_REMOTE_USER;' FOR SESSION;
END

select count(branch_id) from datamart.branch_test;
END

TABLE FILE SQLOUT
PRINT *
END


WF 8 version 8.2.04. Windows.
In focus since 1990.
 
Posts: 189 | Location: pgh pa | Registered: October 06, 2004Reply With QuoteReport This Post
  Powered by Social Strata  
 

Focal Point    Focal Point Forums  Hop To Forum Categories  WebFOCUS/FOCUS Forum on Focal Point     [SOLVED] Query Banding for Teradata

Copyright © 1996-2018 Information Builders, leaders in enterprise business intelligence.