What are some SQL queries I can use to find user, resource, and person details?

There are a few SQL queries you can use to find user, resource, and person details.

You can use this query to check whether a user is suspended or not: select * from per_users where username='<provide the username of the user'>.

Or, use this one: SELECT person_id, start_date, end_date, hr_terminated, suspended from per_users where username='&username';.

To check whether that user has been created as a PERSON party, you can use the this SQL statement:

SELECT party.* FROM HZ_PARTIES party, PER_USERS pusr WHERE PARTY.USER_GUID = PUSR.USER_GUID AND pusr.USERNAME='<provide the username of the user'>.

Or:

select * from hz_parties where party_id in (select party_id from HZ_ORIG_SYS_REFERENCES where orig_system_reference='&PersonID_YouGotFromStep1');

To check whether a user is linked to a party record, use this query:

SELECT party.* FROM HZ_PARTIES party, PER_USERS pusr WHERE PARTY.USER_GUID = PUSR.USER_GUID AND pusr.USERNAME='<provide the username of the user'>.

To check whether a user has been defined as a Resource, use this SQL statement:select * from JTF_RS_RESOURCE_PROFILES where PARTY_ID = (select party.party_id FROM HZ_PARTIES party, PER_USERS pusr WHERE PARTY.USER_GUID = PUSR.USER_GUID AND pusr.USERNAME='&username');.