嘗試連接到DB2,我收到以下錯誤錯誤,同時連接到DB2
Connection failed: db2 sql error: sqlcode=-1060,sqlstate=08004
我試圖做
查找,但沒有看到任何意義有關此sqlcode的錯誤消息。請建議如何解決此問題。
嘗試連接到DB2,我收到以下錯誤錯誤,同時連接到DB2
Connection failed: db2 sql error: sqlcode=-1060,sqlstate=08004
我試圖做
查找,但沒有看到任何意義有關此sqlcode的錯誤消息。請建議如何解決此問題。
這是正確的錯誤:
SQL1060N User "" does not have the CONNECT privilege.
Explanation:
The specified authorization ID does not have the CONNECT privilege to access the database. The CONNECT privilege must be granted before the user can connect to a database. This error is also returned when a switch user request is made with a user ID allowed on the trusted connection but that user ID does not hold CONNECT privilege on the database. The connection is put in an unconnected state.
Federated system users: This situation can also be detected by the data source
The command cannot be processed.
User response:
Contact the system administrator or database administrator for the database and request a GRANT CONNECT for the authorization ID. Resubmit the command.
If this error is returned as a result of a switch user request, then until a switch user request with a valid user ID is made (the user ID that established the trusted connection or a user ID allowed on the trusted connection), if any SQL statement is issued, an error is returned (SQLSTATE 08003). The connection remains trusted when it is taken out of the unconnected state.
Federated system users: if necessary isolate the problem to the data source that rejected the request (see the Troubleshooting Guide for procedures to follow to identify the data source that failed) and ensure that correct privileges have been granted for that data source. Some data sources might use a different name than the CONNECT privilege for the privilege required to connect to a database.
sqlcode: -1060
sqlstate: 08004
感謝..的細節.. – user1588737
這是你正在尋找了錯誤的SQLCODE。而你沒有在那裏找到sqlcode 1060,可能是因爲你的數據庫不是9.1版或者不能在z/OS上運行? – Ingo