【連接SAP HANA報錯】com.sap.db.jdbc.exceptions.JDBCDriverException: SAP DBTech JDBC: [258]: insufficient privilege: Detailed info for this error can be found with guid


簡記

連接SAP HANA數據庫時報了如下錯誤:

ERROR org.springframework.boot.SpringApplication - Application run failed
      org.springframework.dao.PermissionDeniedDataAccessException: ConnectionCallback;
      SAP DBTech JDBC: [258]: insufficient privilege: Detailed info for this error can be found with guid '48CF4AA51275224091C2D2066EEFBEFA'; 
      nested exception is com.sap.db.jdbc.exceptions.JDBCDriverException: SAP DBTech JDBC: [258]: insufficient privilege: Detailed info for this error can be found with guid '48CF4AA51275224091C2D2066EEFBEFA'

這個錯誤在SAP官網上只說有個存儲過程可供調用,可以查詢SYS.GET_INSUFFICIENT_PRIVILEGE_ERROR_DETAILS

以此錯誤為例,可使用以下方式查看問題出現的原因:(注意替換guid)

CALL SYS.GET_INSUFFICIENT_PRIVILEGE_ERROR_DETAILS ('48CF4AA51275224091C2D2066EEFBEFA', ?)

我這邊程序的提示如下,錯誤原因是設置了兩個不同的用戶名,我們的項目在啟動參數也設置了schema的名稱,忘記改了……

其他情況需要為當前用戶授予schema的訪問權限即可。

參考地址:
https://help.sap.com/viewer/6b94445c94ae495c83a19646e7c3fd56/2.0.04/en-US/d26bddb8bba54e2eac09d85c93aa8d1c.html


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM