BOX ship - Create New GEODESC Project (GEODPnnn) Schema
THIS PAGE IS SLATED FOR RETIREMENT. SEE ITS SIBLING PAGES.
A GEODESC project is implemented as an Oracle schema. To create a GEODESC project a user will perform the following tasks:
Create the schema account in Oracle.
Clone the tables, views, sequences, indexes, etc. from a "base" project (currently the base project is a pre-existing project. In the near future we will create a special-purpose project labeled as "base"). Important: when cloning the base project copy the DDL only, do not copy any data from the source schema)
df Recommendation - store this BASE project in a DMPDP file. Script SQL to load and rename as-needed from the OEMJR:/backup/export/ directory.Issue the proper grants to resources in the new project.
Add the newly created GEODESC project to the GEODCAT.PROJECTS table (this will cause it to show up in the "projects" dropdown for GEODESC applications.
Create new role and associated privilege for the new project.
Create Oracle Schema account
Using SQLDeveloper, sign into Oracle with your DBA account
Right click “Other users” icon, select “Create user…”
“User Name” must start with prefix “GEODP”; e.g. “GEODP123” for Expedition 123 project.
Create an appropriate password for the new account.
Use one of the other schema accounts as a guide to include the appropriate user settings and grants. Settings should be similar to:
Granted Roles:
Connect
System Privileges:
Advisor
Alter session
Create Credential
Create Database Link
Create Job
Create Procedure
Create Public Synonym
Create Sequence
Create Session
Create Synonym
Create Table
Create Trigger
Create Type
Create View
Create Any Procedure
Debug Connect Session
Drop Public Synonym
Select Any Dictionary
Select Any Table
Quotas
LABWARE
LABWAREIDX
USERS | 31457280 | K
Add the newly created schema account credentials to shipboard password safe.
Copy DDL from Existing Project to New Project
In this example we will copy DDL from existing schema owner GEODPTST360 to new, target, project schema GEODPTST123.
In SQLDeveloper:
Open two database connections:
One with newly created GEODESC project account schema owner; e.g., GEODPTST123
One with existing GEODESC project account; e.g., GEODPTST360
From Menu select “Tools | Database copy…” This will open the following dialog box.
Select “Source Connection” and “Destination Connection”. Source is the existing project schema from which you are copying information; Destination is the newly created schema owner account created above
Select “Objects Copy” (should be default in dialog)
Select “Copy DDL”; use options as shown in Figure 1 above.
Uncheck “Copy Data”. We do not want the data from the source project, only the DDL
Click “Next” button.
Leave all items in the “Object Types” dialog checked.
Click “Next” button.
Leave all items in “Specify Objects” at defaults (leaving selections empty will cause all objects to be copied).
Click “Next” button.
Review the “Copy Summary” page; ensure source and destination databases are correct; ensure that you are copying only DDL (no data), and review set of DDL objects to ensure that you are copying e.g., Tables, Sequences, Indexes, etc.
Click “Finish” button.
SQLBuilder will run a utility that copies all of the DDL from the source account to the destination account; i.e., it will build all the tables, constraints, indexes, sequences, etc. required for the new project. At the end of the process SQLBuilder will display a log of all of the actions that occurred. Review this log and look for errors or warnings.
Add required Grants to Tables in New Project Schema
For each table in the new project schema run the following GRANT SQL commands:
GRANT DELETE ON "NEW-PROJ-SCHEMA"."TABLE_NAME" TO "WRITER";
GRANT INSERT ON "NEW-PROJ-SCHEMA"."TABLE_NAME" TO "WRITER";
GRANT SELECT ON "NEW-PROJ-SCHEMA"."TABLE_NAME" TO "WRITER";
GRANT UPDATE ON "NEW-PROJ-SCHEMA"."TABLE_NAME" TO "WRITER";
GRANT SELECT ON "NEW-PROJ-SCHEMA"."TABLE_NAME" TO "GUEST";
GRANT SELECT ON "NEW-PROJ-SCHEMA"."TABLE_NAME" TO PUBLIC;
For example, for project table P_CAPTURE_FILES in schema GEODPTST123 run:
GRANT DELETE ON "GEODPTST123"."P_CAPTURE_FILES" TO "WRITER";
GRANT INSERT ON "GEODPTST123 "." P_CAPTURE_FILES " TO "WRITER";
GRANT SELECT ON "GEODPTST123"." P_CAPTURE_FILES " TO "WRITER";
GRANT UPDATE ON " GEODPTST123"." P_CAPTURE_FILES " TO "WRITER";
GRANT SELECT ON " GEODPTST123"."P_CAPTURE_FILES" TO "GUEST";
GRANT SELECT ON " GEODPTST123"." P_CAPTURE_FILES " TO PUBLIC;
At this point the new project should be ready for use by GEODESC applications.