Focal Point Banner


As of December 1, 2020, Focal Point is retired and repurposed as a reference repository. We value the wealth of knowledge that's been shared here over the years. You'll continue to have access to this treasure trove of knowledge, for search purposes only.

Join the TIBCO Community
TIBCO Community is a collaborative space for users to share knowledge and support one another in making the best use of TIBCO products and services. There are several TIBCO WebFOCUS resources in the community.

  • From the Home page, select Predict: WebFOCUS to view articles, questions, and trending articles.
  • Select Products from the top navigation bar, scroll, and then select the TIBCO WebFOCUS product page to view product overview, articles, and discussions.
  • Request access to the private WebFOCUS User Group (login required) to network with fellow members.

Former myibi community members should have received an email on 8/3/22 to activate their user accounts to join the community. Check your Spam folder for the email. Please get in touch with us at community@tibco.com for further assistance. Reference the community FAQ to learn more about the community.


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

Read-Only Read-Only Topic
Go
Search
Notify
Tools
[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, 2004Report 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
 
Report 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
 
Report 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, 2004Report This Post
  Powered by Social Strata  

Read-Only Read-Only Topic

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

Copyright © 1996-2020 Information Builders