IBM Support

Login failed for user 'TLUSER' after moving Tealeaf SQL Databases

Question & Answer


Question

Login failed for user 'TLUSER' after moving Tealeaf SQL Databases

Answer

Contents
Problem
If you have backed up and restored your Tealeaf databases as part of a SQL Migration you might see the following error in the Windows Event Log:
"Login failed for user 'TLUSER'. Reason: Password did not match that for the login provided".

Further investigation of SQL might find the TLUSER and TLADMIN account but the "User Mapping" settings will likely not be correct: the db_datareader and db_datawriter roles are not assigned to the TLUSER login. Trying to correct this might result in the attached error occurs: "User group or role 'TLUSER' already exists in the current database. (Microsoft SQL Server Error: 15023)".

Cause
This error happens when you restore a database in SQL 2005 and above. Users are stored in the database and a login user is mapped to a database user. When you restore a database this mapping is lost and you need to remap the login user to the database user (using the sp_change_users SQL stored procedure). The steps are described at: http://www.fileformat.info/tip/microsoft/sql_orphan_user.htm

Solution
First make sure that this is the actual cause of the problem. The following statements will list the orphaned users:
use TL_SYSTEM;
EXEC sp_change_users_login 'Report';

use TL_REPORTS;
EXEC sp_change_users_login 'Report';

use TL_STATISTICS;
EXEC sp_change_users_login 'Report';

use TL_RSEXTRACTOR;
EXEC sp_change_users_login 'Report';

TLUSER and TLADMIN should be listed.

Then you will have to follow the next steps for all your Tealeaf databases for example:
use TL_SYSTEM;
EXEC sp_change_users_login 'Auto_Fix' 'TLUSER';
EXEC sp_change_users_login 'Auto_Fix' 'TLADMIN';

use TL_REPORTS;
EXEC sp_change_users_login 'Auto_Fix' 'TLUSER';
EXEC sp_change_users_login 'Auto_Fix' 'TLADMIN';

use TL_STATISTICS;
EXEC sp_change_users_login 'Auto_Fix' 'TLUSER';
EXEC sp_change_users_login 'Auto_Fix' 'TLADMIN';

use TL_RSEXTRACTOR;
EXEC sp_change_users_login 'Auto_Fix' 'TLUSER';
EXEC sp_change_users_login 'Auto_Fix' 'TLADMIN';

Article Reference
00001098

Version this article applies to
7.0;7.1;7.2

"

[{"Business Unit":{"code":"BU055","label":"Cognitive Applications"},"Product":{"code":"SSERNK","label":"Tealeaf Customer Experience"},"Component":"","Platform":[{"code":"PF025","label":"Platform Independent"}],"Version":"All Versions","Edition":"","Line of Business":{"code":"","label":""}}]

Document Information

Modified date:
08 December 2018

UID

ibm10776979