Teradata Error while connecting to the TeraDatabase using Ibatis plugin.Getting JDBC exception

Connectivity

Teradata Error while connecting to the TeraDatabase using Ibatis plugin.Getting JDBC exception

Hi,I have used the Ibatis Teradata plugin in Rational Application Developer.I have written a simple sql select query which is mapped in a SQL Map.Then i have created a DAO from the SQL Maps.When i run the JUnit test using the build.xml i am getting the following exception.

[testng] Feb 24, 2012 6:07:43 AM com.teradata.commons.access.IbatisTaoSession beginTransaction

   [testng] SEVERE: Start transaction exception:com.teradata.jdbc.jdbc_4.util.JDBCException: [Teradata Database] [TeraJDBC 13.10.00.20] [Error 9203] [SQLState HY000] Connect Through has not been granted to A0C1KS through A0C1KS.

   [testng] Feb 24, 2012 6:07:43 AM org.springframework.test.context.transaction.TransactionalTestExecutionListener endTransaction

   [testng] INFO: Rolled back transaction after test execution for test context [[TestContext@8640864 testClass = TestSampleXML, locations = array<String>['classpath:SampleXML-context.xml'], testInstance = bcbs.TestSampleXML@2ebe2ebe, testMethod = testTestMap@TestSampleXML, testException = java.lang.reflect.InvocationTargetException]]

Any help regarding how to resolve this?Thanks in advance.Patnaik

1 REPLY
Teradata Employee

Re: Teradata Error while connecting to the TeraDatabase using Ibatis plugin.Getting JDBC exception

The introduction of Trusted Session in TD 13.00 means you may need to issue some extra grants to allow the A0C1KS user acces to the database (Trusted Sessions allows Connection Pool based applications to log on many identical sessions as a Known "Trusted Users" and then through Query Bands allow individual sessions identify their specific user - the person on the other end of a Web session for example).


-- Enhancements Required to Operate on TD13 with Trusted Sessions


CREATE ROLE TZA_PROXY_ROLE;


COMMIT;


GRANT CONNECT THROUGH TZA_USER TO TZA_PROXY_USER WITH ROLE TZA_PROXY_ROLE;


COMMIT;


-- Extra Grants DBC can use to hand off further CONNECT THROUGH capability to the TZA_USER. 


GRANT CTCONTROL ON TZA_USER to TZA_USER;


COMMIT;


GRANT TZA_PROXY_ROLE to TZA_USER WITH ADMIN OPTION;


COMMIT;


-- Now you have to issue all necessary Grants to the TZA_PROXY_ROLE 


GRANT SELECT on TZA_DB to TZA_PROXY_ROLE;


COMMIT;


GRANT INSERT on TZA_DB to TZA_PROXY_ROLE;


COMMIT;


GRANT UPDATE on TZA_DB to TZA_PROXY_ROLE;


COMMIT;


GRANT DELETE on TZA_DB to TZA_PROXY_ROLE;


COMMIT;


GRANT EXECUTE on TZA_DB to TZA_PROXY_ROLE;


COMMIT;


GRANT EXECUTE PROCEDURE ON TZA_DB to TZA_PROXY_ROLE;


COMMIT;