Skip to content

Commit

Permalink
first commit for database
Browse files Browse the repository at this point in the history
  • Loading branch information
anooshapilli committed Jun 8, 2022
1 parent 8c4a588 commit 786a953
Show file tree
Hide file tree
Showing 2,761 changed files with 71,302 additions and 0 deletions.
7 changes: 7 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
.DS_Store
**/*.rpm
**/*.jar
**/*.bin
*.patch
env.sh
.vscode
29 changes: 29 additions & 0 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
# Contributing to Oracle GitHub projects

*Copyright (c) 2016, Oracle and/or its affiliates. All rights reserved.*

Pull requests can be made under the OCA -
[Oracle Contributor Agreement](https://www.oracle.com/technetwork/community/oca-486395.html).

If you have ideas you want to contribute back, please share them by first
[submitting Issues](https://help.github.com/articles/creating-an-issue/).

For pull requests containing new code submission to be accepted into any project,
the bottom of your commit message must have the following line using your name and
e-mail address as it appears in the OCA Signatories list.

```
Signed-off-by: Your Name <[email protected]>
```

This can be automatically added to pull requests by committing with:

```
git commit --signoff
```

Only pull requests from committers that can be verified as having
signed the OCA can be accepted.

Thanks,
Oracle GitHub Team
35 changes: 35 additions & 0 deletions LICENSE.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
Copyright (c) 2022 Oracle and/or its affiliates.

The Universal Permissive License (UPL), Version 1.0

Subject to the condition set forth below, permission is hereby granted to any
person obtaining a copy of this software, associated documentation and/or data
(collectively the "Software"), free of charge and under any and all copyright
rights in the Software, and any and all patent rights owned or freely
licensable by each licensor hereunder covering either (i) the unmodified
Software as contributed to or provided by such licensor, or (ii) the Larger
Works (as defined below), to deal in both

(a) the Software, and
(b) any piece of software and/or hardware listed in the lrgrwrks.txt file if
one is included with the Software (each a "Larger Work" to which the Software
is contributed by such licensors),

without restriction, including without limitation the rights to copy, create
derivative works of, display, perform, and distribute the Software and make,
use, sell, offer for sale, import, export, have made, and have sold the
Software and the Larger Work(s), and to sublicense the foregoing rights on
either these or other terms.

This license is subject to the following condition:
The above copyright notice and either this complete permission notice or at
a minimum a reference to the UPL must be included in all copies or
substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
55 changes: 55 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
# Welcome

[![](https://objectstorage.us-phoenix-1.oraclecloud.com/p/SJgQwcGUvQ4LqtQ9xGsxRcgoSN19Wip9vSdk-D_lBzi7bhDP6eG1zMBl0I21Qvaz/n/c4u02/b/common/o/images/livelabs-banner-formarketplace.png)](https://developer.oracle.com/livelabs)
---
LiveLabs is the place to explore Oracle's products and services using workshops designed to enhance your experience building and deploying applications on the Cloud and On-Premises. Our library of workshops cover everything from how to provision the world's first autonomous database to setting up a webserver on our world class OCI Generation 2 infrastructure, machine learning and much more. Use your existing Oracle Cloud account, a Free Tier account or a LiveLabs Cloud Account to build, test, and deploy applications on Oracle's Cloud.

### How do I get started?
Visit [LiveLabs](https://developer.oracle.com/livelabs) now to get started. Workshops are added weekly, please visit frequently for new content.

[![](https://objectstorage.us-phoenix-1.oraclecloud.com/p/SJgQwcGUvQ4LqtQ9xGsxRcgoSN19Wip9vSdk-D_lBzi7bhDP6eG1zMBl0I21Qvaz/n/c4u02/b/common/o/images/livelabs-homepage-march.png)](https://developer.oracle.com/livelabs)

## **Developer** Featured Workshops
- [Oracle's Converged Database - Autonomous Edition](https://apexapps.oracle.com/pls/apex/dbpm/r/livelabs/view-workshop?wid=776)
- [Oracle's Converged Database - On Premises Edition](https://apexapps.oracle.com/pls/apex/dbpm/r/livelabs/view-workshop?p180_id=613)
- [Building Java Cloud Applications with Micronaut and OCI](https://apexapps.oracle.com/pls/apex/dbpm/r/livelabs/view-workshop?p180_id=667)
- [Building Microservices with Oracle Converged DB](https://apexapps.oracle.com/pls/apex/dbpm/r/livelabs/view-workshop?wid=637)
- [Building an Application from a Spreadsheet](https://apexapps.oracle.com/pls/apex/dbpm/r/livelabs/view-workshop?p180_id=631)
- [Deploying OKE Using Oracle Cloud Shell](https://apexapps.oracle.com/pls/apex/dbpm/r/livelabs/view-workshop?p180_id=649)
- [Database 21c on DB Systems](https://apexapps.oracle.com/pls/apex/dbpm/r/livelabs/view-workshop?wid=737)
- [Database 19c JSON](https://apexapps.oracle.com/pls/apex/dbpm/r/livelabs/view-workshop?p180_id=638)
- [Database 19c New Features for Developers](https://apexapps.oracle.com/pls/apex/dbpm/r/livelabs/view-workshop?p180_id=636)
- [Create a Docker registry in OCI](https://apexapps.oracle.com/pls/apex/dbpm/r/livelabs/view-workshop?p180_id=590)

## **Autonomous Database** Featured Workshops
- [Departmental Data Warehouse - HR Analytics](https://apexapps.oracle.com/pls/apex/dbpm/r/livelabs/view-workshop?p180_id=678)
- [Analyzing your Data with ADB](https://apexapps.oracle.com/pls/apex/dbpm/r/livelabs/view-workshop?p180_id=553)
- [Autonomous Database Quick Start](https://apexapps.oracle.com/pls/apex/dbpm/r/livelabs/view-workshop?p180_id=582)
- [Machine Learning on ADB](https://apexapps.oracle.com/pls/apex/dbpm/r/livelabs/view-workshop?p180_id=560)

## **OCI** Featured Workshops
- [Get Started with OCI Core Services](https://apexapps.oracle.com/pls/apex/dbpm/r/livelabs/view-workshop?p180_id=648)
- [Lift and Shift On-Premises EBS to OCI](https://apexapps.oracle.com/pls/apex/dbpm/r/livelabs/view-workshop?p180_id=672)
- [Deploying OKE Using Oracle Cloud Shell](https://apexapps.oracle.com/pls/apex/dbpm/r/livelabs/view-workshop?p180_id=649)

## **Database 19c** Featured Workshops
- [Database 19c New Features for Developers](https://apexapps.oracle.com/pls/apex/dbpm/r/livelabs/view-workshop?p180_id=636)
- [Multitenant Fundamentals](https://apexapps.oracle.com/pls/apex/dbpm/r/livelabs/view-workshop?p180_id=573)
- [Database In-Memory](https://apexapps.oracle.com/pls/apex/dbpm/r/livelabs/view-workshop?p180_id=566)

## **Enterprise Manager** Featured Workshops
- [Enterprise Manager](https://apexapps.oracle.com/pls/apex/dbpm/r/livelabs/view-workshop?p180_id=574)
- [Multitenant Lifecycle Management](https://apexapps.oracle.com/pls/apex/dbpm/r/livelabs/view-workshop?p180_id=656)

## Contributing
Pull requests are currently not being accepted. See [CONTRIBUTING](CONTRIBUTING.md) for details. To get your workshop featured on this page, please contact Michelle Malcher or Kevin Lazarz.

## License
Copyright (c) 2014, 2022 Oracle and/or its affiliates
The Universal Permissive License (UPL), Version 1.0
See [LICENSE](LICENSE.txt) for details.

## Need Help?
Please first consult the "Need Help?" lab located at the bottom of your workshop to see if our FAQ can solve your problem. If you have an issue that is specific to the contents of the workshop, please reach out to the author located in the "Acknowledgements" section at the bottom of each lab via email. Please include your workshop name and lab name. You can also include screenshots and attach files. If you have a more general issue or comment, please [reach out to the LiveLabs team](mailto:[email protected]).

For workshop reservations you will need to [create an Oracle account](https://profile.oracle.com/myprofile/account/create-account.jspx).
38 changes: 38 additions & 0 deletions SECURITY.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
# Reporting security vulnerabilities

Oracle values the independent security research community and believes that
responsible disclosure of security vulnerabilities helps us ensure the security
and privacy of all our users.

Please do NOT raise a GitHub Issue to report a security vulnerability. If you
believe you have found a security vulnerability, please submit a report to
[[email protected]][1] preferably with a proof of concept. Please review
some additional information on [how to report security vulnerabilities to Oracle][2].
We encourage people who contact Oracle Security to use email encryption using
[our encryption key][3].

We ask that you do not use other channels or contact the project maintainers
directly.

Non-vulnerability related security issues including ideas for new or improved
security features are welcome on GitHub Issues.

## Security updates, alerts and bulletins

Security updates will be released on a regular cadence. Many of our projects
will typically release security fixes in conjunction with the
[Oracle Critical Patch Update][3] program. Additional
information, including past advisories, is available on our [security alerts][4]
page.

## Security-related information

We will provide security related information such as a threat model, considerations
for secure use, or any known security issues in our documentation. Please note
that labs and sample code are intended to demonstrate a concept and may not be
sufficiently hardened for production use.

[1]: mailto:[email protected]
[2]: https://www.oracle.com/corporate/security-practices/assurance/vulnerability/reporting.html
[3]: https://www.oracle.com/security-alerts/encryptionkey.html
[4]: https://www.oracle.com/security-alerts/
95 changes: 95 additions & 0 deletions adv-compression/auto-optimization/auto.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,95 @@
# Enable automatic data optimization

## Introduction

The massive growth in data volume experienced by enterprises introduces significant challenges. Companies must quickly adapt to the changing business landscape without influencing the bottom line. IT managers need to manage their existing infrastructure to control costs efficiently yet deliver extraordinary application performance. Advanced Compression and Oracle Database together provide a robust set of compression, performance, and data storage optimization capabilities that enable IT managers to succeed in this complex environment. Using Advanced Compression, enterprises can efficiently manage their increasing data requirements throughout all components of their data center – minimizing CapEx and OpEx costs while continuing to achieve the highest levels of application performance.

Estimated Time: 20 minutes

### About automatic data optimization

Automatic data optimization allows organizations to create policies that implement data compression and storage tiering automatically. ADO policies define conditions and corresponding actions to be applied to specific objects. Utilizing the information maintained by Heat Map, Oracle Database executes the registered ADO actions, for the requested objects, to move them to the desired state transparently and automatically.

### Key Features

Exponential data growth has put severe pressure from a cost, performance, scalability and management perspective. It has become imperative to employ more efficient ways of storing and managing data to meet the growing demands on IT systems. The rapid growth in data volumes and associated costs are of significant concern for many companies. The companies have started a global initiative to identify and drive a reduction in storage costs.

* ADO policies can be specified at the segment level or the row level for tables and partitions.
* Segment and row-level ADO policies are evaluated and executed automatically in the background during maintenance windows or executed on demand.
* Storage tiering is specified at the segment level and triggered by space pressure in the tablespace where the segment resides.

This Lab will teach you how to enable Automatic Data Optimization.

### Objectives

In this lab, you will:
* Enable automatic data optimization

### Prerequisites
This lab assumes you have:

* A LiveLabs Cloud account and assigned compartment
* The IP address and instance name for your DB19c Compute instance
* Successfully logged into your LiveLabs account
* A Valid SSH Key Pair

## Task 1: Enable automatic data optimization

1. Create table students

```
<copy>
CREATE TABLE students (
student_id NUMBER , first_name VARCHAR2(128) , last_name VARCHAR2(128)
);
</copy>
```
2. A segment-level ADO policy is created to automatically compress the entire table after there have been no modifications for at least 30 days, using Advanced Row Compression.
```
<copy>
ALTER TABLE students ILM ADD POLICY ROW STORE COMPRESS ADVANCED SEGMENT AFTER 30 DAYS OF NO MODIFICATION;
</copy>
```
3. A row-level ADO policy is created to automatically compress blocks in the table, after no rows in the block have been modified for at least 3 days, using Advanced Row Compression..
```
<copy>
ALTER TABLE students ILM ADD POLICY ROW STORE COMPRESS ADVANCED ROW AFTER 3 DAYS OF NO MODIFICATION;
</copy>
```
4. View user\_ilmpolicies table
```
<copy>
select * from user_ilmpolicies;
</copy>
```
![User ILM Policies](images/user-ilmpolicies.png "User ILM Policies")
## Task 2: Cleanup
1. When you are finished testing the example, you can clean up the environment by dropping the tables
```
<copy>
drop table students purge;
</copy>
```
You successfully made it to the end of this lab.
## Learn More
* [Oracle advanced compression](https://www.oracle.com/technetwork/database/options/compression/advanced-compression-wp-12c-1896128.pdf)
## Acknowledgements
- **Author** - Madhusudhan Rao, Principal Product Manager, Database
* **Contributors** - Kevin Lazarz, Senior Principal Product Manager, Database and Gregg Christman, Senior Product Manager
* **Last Updated By/Date** - Madhusudhan Rao, Feb 2022
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
129 changes: 129 additions & 0 deletions adv-compression/index-compression/index.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,129 @@
# Enable advanced index compression

## Introduction

Indexes are used extensively inside OLTP databases since they can efficiently support a wide variety of access paths to the data stored in relational tables. It is prevalent to find many indexes created on a single table to support many access paths for OLTP applications. This can cause indexes to contribute a more significant share to the overall storage of a database when compared to the size of the base tables alone. Advanced Index Compression is a form of index block compression. Creating an index using Advanced Index Compression reduces the size of all supported unique and non-unique indexes while still providing efficient access to the indexes.

Estimated Time: 20 minutes

### About Advanced index compression

Advanced index compression LOW works well on all supported indexes, including those indexes that are not good candidates (indexes with no duplicate values or few duplicate values for a given number of leading columns of the index) with the existing Prefix Compression feature. Advanced Index Compression HIGH works at the block level to provide the best compression for each block. This means that users do not need knowledge of data characteristics – Advanced Index Compression HIGH automatically chooses the right compression per block.The HIGH level of Advanced Index Compression provides significant space savings while also improving performance for queries that are executed using indexes. Advanced Index Compression LOW and HIGH both provide significant space savings while also improving performance for queries that are executed using indexes.

### Key Features

* Gives higher compression ratios.
* Employs more complex compression algorithms than advanced index compression LOW.
* Stores data in a compression unit, which is a special on-disk format.

### Expectations from adapting a compression technique

* Storage costs to drop as the result of any compression deployments, and
* No query performance degradation and only minimal Data Manipulation Language (DML) performance impact from compression.

This Lab will teach you how to enable advanced index compression.

### Objectives

In this lab, you will:
* Enable Advanced Index Compression

### Prerequisites
This lab assumes you have:

* A LiveLabs Cloud account and assigned compartment
* The IP address and instance name for your DB19c Compute instance
* Successfully logged into your LiveLabs account
* A Valid SSH Key Pair

## Task 1: Enable advanced index compression

1. create table aud_log

```
<copy>
alter session set db_index_compression_inheritance=tablespace;
</copy>
```
Session altered. Create Table Space.
```
<copy>
create tablespace demots
datafile 'C:\ORACLE\ORADATA\DB122\DEMO.DBF'
size 100M
default index compress advanced high;
</copy>
```
2. create mydemotable.
```
<copy>
create table mydemotable tablespace demots as
select *
from dba_objects;
</copy>
```
3. create index ensure that the tablespace is the one that we created with 'compress advanced high' parameter .
```
<copy>
create index mytable_idx on mydemotable(owner) tablespace demots;
</copy>
```
4. view MYDEMOTABLE table data in user_indexes table
```
<copy>
select TABLE_OWNER, INDEX_TYPE, INDEX_NAME, COMPRESSION,LEAF_BLOCKS, TABLESPACE_NAME, DISTINCT_KEYS
from user_indexes
where table_name ='MYDEMOTABLE';
</copy>
```
![User Index](images/user-index.png "User Index")
## Task 2: Create Materialized View
1. create materialized view of MYDEMOTABLE and name it as MYDEMOTABLE_MV
```
<copy>
create materialized view MYDEMOTABLE_MV ROW STORE COMPRESS ADVANCED as select * from MYDEMOTABLE;
</copy>
```
2. view data in user\_tables
```
<copy>
SELECT table_name, compression, compress_for, tablespace_name, partitioned FROM user_tables where table_name='MYDEMOTABLE_MV';
</copy>
```
![materialized view](images/materialized-view.png "materialized view")
## Task 3: Cleanup
1. When you are finished testing the example, you can clean up the environment by dropping the tables
```
<copy>
DROP TABLE MYDEMOTABLE purge;
</copy>
```
You successfully made it to the end this lab. You may now [proceed to the next lab](#next).
## Learn More
* [Oracle advanced compression](https://www.oracle.com/technetwork/database/options/compression/advanced-compression-wp-12c-1896128.pdf)
## Acknowledgements
- **Author** - Madhusudhan Rao, Principal Product Manager, Database
* **Contributors** - Kevin Lazarz, Senior Principal Product Manager, Database and Gregg Christman, Senior Product Manager
* **Last Updated By/Date** - Madhusudhan Rao, Feb 2022
Loading

0 comments on commit 786a953

Please sign in to comment.