Importing Spotfire Database on the New Server
- Create Database and Role:
- Launch PostgreSQL (
psql) as thepostgresuser. - Execute the following commands:
CREATE ROLE spotfire LOGIN CREATEDB PASSWORD 'yourPassword';CREATE DATABASE spotfire_server OWNER spotfire;
- Launch PostgreSQL (
- Import Data:
- Use the command below to import data into the
spotfire_serverdatabase:psql -U spotfire -d spotfire_server -f spotfire14.pgsql > import_spotfire_server.log 2>&1
- Use the command below to import data into the
Importing Spotfire ActionLog Database
- Create ActionLog Database and Role:
- Again, use PostgreSQL (
psql) as thepostgresuser. - Execute these commands:
CREATE ROLE spotfire_actionlog LOGIN CREATEDB PASSWORD 'yourPassword';CREATE DATABASE spotfire_server_actionlog OWNER spotfire_actionlog;
- Again, use PostgreSQL (
- Import ActionLog Data:
- To import data into
spotfire_server_actionlog, use:psql -U spotfire_actionlog -d spotfire_server_actionlog -f spotfire_actionlog.pgsql > import_spotfire_server_actionlog.log 2>&1
- To import data into
Handling Errors
In case of any operation errors, follow these steps to delete the spotfire_server_actionlog database and the spotfire_server user:
- Delete Database and User:
DROP DATABASE spotfire_server_actionlog;- Then, check for sequences and views linked to the
spotfire_server_actionlogdatabase:- Sequences:
SELECT sequence_name FROM information_schema.sequences WHERE sequence_catalog = 'spotfire_server_actionlog' AND sequence_schema = 'public'; - Views:
SELECT table_name FROM information_schema.views WHERE table_catalog = 'spotfire_server_actionlog' AND table_schema = 'public';
- Sequences:
- Revoke all privileges and drop the role:
REVOKE ALL PRIVILEGES ON SCHEMA public FROM spotfire_actionlog;DROP ROLE spotfire_actionlog;