Skip to content

Commit 22a46c6

Browse files
authored
WMD ID: 11469 (oracle-livelabs#572)
* MT Value Lab Changes for MT Value LiveLab * Fixed the title case * Fix intro bullets * Updated the markdown Removed extraneous commands and corrected syntax and grammar errors. * New screenshots plus a few additional text corrections * Updated workshop guide for 21c * Updates and intro cleanup * renamed folder and cleaned up images and intro language * image updates * Solo QA prior to team review Updated the markup and replaced some of the images. * Fix filenames to lowercase * File system renames had to use "git mv" to deal with MacOS case name changes for some of the image files * Update task5.2-hrtestlink.png * Update mt-dev-agility.md * Update mt-dev-agility.md * updated the titles * updated for 23ai * Fixing titles * corrected the help email address * final cleanup * QA cleanup * image cleanups
1 parent 7bb5d85 commit 22a46c6

27 files changed

+41
-34
lines changed
Loading
Loading
Loading
Loading
Loading
Loading
Loading
Loading
Loading
Loading
Loading
Loading
Loading
Loading
Loading
Loading
Loading
Loading
Loading
Loading
Loading
Loading
Loading

multitenant-dev-agility/mt-dev-agility/mt-dev-agility.md

+34-27
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# Pluggable Database for Development Agility
1+
# Pluggable Databases for Development Agility
22

33
## Introduction
44
In this lab you will assume the role of a development team member, and you will leverage Oracle Multitenant to perform tasks similar to what might be performed in a development and testing role. The tasks in this lab include:
@@ -10,7 +10,7 @@ In this lab you will assume the role of a development team member, and you will
1010
- Cloning your "production" PDB to a "test" PDB to use as a master copy for the test/development teams.
1111
- Creating thin "snapshot" copies of the test master for use by the test/development teams.
1212

13-
Estimated Time to Complete This Workshop: 90 minutes
13+
Estimated Time to Complete This Workshop: 60 minutes
1414

1515

1616
### Prerequisites
@@ -25,7 +25,7 @@ In the following labs, instead of SQL\*Plus you will use **Oracle SQL Developer
2525

2626
If you accidentally exit the SQLcl client during a lab exercise, the client can be launched using the command **sql /nolog** .
2727

28-
**NOTE:** *When doing Copy/Paste using the convenient* **Copy** *function used throughout the guide, you must hit the* **ENTER** *key after pasting. Otherwise the last line will remain in the buffer until you hit* **ENTER**!
28+
**NOTE:** *When doing Copy/Paste using the convenient* **Copy** *function used throughout the guide, you must hit the* **ENTER** *key after pasting. Otherwise the last line will remain in the buffer, so be sure to press* **ENTER** *after the copy and paste!*
2929

3030
**Please run all workshop tasks in the order in which they appear in this guide.**
3131

@@ -47,7 +47,7 @@ In this first task, you will create and explore a new pluggable database **HRAPP
4747
4848
2. It is common for application development teams to have to wait for a new database when they need one. The process might be to submit a formal request for a new database, wait for approval, and then wait some more while an environment and database are provisioned. Depending on the organization and the available infrastructure, that's a process that could take hours, days, or maybe even longer! However, in a modern, data-driven environment, developers need the ability to quickly create and manage data stores in order to keep pace with rapidly evolving business needs. Oracle Multitenant makes it easy to enable a "self-service" database environment for the development team. Not only is database creation self-service and easy, it is also incredibly fast to stand up a new Oracle Database.
4949
50-
In this task, you'll examine the container database **CDBTEST** by listing the pluggable databases already in the container; since this is a new CDB the only database plugged into it is the SEED database. You will create the pluggable database **HRAPPDB**. Note that the database is created and ready for use in a matter of seconds.
50+
In this task, you'll examine the container database **CDBTEST** by listing the pluggable databases already in the CDB; since this is a new CDB the only database plugged into it is the SEED database. You will create the pluggable database **HRAPPDB**. Note that the database is created and ready for use in a matter of seconds.
5151
5252
```
5353
<copy>
@@ -67,7 +67,7 @@ In this first task, you will create and explore a new pluggable database **HRAPP
6767
</copy>
6868
```
6969
70-
![New pluggable database HRAPPDB is created in around 10 seconds!](./images/task1.2-createhrappdb.png " ")
70+
![New pluggable database HRAPPDB is created in a matter of seconds!](./images/task1.2-createhrappdb.png " ")
7171
7272
7373
2. Change your SQLcl session to point to the database you just created, **HRAPPDB**. Then you will grant privileges to the database user **PDB\_ADMIN**. You will leverage user PDB_ADMIN's privileges later on in this workshop.
@@ -93,10 +93,9 @@ In this first task, you will create and explore a new pluggable database **HRAPP
9393
```
9494
<copy>
9595
cd /home/oracle
96-
wget -O db-sample-schemas.zip https://github.com/oracle-samples/db-sample-schemas/archive/refs/tags/v21.1.zip
96+
wget -O db-sample-schemas.zip https://github.com/oracle-samples/db-sample-schemas/archive/refs/tags/v23.3.zip
9797
unzip -o db-sample-schemas.zip
98-
cd db-sample-schemas-21.1
99-
perl -p -i.bak -e 's#__SUB__CWD__#'$(pwd)'#g' *.sql */*.sql */*.dat
98+
cd db-sample-schemas-23.3
10099
ls
101100
102101
</copy>
@@ -105,24 +104,35 @@ In this first task, you will create and explore a new pluggable database **HRAPP
105104
106105
```
107106
<copy>
107+
108108
cd human_resources
109109
110-
sqlplus sys/Oracle_4U@localhost:1521/hrappdb as sysdba
110+
sql system/Oracle_4U@localhost:1521/hrappdb
111+
112+
</copy>
113+
```
114+
115+
```
116+
<copy>
111117
112-
@hr_main Oracle_4U USERS TEMP Oracle_4U /home/oracle/logs/ localhost:1521/hrappdb
118+
@hr_install
113119
114120
</copy>
115121
```
122+
* At the prompts, enter the following...
116123
117-
![Database sample schemas are downloaded and the HR demo schema is loaded.](./images/task1.3-installsampleschemahr.png " ")
124+
- **password** Oracle_4U
125+
- **tablespace** Press ENTER to accept the default value
126+
- **overwrite?** Press ENTER to accept the default value
118127
128+
![Database sample schemas HR demo schema is loaded.](./images/task1.3-installsampleschemahr.png " ")
119129
120-
4. Launch SQLcl and connect as the database user **HR** to **HRAPPDB**, and verify that the sample schema objects have been created.
130+
131+
4. Launch SQLcl and connect as the database user **HR** to **HRAPPDB**, and verify that the sample schema objects have been created. If you encounter an error with an "ORA-01017" in it when running this step, re-run the previous step to install the HR sample schemas and be sure to enter **Oracle_4U** as the password!
121132
122133
123134
```
124135
<copy>
125-
exit
126136
cd /home/oracle
127137
sql hr/Oracle_4U@localhost:1521/HRAPPDB
128138
</copy>
@@ -137,7 +147,7 @@ In this first task, you will create and explore a new pluggable database **HRAPP
137147
138148
![The output shows a summary of schema HR's objects.](./images/task1.4-hrobjectcounts.png " ")
139149
140-
5. Connect again in SQLcl as **SYS** to the container database **CDBTEST** and view the tablespaces and datafiles created, plus the container (PDB or CDB) to which each datafile belongs.
150+
5. Connect again in SQLcl as **SYS** to the container database **CDBTEST** and view the tablespaces and datafiles created, plus the database (PDB or CDB) to which each datafile belongs.
141151
142152
```
143153
<copy>
@@ -177,7 +187,7 @@ You should still be connected to the SQLcl client and see a "SQL>" prompt. If n
177187
First, you'll unplug **HRAPPDB** from **CDBTEST** into a ".pdb" compressed archive.
178188
179189
180-
1. While still in the SQLcl client, connect to the container **CDBTEST** as the superuser SYSDBA.
190+
1. While still in the SQLcl client, connect to the container database **CDBTEST** as the superuser SYSDBA.
181191
182192
```
183193
<copy>connect sys/Oracle_4U@localhost:1521/CDBTEST as sysdba</copy>
@@ -214,7 +224,7 @@ First, you'll unplug **HRAPPDB** from **CDBTEST** into a ".pdb" compressed archi
214224
215225
![The unplugged PDB shows as still in MOUNTED status until it is dropped.](./images/task2.3-drophrappdb.png " ")
216226
217-
4. Now, query the datafiles that are part of **CDBTEST**. You can see in the results that the datafiles for **HRAPPDB** are no longer part of the container database.
227+
4. Now, query the datafiles that are part of **CDBTEST**. You can see in the results that the datafiles for **HRAPPDB** are no longer part of the container database. To run the query, either copy and paste the code below, or use the up arrow on your keyboard to recall that statement in SQLcl.
218228
219229
```
220230
<copy>
@@ -259,10 +269,6 @@ In this task, you will connect to container database, **CDBPROD**, and plug the
259269
```
260270
<copy>
261271
connect sys/Oracle_4U@localhost:1521/CDBPROD as sysdba
262-
</copy>
263-
```
264-
```
265-
<copy>
266272
show pdbs
267273
</copy>
268274
```
@@ -334,13 +340,14 @@ Clone the pluggable database **HRAPP** to a new PDB named **HRAPP2**.
334340
```
335341
<copy>
336342
connect hr/Oracle_4U@localhost:1521/hrapp
343+
exec dbms_stats.gather_schema_stats('HR')
337344
select table_name, num_rows from user_tables order by 1;
338345
</copy>
339346
```
340347
341348
![User HR owns 7 database tables, each containing multiple rows of data.](./images/task4.1-hrapptablerows.png " ")
342349
343-
2. Connect to the container **CDBPROD**.
350+
2. Connect to the container database **CDBPROD**.
344351
345352
```
346353
<copy>
@@ -392,7 +399,7 @@ You should still be connected to the SQLcl client and see a "SQL>" prompt. If n
392399
393400
```
394401
<copy>
395-
drop database link hr_prod;
402+
drop database link IF EXISTS hr_prod;
396403
create database link hr_prod connect to pdb_admin identified by Oracle_4U using 'localhost:1521/hrapp';
397404
</copy>
398405
```
@@ -410,7 +417,7 @@ You should still be connected to the SQLcl client and see a "SQL>" prompt. If n
410417
```
411418
![PDB HRTEST is successfully cloned from PDB HRAPP at CDBPROD and opened.](./images/task5.3-hrtest.png " ")
412419
413-
4. Connect to the newly-created HRTEST PDB and verify that database schema HR's exist - of course they do because this PDB is an exact clone of the source **HRAPP** database.
420+
4. Connect to the newly-created HRTEST PDB and verify that database schema HR's tables and rows exist - of course they do because this PDB is an exact clone of the source **HRAPP** database.
414421
415422
```
416423
<copy>
@@ -458,8 +465,8 @@ You should still be connected to the SQLcl client and see a "SQL>" prompt. If n
458465
459466
select count(*) from jobs;
460467
461-
insert into jobs values ('MK_ANALYST', 'Marketing Analyst',7000,11000);
462-
insert into jobs values ('IT_DATASCI','Data Scientist',8000,15000);
468+
insert into jobs values ('MK_ANALYST', 'Marketing Analyst',7000,11000),
469+
('IT_DATASCI','Data Scientist',8000,15000);
463470
commit;
464471
465472
select count(*) from jobs;
@@ -554,7 +561,7 @@ Note: when a PDB Snapshot Copy is created, the permissions for the datafiles of
554561
3. Execute the PDB refresh of HRTESTMASTER.
555562
4. Create new PDB Snapshot Copies if desired.
556563
557-
Now you've had a chance to try out Oracle Multitenant. Hopefully you've realized the value that Oracle Multitenant can bring to your organization:
564+
Now you've had a chance to try out Oracle Multitenant. Hopefully you've realized the value and agility that Oracle Multitenant can bring to your organization:
558565
- Oracle Multitenant made it easy for you to create a new database in just seconds.
559566
- You were able to unplug your database for sharing with others, and plug in a database that was shared with your team.
560567
- The workshop tasks also showed how Oracle Multitenant makes it easy to:
@@ -567,7 +574,7 @@ Thank you for participting in this Oracle LiveLabs workshop!
567574
## APPENDIX: Lab Cleanup and Reset
568575
If you'd like to run through this lab again on this same image, execute the following in order to clean up the environment before starting again.
569576
570-
**NOTE** exit from SQLcl before running the following code.
577+
**NOTE exit from SQLcl before running the following code!**
571578
572579
```
573580
<copy>

multitenant-dev-agility/workshops/desktop/manifest.json

+3-3
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
2-
"workshoptitle": "Oracle Multitenant for Development Agility",
3-
"help": "livelabs-help-db_us@oracle.com",
2+
"workshoptitle": "Oracle Multitenant: Pluggable Database for Development Agility",
3+
"help": "joe.bernens@oracle.com",
44
"tutorials": [
55
{
66
"title": "Introduction",
@@ -18,7 +18,7 @@
1818
"filename": "../../initialize-environment/initialize-environment.md"
1919
},
2020
{
21-
"title": "Lab 2: Multitenant for Development Agility",
21+
"title": "Lab 2: Oracle Multitenant: Pluggable Databases for Development Agility",
2222
"description": "Rapid provisioning, unplugging, plugging in, and cloning of Oracle Databases",
2323
"filename": "../../mt-dev-agility/mt-dev-agility.md"
2424
},

multitenant-dev-agility/workshops/freetier/manifest.json

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
2-
"workshoptitle": "Multitenant for Development Agility",
3-
"help": "livelabs-help-db_us@oracle.com",
2+
"workshoptitle": "Oracle Multitenant: Pluggable Database for Development Agility",
3+
"help": "joe.bernens@oracle.com",
44
"tutorials": [
55
{
66
"title": "Introduction",

multitenant-dev-agility/workshops/livelabs/manifest.json

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
2-
"workshoptitle": "Pluggables, Clones and Containers: Securing Oracle Multitenant with Transparent Database Encryption (TDE)",
3-
"help": "livelabs-help-db_us@oracle.com",
2+
"workshoptitle": "Oracle Multitenant: Pluggable Database for Development Agility",
3+
"help": "joe.bernens@oracle.com",
44
"tutorials": [
55
{
66
"title": "Introduction",

0 commit comments

Comments
 (0)