Computer Science, asked by Agamya8345, 1 year ago

How To Run Gpcheckcat?

Answers

Answered by danielshivasai
1

CAUSE

PROCEDURE

Run gpcheckcat in restricted mode

1. Stop the database:

gpstop -M fast

2. Start in restricted mode:

gpstart -aR

Note: This will prevent normal users from accessing the system. If there are scripts or tools which connect to the database using superuser accounts, then they should also be disabled until gpcheckcat is completed.

3. If GPDB version is < 4.3.8.1 then Remove orphaned temp schemas.

4. Run gpcheckcat. For versions < 4.3.8.1, use the following step:

cd /home/gpadmin

export PGDATABASE="DATABASE_NAME"

nohup $GPHOME/bin/lib/gpcheckcat -v > /home/gpadmin/gpcheckcat_$(date +%Y%m%d)_summary.log 2>&1 &

For versions >= 4.3.8.1, use the following step :

cd /home/gpadmin

export PGDATABASE="DATABASE_NAME"

nohup gpcheckcat -v > /home/gpadmin/gpcheckcat_$(date +%Y%m%d)_summary.log 2>&1 &

To run for all databases use -A . Refer gpcheckcat --help for the list of all available options.

5. Review the summary log to see if a repair script was generated:

repair scripts generated in directory gpcheckcat.repair.YYYY-MM-DD.hh.mm.ss

If one was generated, enter the directory, and execute the repair script:

cd gpcheckcat.repair.YYYY-MM-DD.hh.mm.ss

./runsql.sh

Once the repair script completes, re-run gpcheckcat again to capture any remaining issues.

6. Repeat steps 4 and 5 for all other databases.

7. Create an archive containing both logs:

cd /home/gpadmin

tar -zcvf gpcheckcat_$(date +%Y%m%d).tar.gz gpcheckcat_YYYMMDD_summary.log gpAdminLogs/gpcheckcat_YYYMMDD.log

8. Restart database in normal mode and release it to users.

9.Provide the log archive to Pivotal Support.

pls click brainlylist

Similar questions