Guest User

Untitled

a guest
May 22nd, 2018
188
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.56 KB | None | 0 0
  1. Class.forName("com.teradata.jdbc.TeraDriver");
  2. String connectionString = "jdbc:teradata://xxx.xxxxxx.com/database=xxxxxx, tmode=ANSI, charset=UTF8";
  3. String user = "Rocket512";
  4. String password = "aui8mn5";
  5. Connection conn = DriverManager.getConnection(connectionString, user, password);
  6.  
  7. Exception in thread "main" com.teradata.jdbc.jdbc_4.util.JDBCException: [Teradata Database]
  8. [TeraJDBC 14.10.00.17] [Error 8017] [SQLState 28000] The UserId, Password or Account is invalid.
  9. at com.teradata.jdbc.jdbc_4.util.ErrorFactory.makeDatabaseSQLException(ErrorFactory.java:300)
  10. at com.teradata.jdbc.jdbc.GenericLogonController.run(GenericLogonController.java:666)
  11. at com.teradata.jdbc.jdbc_4.TDSession.<init>(TDSession.java:216)
  12.  
  13. select *
  14. from dbc.logonoff
  15. where logdate >= date '2013-10-31'
  16.  
  17. select *
  18. from dbc.logonoff
  19. where logdate >= date '2013-10-31'
  20.  
  21. SELECT U.UserName
  22. , U.ProfileName
  23. , U.DefaultAccount
  24. , COALESCE(P.MAXLOGONATTEMPTS, S.MAXLOGONATTEMPTS) AS MaxLogonAttempts_
  25. , U.LockedCount
  26. , U.LockedDate
  27. FROM dbc.UsersV U
  28. LEFT JOIN
  29. dbc.ProfileInfoV P
  30. ON P.ProfileName = U.ProfileName
  31. CROSS JOIN
  32. dbc.SecurityDefaults S
  33. WHERE UserName = 'Rocket512';
  34.  
  35. SELECT *
  36. FROM DBC.LogonRulesV
  37. WHERE UserName = 'Rocket512';
  38.  
  39. String driver = "com.teradata.jdbc.TeraDriver";
  40. String conUrl="jdbc:teradata://xxx.xxxxxx.com/database=xxxxxx,USER=Rocket512,PASSWORD=aui8mn5,tmode=ANSI,charset=UTF8";
  41. Class.forName(driver);
  42. Connection dbConn = DriverManager.getConnection(conUrl);
Add Comment
Please, Sign In to add comment