|
| 1 | +# Customer Orders Sample Schema |
| 2 | + |
| 3 | +Copyright (c) 2019 Oracle |
| 4 | + |
| 5 | +Permission is hereby granted, free of charge, to any person obtaining |
| 6 | +a copy of this software and associated documentation files (the |
| 7 | +"Software"), to deal in the Software without restriction, including |
| 8 | +without limitation the rights to use, copy, modify, merge, publish, |
| 9 | +distribute, sublicense, and/or sell copies of the Software, and to |
| 10 | +permit persons to whom the Software is furnished to do so, subject to |
| 11 | +the following conditions: |
| 12 | + |
| 13 | +The above copyright notice and this permission notice shall be |
| 14 | +included in all copies or substantial portions of the Software. |
| 15 | + |
| 16 | +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, |
| 17 | +EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF |
| 18 | +MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND |
| 19 | +NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE |
| 20 | +LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION |
| 21 | +OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION |
| 22 | +WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. |
| 23 | + |
| 24 | +## 1. Introduction |
| 25 | + |
| 26 | +The following contains instructions to install the customer orders sample schema. |
| 27 | + |
| 28 | +This requires Oracle Database 12.1.0.2 or higher. |
| 29 | + |
| 30 | +## 2. Installing the Schema |
| 31 | + |
| 32 | +The installation scripts are designed to run on a database host with |
| 33 | +Oracle Database 12.1.0.2 or higher. Privileged database access is required |
| 34 | +during installation. |
| 35 | + |
| 36 | +### 2.1. Clone the sample schemas repository |
| 37 | + |
| 38 | +Login as the Oracle Database software owner and clone the repository, for example |
| 39 | + |
| 40 | +```shell |
| 41 | +cd $HOME |
| 42 | +git clone https://github.com/oracle/db-sample-schemas.git |
| 43 | +``` |
| 44 | + |
| 45 | +or download and extract the ZIP file: |
| 46 | + |
| 47 | +```shell |
| 48 | +unzip db-sample-schemas.zip |
| 49 | +``` |
| 50 | + |
| 51 | +### 2.2. Change directory |
| 52 | + |
| 53 | +```shell |
| 54 | +cd $HOME/db-sample-schemas/customer_orders |
| 55 | +``` |
| 56 | + |
| 57 | +### 2.4. Set the Oracle environment |
| 58 | + |
| 59 | +```shell |
| 60 | +source /usr/local/bin/oraenv |
| 61 | +``` |
| 62 | + |
| 63 | +### 2.5. Run the installation script |
| 64 | + |
| 65 | +Review the [README.txt](#README.txt) for information on passwords and |
| 66 | +pre-requirements. In particular, verify your default and temporary |
| 67 | +tablespace names, and choose a password for the schema. |
| 68 | + |
| 69 | +Start SQL*Plus and run the top level installation script as |
| 70 | +discussed in [README.txt](#README.txt): |
| 71 | + |
| 72 | +```shell |
| 73 | +sqlplus system@connect_string |
| 74 | +@co_main copw connect_string users temp |
| 75 | +``` |
| 76 | + |
| 77 | +Use your actual default and temporary tablespace names. The passwords |
| 78 | +for the new CO user will be set to the value you specify. |
| 79 | + |
| 80 | +Using a connect string permits connections to non-container databases and |
| 81 | +pluggable database using the same syntax. |
| 82 | + |
| 83 | +An example of connect strings for databases with services noncdb and pdb: |
| 84 | +``` |
| 85 | + localhost:1521/noncdb |
| 86 | + localhost:1521/pdb |
| 87 | +``` |
| 88 | + |
| 89 | +### 2.6. Review the installation logs |
| 90 | + |
| 91 | +Review co_install.log for errors. |
| 92 | + |
| 93 | +## 3. Removing the Sample |
| 94 | + |
| 95 | +*CAUTION*: This will drop user account named CO. |
| 96 | + |
| 97 | +### 3.1. Set the Oracle environment |
| 98 | + |
| 99 | +```shell |
| 100 | +source /usr/local/bin/oraenv |
| 101 | +``` |
| 102 | + |
| 103 | +### 3.2. Run the schema removal script |
| 104 | + |
| 105 | +```shell |
| 106 | +sqlplus system@connect_string |
| 107 | +@co_drop_user.sql |
| 108 | +``` |
0 commit comments