Feed aggregator

Quick Question for Oracle Set define off query

Tom Kyte - 3 hours 31 min ago
Hi All, I just want to know that if i turned off the feature i.e. "SET DEFINE OFF" from my oracle database, will there by any consequences / disadvantages with my data or database, as i really need to turn it off for some queries. Please advi...
Categories: DBA Blogs

how to correctly identify the correct ASCII values for the special characters.

Tom Kyte - 3 hours 31 min ago
Hi The column Text contains the apostrophe as special characters. Did a dump. you can see the results below. How do I correctly search for these special characters and then replace them with apostrophe ? You see the first row has the ASCII valu...
Categories: DBA Blogs

SQL Window function to skip and add rows dynamically

Tom Kyte - 3 hours 31 min ago
<code>create table test1 (col1 number,col2 varchar2(5),col3 date,col4 number,col5 number,col6 number); --Positive scenario sample data insert into test1 values(1,'A',trunc(sysdate),0,5.5,2); insert into test1 values(1,'A',trunc(sysdate)+...
Categories: DBA Blogs

Converting CLOBS TO VARCHAR

Tom Kyte - 3 hours 31 min ago
Can you give me a solution for converting CLOBS datatype to VARCHAR datatypes, all the documents I refer to talk about converting BLOBS to VARCHAR and when I try and apply the examples to CLOBS, get errors
Categories: DBA Blogs

What is object_type program

Tom Kyte - 3 hours 31 min ago
Tom, I was recently looking at distinct object_type in dba_objects and noticed that one object_type was PROGRAM. Where can I find more information on object_type PROGRAM? Thanks...
Categories: DBA Blogs

JDeveloper 10g With OAF Release 12.2.7 Extension Bundle For Enterprise Command Center Now Certified

Steven Chan - 4 hours 57 min ago

Web-based content in Oracle E-Business Suite Release 12 runs on the Oracle Application Framework (also known as OA Framework, OAF, or FWK) user interface infrastructure.

The latest Oracle JDeveloper patch is now available, providing support for the Release 12.2.7 Oracle Enterprise Command Center (ECC) Framework:

Where is this update documented?

Instructions for installing this patch are in the following My Oracle Support knowledge document:

Who should apply this patch?

All Oracle E-Business Suite Release 12.2.7 users who have deployed Oracle Enterprise Command Center may wish to apply this patch.

What's new in this patch?

This patch enables support for Oracle Enterprise Command Center.

Related Articles

Categories: APPS Blogs

Understanding Partitioning in #Exasol

The Oracle Instructor - 9 hours 17 min ago

Exasol introduced Partitioning in version 6.1. This feature helps to improve the performance of statements accessing large tables. As an example, let’s take these two tables:

Say t2 is too large to fit in memory and may get partitioned therefore.

In contrast to distribution, partitioning should be done on columns that are used for filtering:

ALTER TABLE t2 PARTITION BY WhereCol;

Now without taking distribution into account (on a one-node cluster), the table t2 looks like this:

Notice that partitioning changes the way the table is physically ordered on disk.

A statement like

SELECT * FROM t2 WHERE WhereCol=’A’;

would have to load only the red part of the table into memory. This may show benefits on a one-node cluster as well as on multi-node clusters. On a multi-node cluster, a large table like t2 is distributed across the active nodes. It can additionally be partitioned also. Should the two tables reside on a three-node cluster with distribution on the JoinCol columns and the table t2 partitioned on the WhereCol column, they look like this:

That way, each node has to load a smaller portion of the table into memory if statements are executed that filter on the WhereCol column while joins on the JoinCol column are still local joins.

EXA_(USER|ALL|DBA)_TABLES shows both the distribution key and the partition key if any.

Notice that Exasol will automatically create an appropriate number of partitions – you don’t have to specify that.

Categories: DBA Blogs

[BLOG] Know About Compute Classic in New Oracle Cloud Account as of Dec 2018

Online Apps DBA - 12 hours 23 min ago

Are you learning Oracle EBS R12 on Cloud and want to enhance your knowledge on the same? If yes, then visit: https://k21academy.com/ebscloud29 and learn about: ✔What is Compute Classic ✔The 2 types of Compute Classic ✔Steps to enable Compute Classic Services to your Oracle Cloud Account & much more… Are you learning Oracle EBS R12 […]

The post [BLOG] Know About Compute Classic in New Oracle Cloud Account as of Dec 2018 appeared first on Oracle Trainings for Apps & Fusion DBA.

Categories: APPS Blogs

Historical Links for Oracle Net Services aka SQL*Net

Christopher Jones - 17 hours 51 min ago

Sometime you just have to do a cleanup but it seems a waste not to keep information that may still be valuable for the historical record. This is one such time. Here are some of the older resources about Oracle Net Services, aka SQL*Net taken from a web page that is about to be revamped.

Of course, if you want current information, visit the Oracle Net Service page, the Net Services Net Services Reference, or the latest Net Services Adminstrator's Guide.

Overview

Oracle Net Services provides a scalable, secure, and easy-to-use high-availability network infrastructure for Oracle environment. It eases the complexities of network configuration and management, maximizes performance, and improves network security and diagnostic capabilities as summarized hereafter.

  • Connectivity: Oracle Net Services enables a network session from a client application to an Oracle database server. Once a network session is established, Oracle Net acts as the data courier for both the client application and the database server. It is responsible for establishing and maintaining the connection between the client application and database server, as well as exchanging messages between them.
  • Manageability: it encompasses location transparency, centralized configuration and management, quick installation and configuration. Location Transparency service allows a database client to identify the target database server; to achieve this goal, several naming methods are available today: Oracle Net Directory naming, Local naming (TNSNAMES.ORA), Host naming, and External naming.
  • Centralized Configuration and Management: allows administrators, in large network environments, to easily access a centralized repository (i.e., LDAP-compliant directory server such as Oracle Internet Directory) to specify and modify the network configuration.
  • Quick Installation and Configuration: networking components for the Oracle database server and clients are preconfigured for most environments. The Oracle database service is resolved using various naming methods. As a result, clients and servers are ready to immediately connect when installed.
  • Performance and Scalability: features such as Database Resident Connection Pool (connection pooling), Shared Server (session multiplexing), and scalable event models (polling) enable performance and high scalability.
  • Network Security: Oracle Net Services enables database access control using features of firewall access control and protocol access control.
  • Diagnosability: a diagnostic and performance analysis tool, Trace Assistant, provides detailed information about the source and context of problems as they arise.
What's New in Oracle Database 12c

The new features for Net Services in Oracle Database 12c include:

  • Internet Protocol Version 6 (IPv6) Addressing and Connectivity support over Public VIPs to Real Application Clusters (please refer the IPv6 Statement of Direction below for more information)
  • Networking support for new architectures, such as, Database Consolidation and Global Data Services
  • Large Session Data Unit (SDU) sizes, with a new upper limit of 2 MB. The larger SDU size can be used to achieve better utilization of available bandwidth in networks that have high bandwidth delay products and host resources, according to application characteristics.
  • Advanced Network Compression. This feature can be used to reduce the amount of data transmitted over the network. New parameters for the sqlnet.ora file enable compression and selection of the preferred compression level. Please refer the Advanced Network Compression white paper below for more information.
  • Dead Connection Detection has been enhanced to reduce the amount of time taken to detect terminated connections. The SQLNET.EXPIRE_TIME parameter must be set in the sqlnet.ora file to detect terminated clients. If the system supports TCP keepalive tuning, then Oracle Net Services automatically uses the enhanced detection model, and tunes the TCP keepalive parameters at a per-connection level.
  • Intelligent Client Connection establishment feature reduces the priority of connection attempts to unresponsive nodes in the address string of connect descriptors. No configuration changes are required to use this feature.
  • Incident Generation for Process Failures for the following Oracle Net Services components has been added:
    • Oracle Net Listener
    • Listener control utility (LSNRCTL)
    • Connection Manager Administration (CMADMIN)
    • Oracle Connection Manager gateway (CMGW)
What's New in Oracle Database 11gR1 & 11gR2

The new features for Net Services in Oracle Database 11g Release 2 include:

  • Internet Protocol Version 6 (IPv6) Addressing and Connectivity for single-instance database (please refer the IPv6 Statement of Direction below for more information)
  • Oracle Restart in single instance environment for restarting the listener, the database and other Oracle components following hardware/software failure or host restart.
  • Support for CONNECT_TIMEOUT and TRANSPORT_CONNECT_TIMEOUT for each IP address
  • CIDR notation and wildcard support for valid node checking
  • The new features for Net Services in Oracle Database 11g Release 1 include:
    • Support for authenticated LDAP access for Net Naming
    • Performance Improvements
    • Fastpath for common usage scenarios, enforced transparently (no configuration required)
    • Efficient network support for bulk/large data transfers (such as, SecureFile LOBs)
    • Efficient event dispatch mechanisms for PHP and process-based systems (enforced transparently, no config. required)
    • Fast Reconnects for High Availability: efficient detection of terminated instances and conect time failover
    • Support for Database Resident Connection Pool
    • Enhancements to the Easy Connect Naming method

For more details see the Oracle Database Net Services Administrator's Guide

Technical Information

Oracle OpenWorld

Oracle Database 12c

Oracle Database 11gR2

Oracle Database 11gR1

Oracle Database 10g

Oracle Database 9i

Switch Insert to temp Segment Merge

Tom Kyte - Tue, 2018-12-11 20:06
Hi, some of our parallel direct path insert Statements suffer from enq: HV contention. These are big, straight forward inserts. Contention can be up to 60% of the db time. We did some tests and realized that temp Segment merge would get rid of t...
Categories: DBA Blogs

Oracle client 12.1 with the new OracleCredential class

Tom Kyte - Tue, 2018-12-11 20:06
Our SW includes component that uses ODP.NET, we upgraded ODP.NET to 18c to benefit from the new <i>OracleCredential</i> class. Problem: According to the Oracle.NET team, ODP.NET 18c would support only 18c clients, yet, we still need to support oth...
Categories: DBA Blogs

Most effective way to Delete large number of rows from an online table on a daily basis

Tom Kyte - Tue, 2018-12-11 20:06
I have a need to write a cleanup script that would delete old data (1-2 Million rows) based on a date on a daily basis. Almost equal amount of rows are inserted into the same table daily as well. Any suggestions on the most efficient way of doing th...
Categories: DBA Blogs

Dynamic sort order

Tom Kyte - Tue, 2018-12-11 20:06
Hi, Query 1: SELECT * FROM (SELECT 10 a,20 b FROM dual UNION SELECT 50,30 FROM dual) ORDER BY CASE 1 WHEN 1 THEN a ELSE b END DESC; output: A B ------ 50 30 10 20 Query 2: SELECT * FROM (SELEC...
Categories: DBA Blogs

ODPI-C: A Light Weight Driver for Oracle Database

Christopher Jones - Tue, 2018-12-11 18:52

This is a guest post by Oracle’s Vaddeti Karthik Raju, a contributor to the ODPI-C project.

What is ODPI-C ?

Oracle Database Programming Interface for C (ODPI-C) is an open source library of C code that simplifies the use of common Oracle Call Interface (OCI) features for Oracle Database drivers and user applications which are written in C or C++. It is a wrapper over Oracle Call Interface (OCI) that makes applications and language interfaces easier to develop.

For complete details of ODPI-C, visit the homepage. Here you can find a list of all its powerful features, links to the source code, the documentation, and some samples.

Why ODPI-C ?

Since ODPI-C is a wrapper on top of OCI and exposes common OCI functionality, why use ODPI-C? Though OCI is highly efficient and flexible, it requires a lot of code and technical skill to use well. ODPI-C reduces the amount of code and the skill level required, which is particularly useful for language driver creators. Thus it reduces the amount of time required for a developer to implement new Oracle features in a particular language or application.

User applications and language drivers have been written in ODPI-C. Drivers currently using ODPI-C include:

Oracle Drivers

  • cx_Oracle Python interface

  • node-oracledb Node.js module

Third-party Drivers

  • go-goracle Go Driver

  • mirmir Rust Bindings

  • odpic-raw Haskell Raw Bindings

  • ruby-ODPI Ruby Interface

  • rust-oracle Driver for Rust

Common setup

Let us go through few example programs which demonstrates how to perform operations in ODPI-C.

For installation of ODPI-C, visit the installation instructions. In summary, the supplied Makefile or Makefile.win32 can be used to build a shared library, which can be linked with samples and tests. Once the library has been built, locate the directory it is in and add the directory name to your system library search path, e.g. PATH on Windows or LD_LIBRARY_PATH on Linux. You'll also need some Oracle client libraries, such as from the Oracle Instant Client "Basic" package.

Before going further, create the database objects using the below code. Here I am using database credentials scott/tiger@localhost/orclpdb:

$ sqlplus scott/tiger@localhost/orclpdb create table TestTable ( IntCol number(9) not null, StringCol varchar2(100) );

Include the below headers, defines and printError( ) function for all the programs shown in this blog post: this code is common for all programs. Make sure that you connect to the same schema where you created the table.

#include <dpi.h> #include <stdlib.h> #include <stdio.h> #include <string.h> #define USER "scott" #define PASSWORD "tiger" #define CONNECT_STRING "localhost/orclpdb" static dpiContext *gContext = NULL; static dpiErrorInfo gErrorInfo; //----------------------------------------------------------------------------- // printError() // Prints the error message. The error is first fetched // from the global DPI context. //----------------------------------------------------------------------------- int printError(void) { if (gContext) dpiContext_getError(gContext, &gErrorInfo); fprintf(stderr, " [FAILED]\n"); fprintf(stderr, " FN: %s\n", gErrorInfo.fnName); fprintf(stderr, " ACTION: %s\n", gErrorInfo.action); fprintf(stderr, " MSG: %.*s\n", gErrorInfo.messageLength, gErrorInfo.message); fflush(stderr); return DPI_FAILURE; } Inserting

The program insert.c shows how to perform simple insert operation that adds couple of records to the table.

// insert.c int main() { const char *insertSql = "insert into TestTable values (:1, :2)"; dpiData intColValue, stringColValue; dpiConn *conn; dpiStmt *stmt; // create context if (dpiContext_create(DPI_MAJOR_VERSION, DPI_MINOR_VERSION, &gContext, &gErrorInfo) < 0) return printError(); // create connection if (dpiConn_create(gContext, USER, strlen(USER), PASSWORD, strlen(PASSWORD), CONNECT_STRING, strlen(CONNECT_STRING), NULL, NULL, &conn) < 0) return printError(); // prepare insert statement for execution if (dpiConn_prepareStmt(conn, 0, insertSql, strlen(insertSql), NULL, 0, &stmt) < 0) return printError(); // create first row dpiData_setInt64(&intColValue, 1); if (dpiStmt_bindValueByPos(stmt, 1, DPI_NATIVE_TYPE_INT64, &intColValue) < 0) return printError(); dpiData_setBytes(&stringColValue, "Test data 1", strlen("Test data 1")); if (dpiStmt_bindValueByPos(stmt, 2, DPI_NATIVE_TYPE_BYTES, &stringColValue) < 0) return printError(); if (dpiStmt_execute(stmt, DPI_MODE_EXEC_DEFAULT, NULL) < 0) return printError(); // create second row dpiData_setInt64(&intColValue, 2); if (dpiStmt_bindValueByPos(stmt, 1, DPI_NATIVE_TYPE_INT64, &intColValue) < 0) return printError(); dpiData_setBytes(&stringColValue, "Test data 2", strlen("Test data 2")); if (dpiStmt_bindValueByPos(stmt, 2, DPI_NATIVE_TYPE_BYTES, &stringColValue) < 0) return printError(); if (dpiStmt_execute(stmt, DPI_MODE_EXEC_DEFAULT, NULL) < 0) return printError(); // commit changes if (dpiConn_commit(conn) < 0) return printError(); // cleanup dpiStmt_release(stmt); dpiConn_release(conn); return DPI_SUCCESS; }

Remember to add the headers, defines and printError() to insert.c before compiling it. I recommend using the Makefile or Makefile.win32 from the samples directory to help you compile.

Let us walk through each function of the code:

  1. Create the ODPI-C context which is the first function that must be called in all ODPI-C applications (dpiContext_create()).

  2. Create a standalone connection to the database (dpiConn_create()).

  3. Prepare a statement for execution (dpiConn_prepareStmt()).

  4. Populate data in structures and bind it to the statement (dpiData_setInt64(), dpiData_setBytes(), dpiStmt_bindValueByPos()).

  5. Execute the statement (dpiStmt_execute()).

  6. Repeat steps 4 and 5 for the second row.

  7. Commit the data (dpiConn_commit()).

  8. Clean up (dpiStmt_release(), dpiConn_release()).

Inserting multiple records

In insert.c we saw how to insert single record at a time. If you want to insert multiple records into a table you can use the dpiStmt_executeMany() function. In insertmany.c we will add multiple records to the table more efficiently by using an array bind operation.

// insertmany.c int main() { const char *insertSql = "insert into TestTable values (:1, :2)"; dpiData *intData, *strData; uint32_t numRows = 5, i; dpiVar *intVar, *strVar; char buffer[100]; dpiConn *conn; dpiStmt *stmt; // create context if (dpiContext_create(DPI_MAJOR_VERSION, DPI_MINOR_VERSION, &gContext, &gErrorInfo) < 0) return printError(); // create connection if (dpiConn_create(gContext, USER, strlen(USER), PASSWORD, strlen(PASSWORD), CONNECT_STRING, strlen(CONNECT_STRING), NULL, NULL, &conn) < 0) return printError(); // prepare and bind insert statement if (dpiConn_prepareStmt(conn, 0, insertSql, strlen(insertSql), NULL, 0, &stmt) < 0) return printError(); if (dpiConn_newVar(conn, DPI_ORACLE_TYPE_NUMBER, DPI_NATIVE_TYPE_INT64, numRows, 0, 0, 0, NULL, &intVar, &intData) < 0) return printError(); if (dpiStmt_bindByPos(stmt, 1, intVar) < 0) return printError(); if (dpiConn_newVar(conn, DPI_ORACLE_TYPE_VARCHAR, DPI_NATIVE_TYPE_BYTES, numRows, 100, 1, 0, NULL, &strVar, &strData) < 0) return printError(); if (dpiStmt_bindByPos(stmt, 2, strVar) < 0) return printError(); // populate some dummy data for (i = 0; i < numRows; i++) { dpiData_setInt64(&intData[i], i + 1); sprintf(buffer, "Test data %d", i + 1); if (dpiVar_setFromBytes(strVar, i, buffer, strlen(buffer)) < 0) return printError(); } // perform execute many if (dpiStmt_executeMany(stmt, DPI_MODE_EXEC_DEFAULT, numRows) < 0) return printError(); // commit changes if (dpiConn_commit(conn) < 0) return printError(); // cleanup if (dpiVar_release(intVar) < 0) return printError(); if (dpiVar_release(strVar) < 0) return printError(); dpiStmt_release(stmt); dpiConn_release(conn); return DPI_SUCCESS; }

Let us walk through each function of the code:

  1. Create ODPI-C context which is the first function that must be called in all ODPI-C applications (dpiContext_create()).

  2. Create standalone connection to the database (dpiConn_create()).

  3. Prepare statement for execution (dpiConn_prepareStmt()).

  4. Create variables and bind them to the statement by position. (dpiConn_newVar(), dpiStmt_bindByPos()).

  5. Populate data into bound variables (dpiData_setInt64(), dpiVar_setFromBytes()).

  6. Execute the statement by specifying the number of times (dpiStmt_executeMany()).

  7. Commit the data (dpiConn_commit()).

  8. Clean up (dpiVar_release(), dpiStmt_release(), dpiConn_release()).

Fetching

So far we have seen how to insert data into a table. In the following program we will see how to fetch records from the table. In order to make sure some records exist in the table run insertmany before running fetch.

// fetch.c int main() { const char *selectSql = "select IntCol, StringCol from TestTable"; dpiData *intColValue, *stringColValue; dpiNativeTypeNum nativeTypeNum; uint32_t bufferRowIndex; dpiConn *conn; dpiStmt *stmt; int found; // create context if (dpiContext_create(DPI_MAJOR_VERSION, DPI_MINOR_VERSION, &gContext, &gErrorInfo) < 0) return printError(); // create connection if (dpiConn_create(gContext, USER, strlen(USER), PASSWORD, strlen(PASSWORD), CONNECT_STRING, strlen(CONNECT_STRING), NULL, NULL, &conn) < 0) return printError(); // prepare select statement if (dpiConn_prepareStmt(conn, 0, selectSql, strlen(selectSql), NULL, 0, &stmt) < 0) return printError(); if (dpiStmt_execute(stmt, DPI_MODE_EXEC_DEFAULT, NULL) < 0) return printError(); // fetch rows while (1) { if (dpiStmt_fetch(stmt, &found, &bufferRowIndex) < 0) return printError(); if (!found) break; if (dpiStmt_getQueryValue(stmt, 1, &nativeTypeNum, &intColValue) < 0) return printError(); if (dpiStmt_getQueryValue(stmt, 2, &nativeTypeNum, &stringColValue) < 0) return printError(); printf("Int = %ld String = '%.*s'\n", intColValue->value.asInt64, stringColValue->value.asBytes.length, stringColValue->value.asBytes.ptr); } // cleanup dpiStmt_release(stmt); dpiConn_release(conn); return DPI_SUCCESS; }

When I run the program, the output is:

Int = 1 String = 'Test data 1' Int = 2 String = 'Test data 2' Int = 3 String = 'Test data 3' Int = 4 String = 'Test data 4' Int = 5 String = 'Test data 5'

Let us walk through each function of the code:

  1. Create ODPI-C context which is the first function that must be called in all ODPI-C applications (dpiContext_create()).

  2. Create standalone connection to the database (dpiConn_create()).

  3. Prepare statement for execution (dpiConn_prepareStmt()).

  4. Execute the statement (dpiStmt_execute()).

  5. Fetch the row and get column values (dpiStmt_fetch(), dpiStmt_getQueryValue()).

  6. Clean up (dpiStmt_release(), dpiConn_release()).

Scrolling

In the above example rows are retrieved in order from the statement until the rows are exhausted.

Now let us see an example on how to scroll between rows using the dpiStmt_scroll() function. To make sure some records exist in the table, run insertmany before running this program.

// scroll.c int main() { const char *sql = "select IntCol from TestTable order by IntCol"; dpiNativeTypeNum nativeTypeNum; uint32_t numQueryColumns; uint32_t bufferRowIndex; dpiData *data; dpiStmt *stmt; dpiConn *conn; int found; // create context if (dpiContext_create(DPI_MAJOR_VERSION, DPI_MINOR_VERSION, &gContext, &gErrorInfo) < 0) return printError(); // create connection if (dpiConn_create(gContext, USER, strlen(USER), PASSWORD, strlen(PASSWORD), CONNECT_STRING, strlen(CONNECT_STRING), NULL, NULL, &conn) < 0) return printError(); // prepare select statement if (dpiConn_prepareStmt(conn, 1, sql, strlen(sql), NULL, 0, &stmt) < 0) return printError(); // number of rows fetched from the database if (dpiStmt_setFetchArraySize(stmt, 5) < 0) return printError(); if (dpiStmt_execute(stmt, DPI_MODE_EXEC_DEFAULT, &numQueryColumns) < 0) return printError(); // set the relative position to scroll if (dpiStmt_scroll(stmt, DPI_MODE_FETCH_RELATIVE, 4, 0) < 0) return printError(); // fetch the row if (dpiStmt_fetch(stmt, &found, &bufferRowIndex) < 0) return printError(); if (dpiStmt_getQueryValue(stmt, 1, &nativeTypeNum, &data) < 0) return printError(); printf("\nIntCol = %ld\n", data->value.asInt64); // cleanup dpiStmt_release(stmt); dpiConn_release(conn); return DPI_SUCCESS; }

When I run scroll the output is:

IntCol = 5

Let us walk through each function of the code:

  1. Create ODPI-C context which is the first function that must be called in all ODPI-C applications (dpiContext_create()).

  2. Create standalone connection to the database (dpiConn_create()).

  3. Prepare statement for execution (dpiConn_prepareStmt()).

  4. Set the fetch array size (dpiStmt_setFetchArraySize()).

  5. Execute the statement (dpiStmt_execute()).

  6. Scroll the statement to the specified position (dpiStmt_scroll()).

  7. Fetch the row and get column value (dpiStmt_fetch(), dpiStmt_getQueryValue()).

  8. Clean up (dpiStmt_release(), dpiConn_release()).

Wrap up

ODPI-C has a number of advanced features letting you create powerful applications.

For more ODPI-C tests and samples visit the tests and samples directories.

For complete documentation details visit the ODPI-C documentation page.

If you have questions, feel free to contact us on GitHub.

Vaddeti Karthik Raju is a Senior Member Technical Staff for Oracle Bengaluru. He contributes to a number of projects, including ODPI-C.

AWS: Accessing S3 buckets from the internet and from ec2 instances

Dietrich Schroff - Tue, 2018-12-11 15:02
After reading about endpoints for AWS S3 i was wondering how i can use this feature.

First step was to create a bucket and just tried to access this bucket over the internet:

$ aws s3api create-bucket --bucket my.webtest --region eu-west-1 --create-bucket-configuration LocationConstraint=eu-west-1
{
    "Location": "http://my.webtest.s3.amazonaws.com/"
}
And the i put this location into my browser:


This is like expected, because i did not allow public access for this bucket:


Ok. Let's try this from an EC2 instance:
$ wget http://my.webtest.s3.amazonaws.com/
--2018-12-04 20:09:47--  http://my.webtest.s3.amazonaws.com/
Auflösen des Hostnamen »my.webtest.s3.amazonaws.com (my.webtest.s3.amazonaws.com)«... 52.216.107.108
Verbindungsaufbau zu my.webtest.s3.amazonaws.com (my.webtest.s3.amazonaws.com)|52.216.107.108|:80... verbunden.
HTTP-Anforderung gesendet, warte auf Antwort... 307 Temporary Redirect
Platz: http://my.webtest.s3-eu-west-1.amazonaws.com/[folge]
--2018-12-04 20:09:47--  http://my.webtest.s3-eu-west-1.amazonaws.com/
Auflösen des Hostnamen »my.webtest.s3-eu-west-1.amazonaws.com (my.webtest.s3-eu-west-1.amazonaws.com)«... 52.218.96.155
Verbindungsaufbau zu my.webtest.s3-eu-west-1.amazonaws.com (my.webtest.s3-eu-west-1.amazonaws.com)|52.218.96.155|:80... verbunden.
HTTP-Anforderung gesendet, warte auf Antwort... 403 Forbidden
2018-12-04 20:09:47 FEHLER 403: Forbidden.
This was not like expected, but how should my bucket know, that this access was from an EC2 instance beloging to the same AWS account.

Let's try to access the bucket with aws cli:
$ aws s3 ls
Unable to locate credentials. You can configure credentials by running "aws configure".
To get this working you have to add an IAM role to your EC2 instance. So let's create a new role:
 choose ec2:
and AmazonS3FullAccess:
Move on (without configuring tags)

 And then attach this role to your EC2 instance:

 and choose your new "AccessToS3Role":

After that the aws cli works like expected:
[ec2-user@ip-172-31-2-99 ~]$ aws s3 ls
2018-12-04 20:02:11 my.webtest
[ec2-user@ip-172-31-2-99 ~]$ aws s3 ls my.webtest
2018-12-04 20:23:12        130 website.json
But still no access via wget possible. This is because the aws cli uses the Amazon API to access the keys which come with the IAM role attached to the ec2 instance. The wget does not know anything about these keys.

Date Format Handling in Oracle JET

Andrejus Baranovski - Tue, 2018-12-11 14:58
Oracle JET comes with out of the box support for date converter, check more about it in cookbook - Date Converter. This makes it very handy to format dates in JavaScript. Here is date picker field example with yyyy-MM-dd format applied:


When button Process is pressed, I take date value from date picker and add one day - result is printed in the log. This is just to test simple date operation in JavaScript.

Date picker is defined by JET tag. Format is assigned through converter property:


Current date is displayed from observable variable. This variable is initialized from current date converted to local ISO. Converter is configured with pattern. In the JS method, where tomorrow date is calculated - make sure to convert from ISO local date:


Hope this simple example helps you to work with dates in Oracle JET application. Source code is available on my GitHub directory.

Announcing Oracle Functions

OTN TechBlog - Tue, 2018-12-11 12:57

Photo by Tim Easley on Unsplash

[First posted on the Oracle Cloud Infrastructure Blog]

At KubeCon 2018 in Seattle Oracle announced Oracle Functions, a new cloud service that enables enterprises to build and run serverless applications in the cloud. 

Oracle Functions is a serverless platform that makes it easy for developers to write and deploy code without having to worry about provisioning or managing compute and network infrastructure. Oracle Functions manages all the underlying infrastructure automatically and scales it elastically to service incoming requests.  Developers can focus on writing code that delivers business value.

Pay-per-use

Serverless functions change the economic model of cloud computing as customers are only charged for the resources used while a function is running.  There’s no charge for idle time! This is unlike the traditional approach of deploying code to a user provisioned and managed virtual machine or container that is typically running 24x7 and which must be paid for even when it’s idle.  Pay-per-use makes Oracle Functions an ideal platform for intermittent workloads or workloads with spiky usage patterns. 

Open Source

Open source has changed the way businesses build software and the same is true for Oracle. Rather than building yet another proprietary cloud functions platform, Oracle chose to invest in the Apache 2.0 licensed open source Fn Project and build Oracle Functions on Fn. With this approach, code written for Oracle Functions will run on any Fn server.  Functions can be deployed to Oracle Functions or to a customer managed Fn cluster on-prem or even on another cloud platform.  That said, the advantage of Oracle Functions is that it’s a serverless offering which eliminates the need for customers to manually manage an Fn cluster or the underlying compute infrastructure. But thanks to open source Fn, customers will always have the choice to deploy their functions to whatever platform offers the best price and performance. We’re confident that platform will be Oracle Functions.

Container Native

Unlike most other functions platforms, Oracle Functions is container native with functions packaged as Docker container images.  This approach supports a highly productive developer experience for new users while allowing power users to fully customize their function runtime environment, including installing any required native libraries.  The broad Docker ecosystem and the flexibility it offers lets developers focus on solving business problems and not on figuring out how to hack around restrictions frequently encountered on proprietary cloud function platforms. 

As functions are deployed as Docker containers, Oracle Functions is seamlessly integrated with the Docker Registry v2 compliant Oracle Cloud Infrastructure Registry (OCIR) which is used to store function container images.  Like Oracle Functions, OCIR is also both serverless and pay-per-use.  You simply build a function and push the container images to OCIR which charges just for the resources used.

Secure

Security is the top priority for Oracle Cloud services and Oracle Functions is no different. All access to functions deployed on Oracle Functions is controlled through Oracle Identity and Access Management (IAM) which allows both function management and function invocation privileges to be assigned to specific users and user groups.  And once deployed, functions themselves may only access resources on VCNs in their compartment that they have been explicitly granted access to.  Secure access is also the default for function container images stored in OCIR.  Oracle Functions works with OCIR private registries to ensure that only authorized users are able to access and deploy function containers.  In each of these cases, Oracle Function takes a “secure by default” approach while providing customers full control over their function assets.  

Getting Started

Oracle Functions will be generally available in 2019 but we are currently providing access to selected customers through our Cloud Native Limited Availability Program. To learn more about Oracle Functions or to request access, please let us know by registering with this form.  You can also learn more about the underlying open source technology used in Oracle Function at FnProject.io.

Announcing Oracle Cloud Native Framework at KubeCon North America 2018

OTN TechBlog - Tue, 2018-12-11 12:00

This blog was originally published at https://blogs.oracle.com/cloudnative/

At KubeCon + CloudNativeCon North America 2018, Oracle has announced the Oracle Cloud Native Framework - an inclusive, sustainable, and open cloud native development solution with deployment models for public cloud, on premises, and hybrid cloud. The Oracle Cloud Native Framework is composed of the recently-announced Oracle Linux Cloud Native Environment and a rich set of new Oracle Cloud Infrastructure cloud native services including Oracle Functions, an industry-first, open serverless solution available as a managed cloud service based on the open source Fn Project.

With this announcement, Oracle is the only major cloud provider to deliver and support a unified cloud native solution across managed cloud services and on-premises software, for public cloud (Oracle Cloud Infrastructure), hybrid cloud and on-premises users, supporting seamless, bi-directional portability of cloud native applications built anywhere on the framework.  Since the framework is based on open, CNCF certified, conformant standards it will not lock you in - applications built on the Oracle Cloud Native Framework are portable to any Kubernetes conformant environment – on any cloud or infrastructure

Oracle Cloud Native Framework – What is It?

The Oracle Cloud Native Framework provides a supported solution of Oracle Cloud Infrastructure cloud services and Oracle Linux on-premises software based on open, community-driven CNCF projects. These are built on an open, Kubernetes foundation – among the first K8s products released and certified last year. Six new Oracle Cloud Infrastructure cloud native services are being announced as part of this solution and build on the existing Oracle Container Engine for Kubernetes (OKE), Oracle Cloud Infrastructure Registry, and Oracle Container Pipelines services.

Cloud Native at a Crossroads – Amazing Progress

We should all pause and consider how far the cloud native ecosystem has come – evidenced by the scale, excitement, and buzz around the sold-out KubeCon conference this week and the success and strong foundation that Kubernetes has delivered! We are living in a golden age for developers – a literal "First Wave" of cloud native deployment and technology - being shaped by three forces coming together and creating massive potential:

  • Culture: The DevOps culture has fundamentally changed the way we develop and deploy software and how we work together in application development teams. With almost a decade’s worth of work and metrics to support the methodologies and cultural shifts, it has resulted in many related off-shoots, alternatives, and derivatives including SRE, DevSecOps, AIOps, GitOps, and NoOps (the list will go on no doubt).

  • Code: Open source and the projects that have been battle tested and spun out of webscale organizations like Netflix, Google, Uber, Facebook, and Twitter have been democratized under the umbrella of organizations like CNCF (Cloud Native Computing Foundation). This grants the same access and opportunities to citizen developers playing or learning at home, as it does to enterprise developers in the largest of orgs.

  • Cloud: Unprecedented compute, network, and storage are available in today’s cloud – and that power continues to grow with a never-ending explosion in scale, from bare metal to GPUs and beyond. This unlocks new applications for developers in areas such as HPC apps, Big Data, AI, blockchain, and more. 

Cloud Native at a Crossroads – Critical Challenges Ahead

Despite all the progress, we are facing new challenges to reach beyond these first wave successes. Many developers and teams are being left behind as the culture changes. Open source offers thousands of new choices and options, which on the surface create more complexity than a closed, proprietary path where everything is pre-decided for the developer. The rush towards a single source cloud model has left many with cloud lock-in issues, resulting in diminished choices and rising costs – the opposite of what open source and cloud are supposed to provide.

The challenges below mirror the positive forces above and are reflected in the August 2018 CNCF survey:

  • Cultural Change for Developers: on premises, traditional development teams are being left behind. Cultural change is slow and hard.

  • Complexity: too many choices, too hard to do yourself (maintain, administer), too much too soon?

  • Cloud Lock-in: proprietary single-source clouds can lock you in with closed APIs, services, and non-portable solutions.

The Cloud Native Second Wave – Inclusive, Sustainable, Open

What’s needed is a different approach:

  • Inclusive: can include cloud and on-prem, modern and traditional, dev and ops, startups and enterprises

  • Sustainable: managed services versus DIY, open but curated, supported, enterprise grade infrastructure

  • Open: truly open, community-driven, and not based on proprietary tech or self-serving OSS extensions

Introducing the Oracle Cloud Native Framework – What’s New?

The Oracle Cloud Native Framework spans public cloud, on-premises, and hybrid cloud deployment models – offering choice and uniquely meeting the broad deployment needs of developers. It includes Oracle Cloud Infrastructure Cloud Native Services and the Oracle Linux Cloud Native Environment. On top of the existing Oracle Container Engine for Kubernetes (OKE), Oracle Cloud Infrastructure Registry, and Oracle Container Pipelines services, a rich set of new Oracle Cloud Infrastructure cloud native services has been announced with services across provisioning, application definition and development, and observability and analysis.

 

  • Application Definition and Development

    • Oracle Functions: A fully managed, highly scalable, on-demand, functions-as-a-service (FaaS) platform, built on enterprise-grade Oracle Cloud Infrastructure and powered by the open source Fn Project. Multi-tenant and container native, Oracle Functions lets developers focus on writing code to meet business needs without having to manage or even address the underlying infrastructure. Users only pay for execution, not for idle time.

    • Streaming: Enables applications such as supply chain, security, and IoT to collect from many sources and process in real-time. Streaming is a highly available, scalable and multi-tenant platform that makes it easy to collect and manage streaming data.

  • Provisioning

    • Resource Manager: A managed Oracle Cloud Infrastructure provisioning service based on industry standard Terraform. Infrastructure-as-code is a fundamental DevOps pattern, and Resource Manager is an indispensable tool to automate configuration and increases productivity by managing infrastructure declaratively.

  • Observation and Analysis

    • Monitoring: An integrated service that reports metrics from all resources and services in Oracle Cloud Infrastructure. Monitoring provides predefined metrics and dashboards, and also supports a service API to obtain a top-down view of the health, performance, and capacity of the system. The monitoring service includes alarms to track these metrics and act when they vary or exceed defined thresholds, helping users meet service level objectives and avoid interruptions.

    • Notification Service: A scalable service that broadcasts messages to distributed components, such as email and PagerDuty. Users can easily deliver messages about Oracle Cloud Infrastructure to large numbers of subscribers through a publish-subscribe pattern.

    • Events: Based on the CNCF Cloud Events standard, Events enables users to react to changes in the state of Oracle Cloud Infrastructure resources, both when initiated by the system or by user action. Events can store information to Object Storage, or they can trigger Functions to take actions, Notifications to inform users, or Streaming to update external services.

Use Cases for the Oracle Cloud Native Framework: Inclusive, Sustainable, Open

Inclusive: The Oracle Cloud Native Framework includes both cloud and on-prem, supports modern and traditional applications, supports both dev and ops, can be used by startups and enterprises. As an industry, we need to create more on-ramps to the cloud native freeway – in particular by reaching out to teams and technologies and connecting cloud native to what people know and work on every day. The WebLogic Server Operator for Kubernetes is a great example of just that. It enables existing WebLogic applications to easily integrate into and leverage Kubernetes cluster management. 

As another example, the Helidon project for Java creates a microservice architecture and framework for Java apps to move more quickly to cloud native.

Many Oracle Database customers are connecting cloud native applications based on Kubernetes for new web front-ends and AI/big data processing back-ends, and the combination of the Oracle Autonomous Database and OKE creates a new model for self-driving, securing, and repairing cloud native applications. For example, using Kubernetes service broker and service catalog technology, developers can simply connect Autonomous Transaction Processing applications into OKE services on Oracle Cloud Infrastructure.

 

Sustainable: The Oracle Cloud Native Framework provides a set of managed cloud services and supported on-premises solutions, open and curated, and built on an enterprise grade infrastructure. New open source projects are popping up every day and the rate of change of existing projects like Kubernetes is extraordinary. While the landscape grows, the industry and vendors must face the resultant challenge of complexity as enterprises and teams can only learn, change, and adopt so fast.

A unified framework helps reduce this complexity through curation and support. Managed cloud services are the secret weapon to reduce the administration, training, and learning curve issues enterprises have had to shoulder themselves. While a do-it-yourself approach has been their only choice up to recently, managed cloud services such as OKE give developers a chance to leapfrog into cloud native without a long and arduous learning curve.

A sustainable model – built on an open, enterprise grade infrastructure, gives enterprises a secure, performant platform from which to build real hybrid cloud deployments including these five key hybrid cloud use cases:

  1. Development and DevOps: Dev/test in the cloud, production on-prem

 

 

  1. Application Portability and Migration: enables bi-directional cloud native application portability (on-prem to cloud, cloud to on-prem) and lift and shift migrations.  The Oracle MySQL Operator for Kubernetes is an extremely popular solution that simplifies portability and integration of MySQL applications into cloud native tooling.  It enables creation and management of production-ready MySQL clusters based on a simple declarative configuration format including operational tasks such as database backups and restoring from an existing backup. The MySQL Operator simplifies running MySQL inside Kubernetes and enabling further application portability and migrations.

 

 

  1. HA/DR: Disaster recovery or high availability sites in cloud, production on-prem

  1. Workload-Specific Distribution: Choose where you want to run workloads, on-prem or cloud, based on specific workload type (e.g., based on latency, regulation, new vs. legacy)

  1. Intelligent Orchestration: More advanced hybrid use cases require more sophisticated distributed application intelligence and federation – these include cloud bursting and Kubernetes federation

 

  • Open: Over the course of the last few years, development teams have typically chosen to embrace a single-source cloud model to move fast and reduce complexity – in other words the quick and easy solution. The price they are paying now is cloud lock in resulting from proprietary services, closed APIs, and non-portable solutions. This is the exact opposite of where we are headed as an industry – fueled by open source, CNCF-based, and community-driven technologies.

 

An open ecosystem enables not only a hybrid cloud world but a truly multi-cloud world – and that is the vision that drives the Oracle Cloud Native Framework!

Oracle Arms Developers with the Most Comprehensive Cloud Native Framework

Oracle Press Releases - Tue, 2018-12-11 10:00
Press Release
Oracle Arms Developers with the Most Comprehensive Cloud Native Framework Oracle Cloud Native Framework provides deployment models for Oracle Cloud Infrastructure, hybrid cloud and on-premises users

KubeCon, Seattle, Was.—Dec 11, 2018

Oracle today announced the Oracle Cloud Native Framework, providing developers a cloud native solution that spans public cloud, on premises and hybrid cloud deployments. Capitalizing on Oracle Cloud Infrastructure and the recently announced Oracle Linux Cloud Native Environment, the Oracle Cloud Native Framework introduces a rich set of cloud native managed services and on-premises software. The Oracle Cloud Native Framework also introduces Oracle Functions, a new breakthrough serverless cloud service based on the open source Fn Project.

As organizations move to the cloud, they are facing new and difficult challenges addressing cultural change and increased complexity. DevOps and cloud native tooling have left many developers and projects behind the curve. Moreover, organizations eager to use standard open source components and leverage cloud capabilities, but are impeded by the number of complex choices, lack of training and fear of cloud vendor lock-in. By providing cloud native capabilities and offerings regardless of the deployment scenario and leveraging open standards established by the Cloud Native Computing Foundation (CNCF), Oracle, a platinum member of CNCF, is uniquely providing its customers with choice while meeting the broad deployment needs of developers.

“With the growing popularity of the CNCF as a unifying and organizing force in the cloud native ecosystem and organizations increasingly embracing multi cloud and hybrid cloud models, developers should have the flexibility to build and deploy their applications anywhere they choose without the threat of cloud vendor lock-in. Oracle is making this a reality,” said Don Johnson, executive vice president, product development, Oracle Cloud Infrastructure.

To further enable developers to build and deploy modern applications, Oracle is introducing a rich set of first class Oracle Cloud Infrastructure services built on Oracle’s Gen 2 Cloud IaaS and existing foundational Kubernetes orchestration and management layer, the Oracle Container Engine for Kubernetes (OKE). These new offerings are focused on three critical Oracle Cloud Infrastructure cloud native layers:

  • Application Definition & Development

    • Oracle Functions: Scalable, multi-tenant serverless functions that let users focus on writing code to meet business needs without having to know about any infrastructure concepts. Users only pay when a function is invoked, but pay nothing when the code is not running.
    • Streaming: A highly available, scalable and multi-tenant streaming platform that makes it easy to collect and manage streaming data. Streaming enables applications such as IoT, security and supply chain, where large amounts of data are collected from many sources and need to be processed in real time.
  • Provisioning

    • Resource Manager: A managed service that can provision all Oracle Cloud Infrastructure resources and services. Resource Manager reduces configuration errors and increases productivity by managing infrastructure declaratively (i.e. “infrastructure as code”) using industry standard Terraform.
  • Observability & Analysis

    • Monitoring: An integrated service that reports metrics from all resources and services in Oracle Cloud Infrastructure. Use predefined metrics and dashboards, or use the service API to obtain a wholistic view of the health, performance, and capacity of the system. The monitoring service includes alarms to track these metrics and take action when they vary or exceed defined thresholds. Alarms provide a critical service to help users meet service level objectives and avoid interruptions.
    • Notification Service: A scalable service that broadcasts messages to distributed components, such as email and PagerDuty. With the notification service, users can easily deliver messages about Oracle Cloud Infrastructure to large numbers of subscribers through a publish-subscribe pattern.
    • Events: An offering that enables users to react to changes in the state of Oracle Cloud Infrastructure resources, both when initiated by the system or by user action. Events can store information to Object Storage, or they can trigger Functions to take actions, Notifications to inform users, or Streaming to update external services.

With the announcement of Oracle Functions, a new breakthrough serverless solution based on the open source Fn Project, developers can easily deploy and execute function-based applications without the need to manage compute infrastructure. Oracle Functions is Docker container-based and completely pay-per-use, so charges are incurred only when functions are run. The underlying Fn Project, which Oracle Functions offers as a fully-managed service, can run on-premises, in a data center, or on any cloud. The Oracle Cloud Native Framework supports both modern (cloud native) and traditional (WebLogic, Java, and database) applications. The enterprise grade platform can be leveraged for sustainable strategy, managed services, and curated OSS.

  • "Kubernetes and containers are enabling CERN to improve the deployment of critical Java Applications to reduce maintenance tasks and focus more on developers' needs, including improving their experience with Oracle WebLogic Server. In this context, Oracle has provided us with an open source tool that has helped us decrease considerably the time needed to configure WebLogic. We are also working to take advantage of Oracle Cloud Infrastructure and its Kubernetes offering to replace our disaster recovery solution for our databases and WebLogic," said Antonio Nappi, DevOps Engineer for CERN.
     
    “Our business relies on delivering innovative software solutions to a global market. Oracle Container Engine for Kubernetes on Oracle Cloud Infrastructure has helped us not only converge data centers and add scale, but also significantly improve performance and security as we adopt a microservices architecture. It’s actually been the simplest part of our migration,” said Jason Looney, vice president of Enterprise Architecture, Beeline.
     
    “Sauce is a video collaboration and creation platform for teams, empowering brands to create authentic video content. Oracle Container Engine for Kubernetes on Oracle Cloud Infrastructure has helped us scale our cloud technology, supporting our global growth while increasing reliability and performance, especially in the areas of video transcoding and creation. Getting started on Oracle Container Engine for Kubernetes was a breeze and now our team can develop and deploy faster than ever,” said Jon Girven, co-founder and CTO of Sauce Video. 
     
    “Gapsquare is a cloud-based SaaS solution that helps large companies maintain continuous fair pay by closing the gender pay gap, ethnicity pay gap, and any equal pay issues. By moving to the Oracle Cloud completely, we have been able to reduce time spent on DevOps and focus on implementing new features. We found Oracle Container Engine for Kubernetes to be the easiest way to reliably deploy our application on a scalable and distributed environment, while continuing to deliver new automatic features that require no maintenance. This has allowed us to speed time to market for new offerings and rapidly expand globally,” said Zara Nanu, CEO of Gapsquare, and a member of Oracle's global startup program.
Contact Info
Danielle Tarp
Oracle
+1.650.506.2905
danielle.tarp@oracle.com
Quentin Nolibois
Burson Cohn & Wolfe
+1 415.591.4097
quentin.nolibois@bm.com
About Oracle Cloud Infrastructure

Oracle Cloud Infrastructure is an enterprise Infrastructure as a Service (IaaS) platform. Companies of all sizes rely on Oracle Cloud to run enterprise and cloud native applications with mission-critical performance and core-to-edge security. By running both traditional and new workloads on a comprehensive cloud that includes compute, storage, networking, database, and containers, Oracle Cloud Infrastructure can dramatically increase operational efficiency and lower total cost of ownership. For more information, visit https://cloud.oracle.com/iaas

About Oracle

The Oracle Cloud offers complete SaaS application suites for ERP, HCM and CX, plus best-in-class database Platform as a Service (PaaS) and Infrastructure as a Service (IaaS) from data centers throughout the Americas, Europe and Asia. For more information about Oracle (NYSE:ORCL), please visit us at www.oracle.com.

Trademarks

Oracle and Java are registered trademarks of Oracle and/or its affiliates. Other names may be trademarks of their respective owners.

Talk to a Press Contact

Danielle Tarp

  • +1.650.506.2905

Quentin Nolibois

  • +1 415.591.4097

[BLOG] Oracle Cloud Infrastructure Architect Associate (1Z0-932) | DbaasCli Utility

Online Apps DBA - Tue, 2018-12-11 06:02

Are you preparing for 1Z0-932 Certification and want to clear your concepts on some important topics that are covered in the 1z0-932 exam? If yes, then visit: https://k21academy.com/oci24 and learn about the capabilities of DBaaSCli Utility in detail with the help of Q&A & much more… Are you preparing for 1Z0-932 Certification and want to […]

The post [BLOG] Oracle Cloud Infrastructure Architect Associate (1Z0-932) | DbaasCli Utility appeared first on Oracle Trainings for Apps & Fusion DBA.

Categories: APPS Blogs

Pages

Subscribe to Oracle FAQ aggregator