As far as this goes:
service0=# select * from apm_package_db_types
service0-#
You need to terminate the SQL command with a ";" in PSQL.
That's why it did nothing.
So could you execute that command, and also...
select count(*) from acs_objects;
and
select count(*) from sec_session_properties;