Description
Perform the following steps to remove a large amount of camera events from the ESM Postgre database:
<br>
Removing Events:
- Shutdown all ESM services
- Start command prompt as admininistrator (do not use powershell)
Change directories to exacqVisionEsm\PostgreSQL\9.2\bin and run the following:
pg_dump -U postgres –schema-only ESM > ESM.sql#
psql -U postgres -d ESM
DROP TABLE camera_cameraevent CASCADE;
DROP TABLE report_eventid CASCADE;
DROP TABLE event_alertid CASCADE;
\q
psql -U postgres -d ESM -f ESM.sql
Note: There maybe many errors that some things already exist, which is okay - Start all services
<br>
Recover the Schema (assumes current schema not intact):
- Shutdown all services
- Open pgAdmin
- Go to localhost > Databases
- Right click on “Databases” and select “New Database”
- Enter the name ESM2
- Open command prompt as admin
- Change directory to C:\exacqVisionEsm\EnterpriseSystemManager
- Enter the following commands:
a. Installer.exe decrypt
b. notepad EnterpriseSystemManager.tmp
c. Change DefaultName to ESM2
d. installer.exe encrypt
e. installer.exe new_migrations - Change directories to exacqVisionEsm\PostgreSQL\9.2\bin and run the following:
a. pg_dump -U postgres –schema-only ESM2 > ESM.sql
b. psql -U postgres -d ESM
– 1. DROP TABLE camera_cameraevent CASCADE;
c.psql -U postgres -d ESM -f ESM.sql
Note: There may be many errors that something already exists which is okay - Change directory to C:\exacqVisionEsm\EnterpriseSystemManager
- Enter the following commands:
- installer.exe decrypt
- notepad EnterpriseSystemManager.tmp
- Change DefaultName to ESM
- installer.exe encrypt
- Start all services