Add DB name on failed login example
The Add DB name on failed login policy solves a problem where the database name is not available if the login fails (with a LOGIN_FAILED message). If the DB NAME value is empty, the policy adds a database name.
This example has one rule and one rule action.
- Session level criteria:
- Server IP address = 20.20.20.20
- Server port = 1433
- Rule action = TRANSFORM DB NAME
- Source = DB NAME
- Request type = LOGIN FAILED
- Output format = NEWACCDB
SR language example
SR_POLICIES
{
IF (SERVER_IP = '20.20.20.20' SERVER_PORT = '1433')
{
TRANSFORM_DB_NAME REQ_TYPE = LOGIN_FAILED OUTPUT_FORMAT = 'NEWACCDB'
}
}