Loading

×Sorry to interrupt
Uncaught ReferenceError: addCTracking is not defined
throws at https://kb.vmware.com/resource/KM_TealiumTrackingJS?v=0.5:100:1

Refresh

Cookie Preference Center

General Information on cookies

When you visit our website, we use cookies to ensure that we give you the best experience. This information does not usually directly identify you, but it can give you a more personalized web experience. Because we respect your right to privacy, you can choose not to allow some types of cookies by clicking on the different category headings to find out more and change your settings. However, blocking some types of cookies may impact your experience on the site and the services we are able to offer. Further information can be found in our

Cookie Policy.

Strictly Necessary

Strictly Necessary

Always Active

Strictly Necessary

Strictly necessary cookies are always enabled since they are essential for our website to function. They enable core functionality such as security, network management, and website accessibility. You can set your browser to block or alert you about these cookies, but this may affect how the website functions. For more information please visit www.aboutcookies.org or www.allaboutcookies.org.

Cookie Details‎

Performance

Performance

Performance

Performance cookies are used to analyze the user experience to improve our website by collecting and reporting information on how you use it. They allow us to know which pages are the most and least popular, see how visitors move around the site, optimize our website and make it easier to navigate.

Cookie Details‎

Please confirm your settings by refreshing the page.

Functional

Functional

Functional

Functional cookies help us keep track of your past browsing choices so we can improve usability and customize your experience. These cookies enable the website to remember your preferred settings, language preferences, location and other customizable elements such as font or text size. If you do not allow these cookies, then some or all of these services may not function properly.

Cookie Details‎

Advertising

Advertising

Advertising

Advertising cookies are used to send you relevant advertising and promotional information. They may be set through our site by third parties to build a profile of your interests and show you relevant advertisements on other sites. These cookies do not directly store personal information, but their function is based on uniquely identifying your browser and internet device.

Cookie Details‎

Advertising Cookies

Consent Leg.Interest

Select All Vendors

Select All Vendors

Select All Hosts

Select All

Clear Filters

Information storage and access

Apply

Confirm My Choices Reject All Allow All

My Subscriptions

Loading

Knowledge Base

Smarts NCM or Voyence Control: How do I add a read-only user to the PostgreSQL (Postgres) Control Database? (329782)

Last Updated: 5/29/2020Categories: TroubleshootingTotal Views: 7512Language:
English

Subscribe to get an email
newsletter with new updates

Please provide article feedback:

Symptoms

To create a user account in the Smarts NCM PostgreSQL Control Database with read-only privileges.

Some organizations that use Smarts NCM may require data contained in the Smarts NCM PostgreSQL Control Database that is not exposed through the Smarts NCM console or Report Advisor. The default accounts created in the database for the Smarts NCM application all have full administrative privileges. Using these accounts exposes the database to additional risk.

Resolution

If a similar information set needs to be regularly obtained from the Smarts NCM PostgreSQL Control Database, a user account with read-only privileges on the tables containing the target data should be created for that purpose. The following sections provide instructions to:

Create a read-only user account

Adjust the account privileges to provide read-only access to database objects

Remove the account after it is no longer needed

Creating a read-only user account
To create a read-only user account with appropriate privileges, the following tasks must be completed:

The user account must be created.

The  default_transaction_read_only  flag on the new user account must be set.

The account must be granted connect privileges to the database.

The account must be granted usage privileges on the schema containing the tables to which the user will be given read-only access.

The account must be granted specific  select  privileges on each table the user will be allowed read-only access to.

All queries run by the read-only access user must refer to the table and its schema in <schema name>.<table name> format.

Example:
If there were a need to list all virtual device names along with which workspace they belong to, you would run the following query (note that the table names are expressed in <schema name>.<table name> format as would be required for the query to run successfully if logged in as a read-only user):

SELECT
device_name,
workspace_name
FROM
voyence.cm_device
JOIN
voyence.cm_design_workspace
ON
cm_device.design_workspace_id = cm_design_workspace.design_workspace_id;

This query references both the  cm_device  and  cm_design_workspace  tables in the  voyence  schema inside the  voyencdedb  database.

Adjusting the account privileges to read the database
To create a read-only user account with sufficient privileges to run the above query, the following commands would need to be run while logged into the database as the  voyence  user.

CREATE ROLE read_only_user WITH LOGIN PASSWORD 'changeme';
ALTER USER read_only_user SET default_transaction_read_only = on;
GRANT CONNECT ON DATABASE voyencedb TO read_only_user;
GRANT USAGE ON SCHEMA voyence TO read_only_user;
GRANT SELECT ON cm_device TO read_only_user;
GRANT SELECT ON cm_design_workspace TO read_only_user;

Removing the read-only user account
Once a user account is no longer needed, it should be removed from the database. To accomplish this, the account permissions must first be removed from the account in order of dependency (typically table, then schema, then database). For example, to remove the user account added in the previous example, the following commands would be run while logged into the 'voyencedb' database as user 'voyence':

REVOKE SELECT ON cm_device FROM read_only_user;
REVOKE USAGE ON SCHEMA voyence FROM read_only_user;
REVOKE CONNECT ON DATABASE voyencedb FROM read_only_user;
DROP USER read_only_user;

Related Information

For information on logging into the NCM PostgreSQL Control Database, see EMC knowledgebase article 17344" target="_blank"> Link Error: .

Detectable by VMware SkylineTM

Actions

Copy

link to clipboard
copied!

Print

Language:
English

Attachments

Additional Resources

KB
•
End Of General Availability of the Free vSphere Hypervisor (ESXi 7.x and 8.x) (2107518)

Result 1 of 1

Ask The Community

Get answers quickly from VMware experts in the community

Post Subject

CONTINUE IN COMMUNITIES

Related Products:

Related Versions:

VMware Smart Assurance - NCM

Take Our Survey

Support Assistant