Got it

Query Gauss DB's audit log

Latest reply: Dec 29, 2018 06:27:08 591 1 11 0 0

1.1 Query Gauss DB's audit log


1. Log on to Gauss DB with reference to Section 4.1.


2. Execute the following command to query the audit log


Select * from pg_query_audit ('2014-02-18','2014-02-19');


1.2 Query the number of connections to the Gauss database


1. Query the current number of connections


Execute under OMM user:


Source/opt/huawei/Bigdata/dbservice/.dbservice_profile; gsql-d postgres-U omm-W ommHuawei@123-d postgres-p 20051-t-c "SELECT count (*) FROM (SELECT pg_stat_get_end_idset() AS endid);"




2. Query the total number of global connections to the database


Execute under OMM user:


Source/opt/huawei/Bigdata/dbservice/.dbservice_profile;


Gsql-d postgres-U omm-W OMM Huawei@123-d postgres-p 20051-t-c "SHOW max_connections;"




1.3 Modify the upper limit of DBService connections


1. Log on to the main DBServer node and switch to OMM user: su-omm;


2. Open the configuration file/srv/BigData/dbdata_service/data/postgresql.conf


3. Modify the max_connections parameter in the configuration file (upper limit of connection number);


4. After the modification is completed, the gaussdb operation is restarted. Refer to the command:


Source/opt/huawei/Bigdata/dbservice/.dbservice_profile;


Gs_ctl-D $GAUSSDATA restart;


5. Log on to the standby DBServer and Perform 1-3 steps to synchronously modify the contents of the standby DBServer.

Log on to the standby DBServer and Perform 1-3 steps to synchronously modify the contents of the standby DBServer.
View more
  • x
  • convention:

Comment

You need to log in to comment to the post Login | Register
Comment

Notice: To protect the legitimate rights and interests of you, the community, and third parties, do not release content that may bring legal risks to all parties, including but are not limited to the following:
  • Politically sensitive content
  • Content concerning pornography, gambling, and drug abuse
  • Content that may disclose or infringe upon others ' commercial secrets, intellectual properties, including trade marks, copyrights, and patents, and personal privacy
Do not share your account and password with others. All operations performed using your account will be regarded as your own actions and all consequences arising therefrom will be borne by you. For details, see " User Agreement."

My Followers

Login and enjoy all the member benefits

Login

Block
Are you sure to block this user?
Users on your blacklist cannot comment on your post,cannot mention you, cannot send you private messages.
Reminder
Please bind your phone number to obtain invitation bonus.