ALM Oracle SQL Migration Error

Applies to:

ALM 12

Issue:

ALM 12/Oracle/SQL/Migration

After the install of ALM version 12 application on a new Windows 2008 Server we had the qcsiteadmin_db.users table migrated from ALMv11 ORACLE to SQLSERVER 2008 on our new ALM12 server. We had to have the owner of the tables be changed to ‘td’.

ISSUE: We are not able to create new Site Users within the application Site Administration - we get the error message Failed to create user;User already exists. Attaching Message Details for attempt to create new site user "abcdefg".

IF we attempt to create a duplicate EXISTING user "ajetest" we get the expected popup window "A user with the same name already exists".

To make this more confusing, we have been randomly been able to create new USER_NAME but the USER_ID assigned is not the next sequential USER_ID which would be 335. New Site Users created since ALM12 install. USER_NAME: orleans assigned USER_ID:266; USERNAME: ajetest3_user assigned USER_ID:279

Site Admin DETAILS from error (Logs Below). 

Steps:

What they need to do is, get a list of current users and their user id's (the numbers). Whatever the *highest* number is for an existing user, when a new user is added, one should be added to it. That is, if 678 were the highest user id, we want the next user to be 679. Then the next would be 680, etc. 

To set the id that will be used next when a new user is added, they need to update the appropriate row in the Site Admin database SEQUENCES table: If they select all rows from the Site Admin DB SEQUENCES table (there are not a lot), they can look at what's returned and find the row where the SQ_SEQ_NAME contains 'USER' (I think it's USER, could be USERS ... I don't have immediate access to a Site Admin DB). Their DBA should be able to easily see this.

Once updated then all new users will get sequential numbers starting after the highest existing number and this will avoid the problem.


Additional Info:

Logs:

Failed to create user. User 'abcdefg' already exists;

Stack Trace:

com.hp.alm.platform.exception.CCreateUserException: Failed to create user. User 'abcdefg' already exists

at com.hp.alm.platform.siteadmin.api.logics.CTdUserLogic.addUserToDatabase(CTdUserLogic.java:1158)

at com.hp.alm.platform.siteadmin.api.logics.CTdUserLogic.addUser(CTdUserLogic.java:1043)

at com.hp.alm.platform.siteadmin.api.logics.CTdUserLogic.createTDUsers(CTdUserLogic.java:983)

at com.hp.alm.platform.siteadmin.requests.CreateTDUsers.execute(CreateTDUsers.java:28)

at com.hp.alm.platform.web.RequestsDispatcher.execute(RequestsDispatcher.java:81)

at com.hp.alm.platform.server.web.CAbsServlet.executeFunction(CAbsServlet.java:604)

at com.hp.alm.platform.server.web.CAbsServlet.processRequest(CAbsServlet.java:594)

at com.hp.alm.platform.server.web.CAbsServlet.doPost(CAbsServlet.java:462)

at javax.servlet.http.HttpServlet.service(HttpServlet.java:727)

at javax.servlet.http.HttpServlet.service(HttpServlet.java:820)

at org.eclipse.jetty.servlet.ServletHolder.handle(ServletHolder.java:547)

at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1359)

at com.hp.alm.platform.util.gzipfilter.GZIPFilter.doFilter(GZIPFilter.java:31)

at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1330)

at com.mercury.optane.core.state.ServerStatusFilter.doFilter(ServerStatusFilter.java:35)

at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1330)

at com.hp.alm.platform.web.HTTPMethodsFilter.doFilter(HTTPMethodsFilter.java:52)

at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1330)

at org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:478)

at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:119)

at org.eclipse.jetty.security.SecurityHandler.handle(SecurityHandler.java:520)

at org.eclipse.jetty.server.session.SessionHandler.doHandle(SessionHandler.java:227)

at org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:941)

at org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:409)

at org.eclipse.jetty.server.session.SessionHandler.doScope(SessionHandler.java:186)

at org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:875)

at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:117)

at org.eclipse.jetty.server.handler.ContextHandlerCollection.handle(ContextHandlerCollection.java:250)

at org.eclipse.jetty.server.handler.HandlerCollection.handle(HandlerCollection.java:149)

at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:110)

at org.eclipse.jetty.rewrite.handler.RewriteHandler.handle(RewriteHandler.java:312)

at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:110)

at org.eclipse.jetty.server.Server.handle(Server.java:345)

at org.eclipse.jetty.server.HttpConnection.handleRequest(HttpConnection.java:441)

at org.eclipse.jetty.server.HttpConnection$RequestHandler.content(HttpConnection.java:936)

at org.eclipse.jetty.http.HttpParser.parseNext(HttpParser.java:801)

at org.eclipse.jetty.http.HttpParser.parseAvailable(HttpParser.java:224)

at org.eclipse.jetty.server.AsyncHttpConnection.handle(AsyncHttpConnection.java:51)

at org.eclipse.jetty.io.nio.SelectChannelEndPoint.handle(SelectChannelEndPoint.java:586)

at org.eclipse.jetty.io.nio.SelectChannelEndPoint$1.run(SelectChannelEndPoint.java:44)

at org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:598)

at org.eclipse.jetty.util.thread.QueuedThreadPool$3.run(QueuedThreadPool.java:533)

at java.lang.Thread.run(Thread.java:722)

Have more questions? Submit a request

0 Comments

Article is closed for comments.