To access the database, what you need to do is use the tools designed for the Database (Postgres) for Windows server, this is a program called Pgadmin3.exe. You can find it on the Windows server located:
C:\Program Files (x86)\Skybot\Skybot Scheduler\pgsql\bin\pgadmin3.exe
By default, security is setup that the database can only be accessed from the localhost.
Once pgadmin3.exe has been launched, fill out the form - see fields below (or see attached screen shot):
Name - localhost
Host - localhost
Port - 7432
Maintenance DB - postgres
Username - Skybot
Password - schent2
Store password - check the box
The password is ‘schent2’ without the quotes. This will sign you on and you will be able to see the underlying database.
We do not recommend working directly in the database as it circumvents all security and auditing in the product. Also make sure you have backups of the database in case of the need to restore.
Step 1) Open the PSQL Shell
Open a command window or shell
Navigate to the install directory:
Linux default: /opt/skybot/server
Navigate to the “…\pgsql\bin” sub-directory
Linux default: /pgsql/bin
Run the “psql” executable:
psql --host=localhost --port=7432 --username=Skybot --dbname=schent2
Enter password (“schent2”) if prompted…
You should be at a prompt similar to:
Step 2) Create/Authorize a database user profile
Run command to create a user
a. CREATE USER user_name WITH PASSWORD 'myPassword';
This command will add authority to individual files:
a. GRANT SELECT ON TABLE [table or tables] to user_name;
Single Table Example:
a. GRANT SELECT ON TABLE jobs to user_name;
Multiple Table Example:
a. GRANT SELECT ON TABLE command_sets, agent_environments to user_name;
To exit PSQL shell enter “\q” (backslash q).
Step 3) Optional: Configure Remote Access if needed.
Stop Skybot server and Database
Edit text file: “<install_path>\pgsql\data\ pg_hba.conf”
a. Under the “# IPv4 local connections:” section…
b. Add this line: “host schent2 user_name from_IP_name_or_address md5”