You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
* 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
Copy file name to clipboardExpand all lines: multitenant-dev-agility/mt-dev-agility/mt-dev-agility.md
+34-27
Original file line number
Diff line number
Diff line change
@@ -1,4 +1,4 @@
1
-
# Pluggable Database for Development Agility
1
+
# Pluggable Databases for Development Agility
2
2
3
3
## Introduction
4
4
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
10
10
- Cloning your "production" PDB to a "test" PDB to use as a master copy for the test/development teams.
11
11
- Creating thin "snapshot" copies of the test master for use by the test/development teams.
12
12
13
-
Estimated Time to Complete This Workshop: 90 minutes
13
+
Estimated Time to Complete This Workshop: 60 minutes
14
14
15
15
16
16
### Prerequisites
@@ -25,7 +25,7 @@ In the following labs, instead of SQL\*Plus you will use **Oracle SQL Developer
25
25
26
26
If you accidentally exit the SQLcl client during a lab exercise, the client can be launched using the command **sql /nolog** .
27
27
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!*
29
29
30
30
**Please run all workshop tasks in the order in which they appear in this guide.**
31
31
@@ -47,7 +47,7 @@ In this first task, you will create and explore a new pluggable database **HRAPP
47
47
48
48
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.
49
49
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.
51
51
52
52
```
53
53
<copy>
@@ -67,7 +67,7 @@ In this first task, you will create and explore a new pluggable database **HRAPP
67
67
</copy>
68
68
```
69
69
70
-

70
+

71
71
72
72
73
73
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

124
+
- **password** Oracle_4U
125
+
- **tablespace** Press ENTER to accept the default value
126
+
- **overwrite?** Press ENTER to accept the default value
118
127
128
+

119
129
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!
121
132
122
133
123
134
```
124
135
<copy>
125
-
exit
126
136
cd /home/oracle
127
137
sql hr/Oracle_4U@localhost:1521/HRAPPDB
128
138
</copy>
@@ -137,7 +147,7 @@ In this first task, you will create and explore a new pluggable database **HRAPP
137
147
138
148

139
149
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.
141
151
142
152
```
143
153
<copy>
@@ -177,7 +187,7 @@ You should still be connected to the SQLcl client and see a "SQL>" prompt. If n
177
187
First, you'll unplug **HRAPPDB** from **CDBTEST** into a ".pdb" compressed archive.
178
188
179
189
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.
181
191
182
192
```
183
193
<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
214
224
215
225

216
226
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.
218
228
219
229
```
220
230
<copy>
@@ -259,10 +269,6 @@ In this task, you will connect to container database, **CDBPROD**, and plug the
259
269
```
260
270
<copy>
261
271
connect sys/Oracle_4U@localhost:1521/CDBPROD as sysdba
262
-
</copy>
263
-
```
264
-
```
265
-
<copy>
266
272
show pdbs
267
273
</copy>
268
274
```
@@ -334,13 +340,14 @@ Clone the pluggable database **HRAPP** to a new PDB named **HRAPP2**.
334
340
```
335
341
<copy>
336
342
connect hr/Oracle_4U@localhost:1521/hrapp
343
+
exec dbms_stats.gather_schema_stats('HR')
337
344
select table_name, num_rows from user_tables order by 1;
338
345
</copy>
339
346
```
340
347
341
348

342
349
343
-
2. Connect to the container **CDBPROD**.
350
+
2. Connect to the container database **CDBPROD**.
344
351
345
352
```
346
353
<copy>
@@ -392,7 +399,7 @@ You should still be connected to the SQLcl client and see a "SQL>" prompt. If n
392
399
393
400
```
394
401
<copy>
395
-
drop database link hr_prod;
402
+
drop database link IF EXISTS hr_prod;
396
403
create database link hr_prod connect to pdb_admin identified by Oracle_4U using 'localhost:1521/hrapp';
397
404
</copy>
398
405
```
@@ -410,7 +417,7 @@ You should still be connected to the SQLcl client and see a "SQL>" prompt. If n
410
417
```
411
418

412
419
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.
414
421
415
422
```
416
423
<copy>
@@ -458,8 +465,8 @@ You should still be connected to the SQLcl client and see a "SQL>" prompt. If n
458
465
459
466
select count(*) from jobs;
460
467
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);
463
470
commit;
464
471
465
472
select count(*) from jobs;
@@ -554,7 +561,7 @@ Note: when a PDB Snapshot Copy is created, the permissions for the datafiles of
554
561
3. Execute the PDB refresh of HRTESTMASTER.
555
562
4. Create new PDB Snapshot Copies if desired.
556
563
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:
558
565
- Oracle Multitenant made it easy for you to create a new database in just seconds.
559
566
- You were able to unplug your database for sharing with others, and plug in a database that was shared with your team.
560
567
- 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!
567
574
## APPENDIX: Lab Cleanup and Reset
568
575
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.
569
576
570
-
**NOTE** exit from SQLcl before running the following code.
577
+
**NOTE exit from SQLcl before running the following code!**
0 commit comments