// Here is the message for -30082 (STATE "08001"):
// Attempt to establish connection failed with security
// reason {0} {1} + reason-code + reason-string.
switch (secchkcd) {
case CodePoint.SECCHKCD_01: // ERROR SVRCOD
return new SqlException(agent_.logWriter_,
new ClientMessageId(SQLState.NET_CONNECT_AUTH_FAILED),
msgutil.getTextMessage(MessageId.CONN_SECMECH_NOT_SUPPORTED));
case CodePoint.SECCHKCD_10: // ERROR SVRCOD
return new SqlException(agent_.logWriter_,
new ClientMessageId(SQLState.NET_CONNECT_AUTH_FAILED),
msgutil.getTextMessage(MessageId.CONN_PASSWORD_MISSING));
case CodePoint.SECCHKCD_12: // ERROR SVRCOD
return new SqlException(agent_.logWriter_,
new ClientMessageId(SQLState.NET_CONNECT_AUTH_FAILED),
msgutil.getTextMessage(MessageId.CONN_USERID_MISSING));
case CodePoint.SECCHKCD_13: // ERROR SVRCOD
return new SqlException(agent_.logWriter_,
new ClientMessageId(SQLState.NET_CONNECT_AUTH_FAILED),
msgutil.getTextMessage(MessageId.CONN_USERID_OR_PASSWORD_INVALID));
case CodePoint.SECCHKCD_14: // ERROR SVRCOD
return new SqlException(agent_.logWriter_,
new ClientMessageId(SQLState.NET_CONNECT_AUTH_FAILED),
msgutil.getTextMessage(MessageId.CONN_USERID_REVOKED));
case CodePoint.SECCHKCD_15: // ERROR SVRCOD
return new SqlException(agent_.logWriter_,
new ClientMessageId(SQLState.NET_CONNECT_AUTH_FAILED),
msgutil.getTextMessage(MessageId.CONN_NEW_PASSWORD_INVALID));
case CodePoint.SECCHKCD_0A: // ERROR SVRCOD
return new SqlException(agent_.logWriter_,
new ClientMessageId(SQLState.NET_CONNECT_AUTH_FAILED),
msgutil.getTextMessage(MessageId.CONN_SECSVC_NONRETRYABLE_ERR));
case CodePoint.SECCHKCD_0B: // ERROR SVRCOD
return new SqlException(agent_.logWriter_,
new ClientMessageId(SQLState.NET_CONNECT_AUTH_FAILED),
msgutil.getTextMessage(MessageId.CONN_SECTKN_MISSING_OR_INVALID));
case CodePoint.SECCHKCD_0E: // ERROR SVRCOD
return new SqlException(agent_.logWriter_,
new ClientMessageId(SQLState.NET_CONNECT_AUTH_FAILED),
msgutil.getTextMessage(MessageId.CONN_PASSWORD_EXPIRED));
case CodePoint.SECCHKCD_0F: // ERROR SVRCOD
return new SqlException(agent_.logWriter_,
new ClientMessageId(SQLState.NET_CONNECT_AUTH_FAILED),
msgutil.getTextMessage(MessageId.CONN_USERID_OR_PASSWORD_INVALID));
default: // ERROR SVRCOD
return new SqlException(agent_.logWriter_,
new ClientMessageId(SQLState.NET_CONNECT_AUTH_FAILED),
msgutil.getTextMessage(MessageId.CONN_NOT_SPECIFIED));
}
}