Highlighted
Absent Member.
Absent Member.
1512 views

Cannot log in after database server name change

Over the weekend, we migrated our development database to a new server.
Now when people try to log into the system, they see the message at the end of this note. I have already gone through and changed the DB server name on the QC server everywhere I can find it (siteadmin.xml, all dbid.xml, qcc_config.xml etc). But I still can't log in.
I've looked over thread 1240442, but that requires being able to log in as a site admin, and I can't even do that. Any suggestions?
(note, the XXX's below refer to the old DB server's name)

Messages:
Failed to Login;
Failed to check authentication of user 'qcadmin';
Cannot build directory item for key '[qcsiteadmin_db@jdbc:mercury:sqlserver://XXXXXXXXXXXXX.XXXXXX.local:1433(td)]' in SA Global Struct Dir;
Failed to fill table struct for table null in database qcsiteadmin_db@jdbc:mercury:sqlserver://XXXXXXXXXXXXXX.XXXXXX.local:1433(td);
Failed to obtain a connection to schema 'qcsiteadmin_db';
Can't create a new database connection for url 'jdbc:mercury:sqlserver://XXXXXXXXXXXXX.XXXXXX.local:1433';
[Mercury][SQLServer JDBC Driver][SQLServer]The server principal "XXXXXX\XXXXXXXXX" is not able to access the database "qcsiteadmin_db" under the current security context.;

Stack Trace:
java.sql.SQLException: [Mercury][SQLServer JDBC Driver][SQLServer]The server principal "XXXXXX\XXXXXXXXX" is not able to access the database "qcsiteadmin_db" under the current security context.
at com.mercury.jdbc.base.BaseExceptions.createException(Unknown Source)

0 Likes
11 Replies
Highlighted
Absent Member.. Absent Member..
Absent Member..

Re: Cannot log in after database server name change

please ask your site admin to login and check if QC is ponting to correct database.

editing dbid.xml should have resolved this.....if you have access to login to site admin...you can get more hints on this error.
0 Likes
Highlighted
Absent Member.
Absent Member.

Re: Cannot log in after database server name change

I am the site admin and am unable to log in. When I try, I see the error message indicating that it is looking for the wrong DB
0 Likes
Highlighted
Absent Member.. Absent Member..
Absent Member..

Re: Cannot log in after database server name change

did you login to database to check, every thing is fine there??
0 Likes
Highlighted
Absent Member.
Absent Member.

Re: Cannot log in after database server name change

Yes, I can connect to the new DB server and the qcsiteadmin_db from the QC server, using the username X'd out above.
I fear that it is still trying to look for the old DB server name when it is trying to connect.
0 Likes
Highlighted
Absent Member.. Absent Member..
Absent Member..

Re: Cannot log in after database server name change

OK..I get it.

can you pleae run below query and check if any progress???

Please run the two SQL queries on the siteadmin schema 'qcsiteadmin_db'' in Query Analyzer.
(i) EXEC sp_change_users_login 'Report'
(ii) EXEC sp_change_users_login 'Update_One', 'td', 'td'

~Shivaram
0 Likes
Highlighted
Absent Member.
Absent Member.

Re: Cannot log in after database server name change

Using the ID that is X'd out in the message, I ran those statements in the new DB Server.
(i) The first statement returned no results
(ii) The second statement returned the following message: Msg 15291, Level 16, State 1, Procedure sp_change_users_login, Line 108
Terminating this procedure. The User name 'td' is absent or invalid.
0 Likes
Highlighted
Absent Member.. Absent Member..
Absent Member..

Re: Cannot log in after database server name change

how about QC access?
are users able to login to QC?........problem only for site admin??

do you still have access to your development server?

can you compare both the databases?

Log a case with HP support, if this is critical for you.
0 Likes
Highlighted
Absent Member.
Absent Member.

Re: Cannot log in after database server name change

This is our our only environment.
When normal users try to log in, they just see a message that says Error: Failed to login.
When I (the site admin) try to log on, I see the same message, but with the option for more details which is when I see the originally posted error message.

We will likely be trying to resurrect the old DB server this morning, followed by trying to back out any changes that were made and connect to that.

I'm in the process of opening a support ticket with HP now.
0 Likes
Highlighted
Absent Member.
Absent Member.

Re: Cannot log in after database server name change

Doesn't the database user 'td' have to exist on the new DB server? I thought this was the ID used by the app server to communicate to the dbserver.
0 Likes
Highlighted
Absent Member.. Absent Member..
Absent Member..

Re: Cannot log in after database server name change

I might be silly, but this has helped me a lot some times when I encounter db related issues with QC.

Try to restart both QC & DB and try to login again.

But, in your case I am guessing some thing to do with sabin qcbin configuration.

If you log a case, support team can provide you the details.!
0 Likes
Highlighted
Absent Member.
Absent Member.

Re: Cannot log in after database server name change

please let me this particular issue was resolved or not?

0 Likes
The opinions expressed above are the personal opinions of the authors, not of Micro Focus. By using this site, you accept the Terms of Use and Rules of Participation. Certain versions of content ("Material") accessible here may contain branding from Hewlett-Packard Company (now HP Inc.) and Hewlett Packard Enterprise Company. As of September 1, 2017, the Material is now offered by Micro Focus, a separately owned and operated company. Any reference to the HP and Hewlett Packard Enterprise/HPE marks is historical in nature, and the HP and Hewlett Packard Enterprise/HPE marks are the property of their respective owners.