Connecting to APM Database with Read-Only User

Connecting to APM Database with Read-Only User

To connect to the database, you will need the following information:

Port number: The port in which the Applications Manager database runs. (You can get this from am.db.port value in <Applications Manager Home>\conf\AMServer.properties file). The default value is 15432.
Username: The username of the user that wants to connect to the DB. Since we are going to connect a read-only user, the username will be rouser.
Password: The password for this specific username. For read-only user, you can use apmrouser.

For Windows:
AppManagerHome\working\pgsql\bin> set PGPASSWORD=apmrouser
AppManagerHome\working\pgsql\bin>psql -p 15432 -U rouser -h localhost  -d amdb



amdb=> indiactes that you are connected to the database and now any read-related queries can be executed.

Example:

However, if you try to write/update, permission will be denied.

Example:



For Linux:
AppManagerHome/working/pgsql/bin$ export PGPASSWORD=apmrouser
AppManagerHome/working/pgsql/bin$ ./psql -p 15432 -U rouser -h localhost  -d amdb

          • Related Articles

          • Real User Monitoring Agent - Frequently asked questions

            How to change Applications Manager details in RUM Agent? Open the AppServer.properties file located under <RUMAgent_Home>/conf/ directory in any text editor. Update Applications Manager hostname in apm.host key. Update Applications Manager SSL Port ...
          • Real User Monitor (RUM) - Troubleshooting

            If the monitor has not polled data for long time. Follow below steps for troubleshooting Check prerequisites to done : Real User Monitor requires RUM Agent to be installed and mapped to Applications Manager. Refer the help page to know how to setup ...
          • Connecting to Applications Manager's bundled database

            How can I connect to Applications Manager's back-end database? Note: Take a backup of the AppManager directory before modifying anything in the database. Check am.dbserver.type value in <Applications Manager Home>\conf\AMServer.properties file to ...
          • How to get ISP data in Real User Monitor?

            By default, Real User Monitor does not show ISP data of end user. To get ISP data, you can make use of any third-party Geolocation API. Currently, RUM supports only APIs that return the response in JSON format. When you have purchased any Geolocation ...
          • How to enable HTTPS connection between end user and RUM Agent?

            By default end user data will be collected and sent via HTTP connection to RUM Agent. To enable HTTPS connection you should have an valid SSL Certificate (not an self signed certificate). When you have valid SSL Certificate follow below steps to ...