Set up the Geoportal Database
Pages 202
- Home
- 2009 Esri Federal UC
- 2009 Esri International UC
- 2010 Esri Federal UC
- 2010 Esri International UC
- 2011 Esri Federal UC
- 2012 Esri Federal UC
- 2013 Esri Federal GIS Conference
- 2013 Esri International User Conference
- 2015 SDI Special Interest Group
- Add a Custom Profile
- Add an OpenSearch endpoint for Federated Search
- Add Another Tab to the Geoportal Interface
- Add Custom Link to a Search Result
- Add Custom Search Criteria
- Add the Geoportal Search to a List of Search Providers
- Add v1.1.1 FGDC editor to a previous Geoportal release
- AGP TO AGP Harvesting with the Geoportal
- AGS TO AGP Harvesting with the Geoportal
- All gpt.xml file settings
- An Introduction to vi
- Apache Tomcat geoportal logging
- Being a Good Robot
- Best Practice for Edits to JSP files
- Biological or Remote Sensing FGDC xsds
- Browse Tree
- Cart Processor
- Catalog Service
- Clear the Tomcat Work Folder
- Collections
- Common problems and solutions
- Communities and live examples
- Components
- Configure a Directory Server for the Geoportal
- Configure geoportal User and Schema in the PostgreSQL Database
- Configure Previewable Filetypes
- Configure Searching of YouTube
- Configure the gpt.xml File
- Configure Widgets
- Connecting to a User Directory
- Create a user account
- Create Relationships between Resources
- Customizations
- Customize DCAT output
- Customize Metadata Validation
- Database problems
- Database Tables
- DataDownload Tab
- Deploy and Configure the Geoportal Web Application in Tomcat
- Deploy and Configure the Servlet Web Application
- Deploy the Geoportal Web Application
- Details of Lucene Indexing in the Geoportal
- Development topics
- Discovering Resources
- Eclipse Project from Compiled WAR
- Eclipse Project from Source Code
- Enable Search Using an Ontology Service
- Error Messages in the Geoportal Web Application
- Esri Geoportal Server LiveDVD
- Extending the Web Harvester
- Federated Search in Portal for ArcGIS
- Feedback
- FGDC Biological Profile and Remote Sensing Extension
- FGDC Service Checker Integration
- Geoportal Clients for ArcGIS
- Geoportal CSW Clients
- Geoportal Facets using Apache Solr
- Geoportal genie
- Geoportal Project from Compiled WAR
- Geoportal Publish Client
- Geoportal Server 1.2.5 What's New
- Geoportal Server 1.2.6 What's New
- Geoportal Server 1.2.7 What's New
- Geoportal server as a broker
- Geoportal Server Downloads
- Geoportal Server v 1.0 What's New
- Geoportal Server v 1.1 What's New
- Geoportal Server v 1.1.1 What's New
- Geoportal Server v 1.2 What's New
- Geoportal Server v 1.2.2 What's New
- Geoportal Server v 1.2.4 What's New
- Geoportal SPARQL Sample
- Geoportal User Interface Components
- Geoportal Web Application File Organization
- Geoportal XML Editor
- Get Assistance with an Implementation
- GXE Concepts
- GXE Crash Course
- GXE Structure
- GXE Workflow
- High Availability and Large Number of Records
- How to Browse for Resources
- How to Create and Manage My Profile
- How to find all documents of a particular metadata standard
- How to Leave a Resource Review
- How to Login and Manage my Password
- How to Manage and Edit Resources
- How to Publish Resources
- How to Restrict Access to Resources
- How to Search for Resources
- How to Search with an Ontology Service
- How to Set Up an Esri Geoportal Server on Linux
- How to Use Search Page Results
- How to Use the Data Download Feature
- How to View Resource Relationships
- IDE Topics
- Identity Components LDAP and Single Sign On
- Index All Metadata Content
- Indexing and Searching the Time Period of the Content
- Install Apache Tomcat 6
- Install Desktop Tools
- Install Esri Geoportal Server
- Install PostgreSQL 9.1.2
- Install the JDBC .jar Files
- Installation
- Installation Version 1.0
- Installation Version 1.1
- Installation Version 1.2
- Installation Version 1.2.2
- Installation Version 1.2.4
- Installation Version 1.2.5
- Installation Version 1.2.6
- Installation Version 1.2.7
- Installation Version 1.2.8
- Integrate with a Content Management System
- Integrate with the con terra Security Solution
- Localization
- Log In to the Geoportal
- Logging
- Look and Feel of the User Interface
- Main Page
- Map LDAP Attributes on the Registration Page
- Map Viewer
- Online form editing for all publication methods
- Open source acknowledgements
- Oracle WebLogic geoportal logging
- Orientation to the Create Metadata Page
- Perform Preinstallation Computer Setup
- Portal for ArcGIS Integration
- Post Deployment Actions
- Preinstallation
- Preinstallation 0.9
- Preinstallation 1.0 and 1.1.x
- Preinstallation 1.2
- Preinstallation 1.2.2
- Preinstallation 1.2.4
- Preinstallation 1.2.5
- Preinstallation 1.2.6
- Preinstallation 1.2.7
- Preinstallation 1.2.8
- Preview Function
- Publication Components
- Ratings and Comments for Search Results
- Register ArcGIS for Server with the Geoportal
- Release notes
- REST API Syntax
- Sample FGDC metadata.xml
- Scheduled tasks
- Search Components
- Search Map
- Search Widget for Flex
- Search Widget for HTML
- Search Widget for Silverlight
- Security Concepts
- Set Up Systemwide Environment Variables
- Set up the Geoportal Database
- Share Link
- Single Sign On
- Smoketest the Geoportal
- Standards Support
- Supported CSW Profiles for Synchronization
- Theme Library
- Troubleshooting
- Troubleshooting Tips
- Two geoportals on the same server
- Upgrade 1.x to 1.2 database
- Upgrading file system approach
- Upgrading Read This Overview
- Upgrading SVN approach
- Url filter customization
- Use an XSLT to Render the Details Page
- Use Ant to build Geoportal
- User Functions and Roles
- User Management Interface
- Using a geoportal
- Using Lucene Search Text Queries
- Version 0.9
- Version 1.0
- Version 1.1
- Version 1.1.1
- Version 1.2
- Version 1.2.2
- Version 1.2.4
- Version 1.2.5
- Version 1.2.6
- Version 1.2.7
- Version 1.2.8
- What is a geoportal and the geoportal server
- What is the esri geoportal server
- What's New
- wiki template
- WMC Client
- Show 187 more pages…
Clone this wiki locally
Geoportal Server requires a database to store information and content (e.g. metadata, resources), currently it supports Oracle, SQL Server, PostgreSQL and MySQL, this page contains instruction on how to setup Geoportal database tables in one of the supported databases.
Notes
- If you already have a Geoportal Server 1.2.5 database, it will continue to work with Geoportal Server 1.2.6.
Assumptions
The following sections assume that:
- You already have a working database instance, if not please refer to specific database sites to install and configure the database.
- You have downloaded and unzipped the Geoportal Server Installation zip files. Files within those zip files are required for the next steps.
- The geoportal database scripts will create a schema in the default database in your system. If you would like the geoportal tables to exist in its own database, you will want to create a new database upon which you will run the geoportal database scripts. This is recommended for requirements on backing up or restoring your geoportal database.
- You are creating a new geoportal schema by running database scripts. If you run the database scripts on top of an existing geoportal installation, you will overwrite your existing geoportal database.
- For Linux users, use the Geoportal Server Linux Installation Guide, available from the How-to-Set-Up-an-Esri-Geoportal-Server-on-Linux page.
Set Up Geoportal Database in Oracle
In this section you will set up the tablespace and schema that will be used for the geoportal. The geoportal should run in its own tablespace and schema. Creating the geoportal database schema involves running two scripts:
- A “grants” script that sets the user permissions for creating the geoportal schema.
- A “create schema” script that creates the table structure, procedures and triggers and populates tables in the geoportal schema.
- Open the command console (Start>Run>cmd) and run the following commands:
CMD> sqlplus /nolog
SQL> connect sys/sys as sysdba;
SQL> create tablespace geoportal datafile 'C:\oracle\oradata\geoportal.dbf' size 500M AUTOEXTEND ON;
SQL> create user geoportal identified by geoportalpwd default tablespace geoportal temporary tablespace temp;
SQL> commit;
SQL> quit
2. Set up privileges for geoportal user
- 2.1. Open a command prompt window. Start>Run>cmd
- 2.2. Change directories to point to \Database Scripts\Oracle.
- 2.3. Run the grants_oracle.cmd file from the command prompt window as described below:
- Usage:
grants_oracle [sys username] [sys password] [geoportal username]
- Where:
- [sys] is the username of the sys user in Oracle
- [sys] is the password of the sys user in Oracle
- [geoportal] is the geoportal user you are creating
- Where:
- Sample Input:
grants_oracle sys sys geoportal - When the script finishes executing you will be returned back to the command prompt and a text file (grants.txt) will open. Check the grants.txt file for error messages.
- Important: You must fix errors appearing in the grants.txt file; do not continue until the script runs without errors.
- Usage:
3. Create geoportal schema
- 3.1. Open a command window. Start>Run>cmd
- 3.2. Change the directory to the {Geoportal Dir}\Database Scripts\Oracle folder
- 3.3. Run the create_schema_oracle.cmd file from the command prompt window as described below:
- Usage:
create_schema_oracle [geoportal username] [geoportal password]
- Where:
- [geoportal] is the geoportal user you created earlier.
- [geoportal] is the password of the geoportal user.
- Where:
- Sample Input: create_schema_oracle geoportal geoportalpwd
- Usage:
When the script finishes executing you will be returned back to the command prompt and a text file (GPT_Schema.txt) will open. Check the GPT_Schema.txt file for error messages. Error messages and warnings that state a table or view does not exist can be ignored. It simply means that the script was trying to delete a nonexistent table. Verify the following tables are created:
- gpt_collection
- gpt_collection_member
- gpt_harvesting_history
- gpt_harvesting_jobs_completed
- gpt_harvesting_jobs_pending
- gpt_resource
- gpt_resource_data
- gpt_search
- gpt_user
Set Up Geoportal Database in SQL Server
In this section you will use a script to set up the SQL Server database that will be used for the geoportal web application.
IMPORTANT PREREQUISITES:
- 1) If you have the “Enforce Password Policy” option enabled by default for all new users, then you will need to choose a user password in keeping with your organization’s password policy. This is usually a complex password. If you do not select a password in keeping with the password policy, the script may fail.
- 2) Verify that your server allows both Windows authentication and SQL Server authentication. If your server only allows Windows authentication, then the user that the script creates will not be able to logon to create the tables. The error in the build_schema.log file will read 'Login failed for user'. To check and possibly change the security authentication mode (as per Microsoft, article http://msdn.microsoft.com/en-us/library/ms188670.aspx), do the following:
- Login to SQL Server Management Studio.
- In SQL Server Management Studio Object Explorer, right-click the server, and then click Properties.
- On the Security page, under Server authentication, select the "SQL Server and Windows Authentication Mode" radial if it is not already selected, and then click OK.
- In the SQL Server Management Studio dialog box, click OK to acknowledge the requirement to restart SQL Server.
1. Create database schema
- 1.1. Open a command window. Start>Run>cmd
- 1.2. Change the directory to the {Geoportal Dir}\Database Scripts\SQL Server folder
- 1.3. Run the create_schema_mssql script –or the create_schema_mssql_unicode script as described below - by typing the following:
-
create_schema_mssql "[database server machine,port]" [Geoportal database name] [Geoportal database user] [Geoportal database user password]
- Where:
- [database] is the name of the machine on which SQL Server is installed, or the named SQL Server Instance (e.g. <machinename></machinename>\instance) if applicable, optionally you can include the port # if the SQL server instance is configured to use a fixed port (http://msdn.microsoft.com/en-us/library/ms177440(v=sql.105).aspx)
- [Geoportal] is the name you designate for the Geoportal database
- [Geoportal] is the name of the login and user that will have access to the Geoportal database. This script creates a user if one does not already exist
- [Geoportal] is the password for the login and user of the Geoportal database
- Where:
- Sample Input:
create_schema_mssql "mymachine" geoportal geoportal geoportalpwd
- Sample Input:
- Note: To support multi-lingual geoportals, the SQL Server database must be able to support Unicode characters. If your geoportal will be in a language other than English, you should run the create_schema_mssql_unicode script for this step. If not, then use the create_schema_mssql script as shown below. Input parameters are the same for the Unicode version of the script.
- gpt_collection
- gpt_collection_member
- gpt_harvesting_history
- gpt_harvesting_jobs_completed
- gpt_harvesting_jobs_pending
- gpt_resource
- gpt_resource_data
- gpt_search
- gpt_user
Set Up Geoportal Database in PostgreSQL
Setting up a PostgreSQL database for the geoportal consists of two steps – setting up database permissions, and creating the database schema. Each of these steps is accomplished by running a script, found in the {Geoportal Dir}\Database Scripts\PostgreSQL folder:
- A “grants” scripts that sets the user permissions for creating the geoportal schema
- A “create schema” script that creates the table structure, procedures, and triggers and populates tables in the geoportal schema.
1. Setup priviledges for Geoportal user
- 1.1. Open a command prompt window. Start>Run>cmd
- 1.2. Change directories to point to {Geoportal Dir}\Database Scripts\PostgreSQL.
- 1.3. Run the grants_pg.cmd file from the command prompt window as described below:
- Usage:
grants_pg [host] [port] [database] [geoportal schema] [userToConnect] [geoportalUser]
- Where
- [host] is the machine name hosting PostgreSQL
- [port] is the port number of PostgreSQL. Default = 5432
- [database] is the database name for the geoportal. Default = postgres
- [geoportal] is the name for the geoportal schema. Default=geoportal
- [userToConnect] is the name of the user to connect to the database as. Default=postgres
- [geoportalUser] is the name for the geoportal schema owner. Default=geoportal
- Sample Input: grants_proxy_pg localhost 5432 postgres geoportal postgres geoportal
- Usage:
- 1.4. When prompted with the message “Enter password for new role:”, input the password for the geoportal user.
- 1.5. When prompted with the message “Enter it again:” input the password for the geoportal user again.
- 1.6. When the script finishes executing you will be returned back to the command prompt and a text file (grants_pg.txt) will open. Check the grants_pg.txt file for error messages.
- Important: You must fix errors appearing in the grants_pg.txt file; do not continue until the script runs without errors.
2. Create Geoportal schema
- 2.1. Run the create_schema_pg.cmd file from the command prompt window as described below:
- Usage:
create_schema_pg [host] [port] [geoportal database] [geoportal user]
- Where:
- [host] is the machine name hosting PostgreSQL
- [port] is the port number of PostgreSQL. Default = 5432
- [geoportal] is the geoportal database name. Default = postgres
- [geoportal] is the name for the geoportal schema owner. Default = geoportal
- Sample Input:
create_schema_pg machineName 5432 postgres geoportal
- Usage:
- 2.2. When prompted with the message “Enter password for geoportal user:”, input the password for the geoportal user.
- 2.3. When the script finishes executing you will be returned back to the command prompt and a text file (Geoportal_Schema.txt) will open. Check the Geoportal_Schema.txt file for error messages. Error messages and warnings which state that Table or view does not exist can be ignored. It simply means that the script was trying to delete a nonexistent table.
- 2.4. Open the PostgreSQL Administrator tool, and verify that a new schema and following tables were as created.
- gpt_collection
- gpt_collection_member
- gpt_harvesting_history
- gpt_harvesting_jobs_completed
- gpt_harvesting_jobs_pending
- gpt_resource
- gpt_resource_data
- gpt_search
- gpt_user
Set Up Geoportal Database in MySQL
Setting up a MySQL database for the geoportal consists of two steps – setting up database permissions, and creating the database schema. Each of these steps is accomplished by running two scripts, found in the \Database Scripts\MySQL folder:
- A “grants” scripts that sets the user permissions for creating the geoportal schema
- A “create schema” script that creates the table structure, procedures, and triggers and populates tables in the geoportal schema.
1. Setup priviledges for Geoportal user
- 1.1. Open a command prompt window. Start>Run>cmd
- 1.2. Change directories to point to \Database Scripts\MySQL.
- 1.3. Run the grants_mysql.cmd file from the command prompt window, as described below.
-
- Usage:
grants_mysql [dbserver] [port] [Geoportal database] [sys username] [sys password] [geoportal username] [geoportal server] [geoportal password]
- Where:
- [dbserver] is the machine hosting MySQL
- [port] is the port number of MySQL
- [Geoportal] is the name of the database that will be created and contain the Geoportal schema
- [sys] is the username of the sys user in MySQL
- [sys] is the password of the sys user in MySQL
- [geoportal] is the geoportal user that will be created and will access the geoportal database
- [geoportal] is the name of the geoportal web application server machine
- [geoportal] is the geoportal user password
- Usage:
- Sample Input (here, the database and geoportal web app are on machine ‘localhost’):
grants_mysql localhost 3306 geoportal root sys geoportal localhost geoportalpwd
-
- 1.4. When the script finishes executing you will be returned back to the command prompt and a text file (grants_mysql.txt) will open.
- IMPORTANT: Check the grants_mysql.txt file and the command interface for errors. You must fix these errors and rerun the script before continuing to the next step. Note that if you rerun the script after the user was successfully created, you may receive “ERROR 1396 (HY000): Operation CREAT USER failed…” You can ignore this error - see MySQL documentation for explanation http://bugs.mysql.com/bug.php?id=28331 .
- 2.1. Run the create_schema_mysql.cmd file from the command prompt window as described below:
- Usage :
create_schema_mysql.cmd [host] [port] [Geoportal database] [geoportal user] [geoportal password]
- Where
- [host] is the machine hosting MySQL
- [port] is the port number of MySQL
- [Geoportal] is the database that contains the Geoportal Schema; use the same as in the grants script
- [geoportal] is the geoportal user created in the grants script
- [geoportal] is the geoportal user password
- Sample Input: create_schema_mysql localhost 3306 geoportal geoportal geoportalpwd
- Usage :
- 2.2. When the script finishes executing you will be returned back to the command prompt and a text file (Geoportal_Schema.txt) will open. Check the Geoportal_Schema.txt file for any possible error messages. Error messages and warnings that a table or view does not exist can be ignored as these are checks for existing tables.
- 2.3. After running the grants and create_schema scripts, verify that a new database and following tables were created.
- gpt_collection
- gpt_collection_member
- gpt_harvesting_history
- gpt_harvesting_jobs_completed
- gpt_harvesting_jobs_pending
- gpt_resource
- gpt_resource_data
- gpt_search
- gpt_user