| Предупреждение |
|---|
| Do not power DB server off with power button: in certain cases this may cause the DB corruption. |
When doing a routine database maintenance, you must follow the established order: - Close all instances of the Management Console. Make sure that all connections of other programs to DB Traffic Monitor schema are closed; if there’re any active connections, disable them.
- Stop all TM processes on Traffic Monitor server:
service iwtm stop
service iwtm-php-fpm stop
service nginx stop - Retrieve list of scheduled jobs from database server. For this purpose run the following query in sqlplus using schema owner account:
select job_name, case when job_agent_id is null, then 'scheduled' else 'running end state
from pgagent.pga_job
where jobenabled= true - Disable jobs by running the following script:
select iwtm.pkg_utility_disable_job('JOB_1); ...
select iwtm.pkg.utility_disable_job('JOB_N');
commit; where JOB_1… JOB_N are the names of tasks to disable. - To make sure that none of these jobs is running run the following query:
select job_name
from pgagent.pga_job
where job_agent_id is not null current task cannot be stopped in PostgreSQL, this should be done by stopping agent from Linux using thу following command:
service stop pgagent-9.6 (suspending all the tasks with one command) - Make all the necessary operations with the database.
- After all required operations are made check connection to database server from Traffic Monitor server:
psql -p 5433 -h server_name postgres postgres where server_name - database name or ip address If the test is successful, the following psql invitation is to occur:
postgre=# - Run the Traffic Monitor server processes:
service iwtm start
service iwtm-php-fpm start
service nginx start - Check if the system log contains errors. The path to the system log:
/var/log/messages - If the system log contains any error messages, consult technical support service.
- Enable running previously disabled jobs:
BEGIN
select iwtm.pkg_utility_enable_job('JOB_1');
…
select iwtm.pkg_utility_enable_job('JOB_N'); commit;
end;
/ where JOB_1… JOB_N are the names of previously stopped jobs.
|