Primavera User is already logged … Errors
When using an Primavera sometimes user can take error like below;
Error: “User is already logged in, please try another username”
What is the reason of this error and how can we fix it;
Problem: How to end a user session
Problem: Error: “User is already logged in, please try another username” when logging into Primavera
Problem: Error: “This user is already logged in. Please use another login name.”
Problem:When logging into Project Management, Loading Data gets to 100% and application disappears.
Problem:Error: “License not available for the Integration API”.
Problem:User still showing in USESSION, PROJSHAR, and UPKLIST tables, although they are not logged in.
Problem:Error: “An Admin Superuser is in the application to correct licensing related issue. Please login after the problem is corrected”
Problem:Error: “User is already logged in, please try another login name”
Fix: Check for user records in the upklist, projshar and usession tables. Delete the records in the upklist table first, then projshar , then usession table. Once records are deleted launch Primavera.
1- login to sql server which installed Primavera db;
2- Open PMDB database;
3- open new query choosing PDMS
4- Clear Integration API
select session_id, user_id from usession where user_id IN (SELECT user_id FROM USERS) and app_name = 'Integration API'
5-clear delete_session_id IS NULL
select session_id, user_id from usession where user_id IN (SELECT user_id FROM USERS) AND delete_session_id IS NULL
6- This query clear UPKLIST,PROJSHAR,USESSION tables Integration API records
DELETE UPKLIST WHERE session_id IN (select session_id from usession where user_id IN (SELECT user_id FROM USERS) and app_name = 'Integration API') DELETE PROJSHAR WHERE session_id IN (select session_id from usession where user_id IN (SELECT user_id FROM USERS) and app_name = 'Integration API') DELETE USESSION WHERE session_id IN (select session_id from usession where user_id IN (SELECT user_id FROM USERS) and app_name = 'Integration API')
7-This query clear UPKLIST,PROJSHAR,USESSION tables delete_session_id IS NUL
DELETE UPKLIST WHERE session_id IN (select session_id from usession where user_id IN (SELECT user_id FROM USERS) AND delete_session_id IS NULL) DELETE PROJSHAR WHERE session_id IN (select session_id from usession where user_id IN (SELECT user_id FROM USERS) AND delete_session_id IS NULL) DELETE USESSION WHERE session_id IN (select session_id from usession where user_id IN (SELECT user_id FROM USERS) AND delete_session_id IS NULL)
8- After you can restart DB and all user can connect;
For all step no need to do step by step if you want to automatically you can use below STORE PROCEDURE
1- new query and copy store procedure
USE [PMDB] GO SET ANSI_NULLS ON GO SET QUOTED_IDENTIFIER ON GO ALTER PROCEDURE [dbo].[SP_SESSION_TEMIZLE] AS BEGIN DELETE UPKLIST WHERE session_id IN (select session_id from usession where user_id IN (SELECT user_id FROM USERS) and app_name = 'Integration API') DELETE PROJSHAR WHERE session_id IN (select session_id from usession where user_id IN (SELECT user_id FROM USERS) and app_name = 'Integration API') DELETE UPKLIST WHERE session_id IN (select session_id from usession where user_id IN (SELECT user_id FROM USERS) AND delete_session_id IS NULL) DELETE PROJSHAR WHERE session_id IN (select session_id from usession where user_id IN (SELECT user_id FROM USERS) AND delete_session_id IS NULL) DELETE USESSION WHERE session_id IN (select session_id from usession where user_id IN (SELECT user_id FROM USERS) AND delete_session_id IS NULL) DELETE USESSION WHERE session_id IN (select session_id from usession where user_id IN (SELECT user_id FROM USERS) and app_name = 'Integration API') END
2- then this procedure come programmability-stored procedures-db0.sp_session_temizle
Not:Special thanks Cagri Celikbilek to helps