[ 설치환경 ]

- Microsoft Windows 10 Pro(10.0.19041 N/A 빌드 19041)

- VSCode (1.57.1)

- Python 3.9.9

 

VSCode는 Python을 내장하고있지 않으므로 Python을 VSCode에서 사용하려면, Python  설치하고 연동해주어야 한다.

1. Visual Studio Code 설치하기

공식 홈페이지로 접속( code.visualstudio.com) 하여 OS(Window, Linux, macOS)에 맞는 파일을 다운로드 한 후 설치한다.

 

참고) 한글 설정

기본적으로 VSCode는 영문버전으로 되어 있다. 아래와 같이 한글 설정이 가능하다.

1) 왼쪽 하단의 익스텐션 아이콘 클릭 (단축키 : Ctrl + Shift + x)

2) 검색창에 "korean" 입력

3) 목록 중 "korean language pack for visual studio code" 의 우측 "Install" 클릭

4) 설치 완료 후 "Restart Now" 클릭

2. Python 설치하기

Windows를 이용하는 경우

Windows는 기본적으로 Python을 제공하지 않으므로 직접 설치해주어야 한다. 아래와 같은 방법으로 설치할 수 있다.

 

2.1 파일 다운로드 및 설치

파이썬 홈페이지(www.python.org)에 접속하여 설치 프로그램을 다운로드 한 후 설치한다. 

 

2.2 winget을 설치

Windows(Windows 10 및 Windows 11)용 패키지 관리자인 winget으로 파이썬을 설치한다.

이 도구는 Windows 패키지 관리자 서비스에 대한 클라이언트 인터페이스이다.

 

C:\> winget install python
 
2.3 chocolatey 로 설치

Windows용 패키지 관리자인 Chocolatey(약칭: choco)로 파이썬을 설치한다.

C:\> choco install python -y

 

Linux를 이용하는 경우

Linux는 기본적으로 Python이 설치되어 있으나, Python 2.x 대 버전이 설치되어 있을 경우 최신 버전으로 Upgrade한다.

이는 chocolatey를 통해 쉽게 설치할 수 있습니다.

# Ubutu, Debian
$ apt-get install python -y

# Redhat, CentOS
$ yum install python -y

3. Visual Studio Code에 Python 설정하기

Extension 설치

몇 글자만 타이핑 하면 자동으로 명령어를 선택할 수 있게 보여준다던가, 소스코드 작성 중에 어느 부분이 문제가 되는 사전에 문제점을 체크해 준다던지와 같은 기능이 추가되고 Jupyter notebook 지원기능 등 파이썬 코딩을 조금 더 개발자 입장에서 편하게 하기 위한 기능이다.

촤측의 Extensions 메뉴(창 모양)를 클릭하거나, 단축키(Ctrl+Shift+X)를 사용한다. 상단의 검색창에 Python을 입력한 후, 검색된 Extension 중  Python, Python for VSCode, Python Extension Pack을 [install] 버튼을 클릭하여 설치한다.

 

4. 작업 환경 생성

Python project를 저장할 새로운 폴더를 생성해준다.

예시) C:\Python\python_project  

[File] - [Open Folder] 메뉴를 클릭한 후 새로 만든 폴더를 선택해준다.

 

5. 코드 작성

[File] - [New File] 메뉴을 클릭하여 새로운 파일을 생성한 후 다음과 같이 코드를 입력한다.

print("Hello, World!")

[File]-[Save] 메뉴를 선택하거나 단축키(Ctrl + S)로 파일을 hello.py라는 이름의 파일로 저장한다.

 

6. 코드 실행

[Run] - [Run Without Debugging] 메뉴을 클릭하거나 단축키(Ctrl + F5)로 코드를 수행한다.

하단의 TERMINAL 탭에 결과 값인 Hello, World 문자열이 출력된다.

 

 

'Python' 카테고리의 다른 글

Python __main__ 이란  (0) 2021.12.30
Introduction to Python  (0) 2021.12.28
pip package install SSL 인증서 Error 해결 (error: [SSL: CERTIFICATE_VERIFY_FAILED])  (0) 2021.12.17
NAVER 자동 로그인  (0) 2021.12.14
Python 자동 로그인  (0) 2021.12.13

 

Upload Data Files to Your Object Store

Upload to your cloud-based object store the data files that you want to load to your Autonomous Transaction Processing database. This tutorial uses an object store in the Oracle Cloud Infrastructure Object Storage service.

    1. Log in to your Oracle Cloud Infrastructure Console with the following credentials provided by your Oracle Cloud administrator: cloud tenant, user name, password.

Description of the illustration log_in_to_oci_object_storage_with_username_password

    1. Select Object Storage from the menu at the top left of the Oracle Cloud Infrastructure console. Select Object Storage from the sub-menu.

Description of the illustration select_object_storage

    1. Select a compartment in which to create a bucket to upload your database table data.

Description of the illustration select_a_compartment

    1. Click Create Bucket to create the storage bucket in which to upload your source files. You will later copy this staged data into tables in your Autonomous Transaction Processing database. 

Description of the illustration create_a_bucket

    1. Enter a bucket name, select the standard storage tier, and click Create Bucket.

Description of the illustration create_a_bucket_dialog

    1. Click Upload Object to begin selecting the data files to upload to the bucket.

Description of the illustration click_upload_object

    1. Navigate to the location of the data files on your local computer. Drag and drop each file individually or click Upload Object to upload each file individually.
      This example uploads the data files of the SH tables (sales history tables from an Oracle sample schema). Click here to download a zip file of the 10 SH data files for you to upload to the object store. Unzip the data files from the zip file, because zip files cannot be uploaded. Upload each unzipped data file individually.
      Note: Alternatively, you can use curl commands to upload large numbers of files.

Description of the illustration upload_data_files_to_bucket

    1. The data files are uploaded to the bucket. These files staged in the cloud are ready to be copied into the tables of your Autonomous Transaction Processing database. Remain logged in to Oracle Cloud Infrastructure Object Storage.

Description of the illustration uploaded_data_files_in_bucket

Create an Object Store Auth Token

To load data from an Oracle Cloud Infrastructure Object Storage object store, you need to create an Auth Token for your object store account. The communication between your Autonomous Transaction Processing database and the object store relies on the Auth Token and username/password authentication.

    1. If you have logged out of Oracle Cloud Infrastructure Object Storage, log back in with the following credentials provided by your Oracle Cloud administrator: cloud tenant, user name, password.
    2. Hover your mouse cursor over the human figure icon at the top right of the console and click User Settings from the drop-down menu.

Description of the illustration click_user_settings

    1. Click Auth Tokens under Resources on the left of the console.

Description of the illustration click_auth_tokens

    1. Click Generate Token.

Description of the illustration click_generate_token

    1. A pop-up dialog appears. Set the Auth Token by performing the following steps:
      1. In the pop-up dialog, enter a description.
      2. Click the Generate Token button.
      3. Copy the generated token to a text file. The token does not appear again.
      4. Click Close.

Description of the illustration enter_descriptions_and_click_generate_token

Description of the illustration copy_the_generated_token

Create Object Store Credentials in your Autonomous Transaction Processing Schema

Now that you have created an object store Auth Token, store in your Autonomous Transaction Processing atpc_user schema the credentials of the object store in which your data is staged.

    1. Open SQL Developer and connect to your Autonomous Transaction Processing database as user atpc_user. See the previous tutorial in this series, Connecting to SQL Developer and Creating Tables, for steps to connect SQL Developer to your Autonomous Transaction Processing database as atpc_user.
    2. In a SQL Developer worksheet, use the create_credential procedure of the DBMS_CLOUD package to store the object store credentials in your atpc_user schema.
      1. Create a credential name. You reference this credential name in the copy_data procedure in the next step.
      2. Specify the credentials for your Oracle Cloud Infrastructure Object Storage service: The username and the object store Auth Token you generated in the previous step.

        begin
        DBMS_CLOUD.create_credential (
        credential_name => 'OBJ_STORE_CRED',
        username => '<your username>',
        password => '<your Auth Token>'
        ) ;
        end;
        /

Description of the illustration create_credential_in_adwc_schema

After you run this script, your object store's credentials are stored in your Autonomous Transaction Processing atpc_user schema.

 

Copy Data from Object Store to Autonomous Transaction Processing Database Tables

The copy_data procedure of the DBMS_CLOUD package requires that target tables must already exist in in your Autonomous Transaction Processing database. In the previous tutorial in this series, Connecting SQL Developer and Creating Tables, you created in your Autonomous Transaction Processing atpc_user schema all of the target tables. 

Now run the copy_data procedure to copy the data staged in your object store to your Autonomous Transaction Processing atpc_user tables. 

  1. In a SQL Developer worksheet, use the copy_data procedure of the DBMS_CLOUD package to copy the data staged in your object store.
    • For credential_name, specify the name of the credential you defined in section 3, Create Object Store Credentials in your Autonomous Transaction Processing Schema. 
    • For file_uri_list, specify the URL that points to the location of the file staged in your object store. The URL is structured as follows. The values you specify are in bold:
      https://swiftobjectstorage.<region name>.oraclecloud.com/v1/<tenant name>/<bucket name>/<file name>
    • Click here for an example script. In the script, use your own table names, region name, tenant name, bucket name, and file names.
      Note: The region name, tenant name, and bucket name can all be found in one place by clicking the ellipsis option menu and going to file details.
      Note: If you receive an error message that your atpc_user does not have read/write privileges into the Object Store, you may need to properly set up your user privileges or contact your administrator to do so.
      Description of the illustration data_loading_script
ORA-20404: Object not found - https://swiftobjectstorage.us-ashburn-1.oraclecloud.com/v1/lgcnscorp/tutorial_load_atpc/ 
ORA-06512: "C##CLOUD$SERVICE.DBMS_CLOUD",  757행 
ORA-06512: "C##CLOUD$SERVICE.DBMS_CLOUD",  1879행 
ORA-06512:  1행 
  1. After you run the procedure, observe that the data has been copied from the object store to the tables in your Autonomous Transaction Processing database.
    Description of the illustration result_of_loading_table

 

All data load operations done using the PL/SQL package DBMS_CLOUD are logged in the tables dba_load_operations and user_load_operations. These tables contain the following:

  • dba_load_operations: shows all load operations.
  • user_load_operations: shows the load operations in your schema.
  1. Query these tables to see information about ongoing and completed data loads. For example:
    SELECT table_name, owner_name, type, status, start_time, update_time, logfile_table, badfile_table FROM user_load_operations WHERE type = 'COPY';
  2. Examine the results. The log and bad files are accessible as tables:
    TABLE_NAME STATUS ROWS_LOADED LOGFILE_TABLE   BADFILE_TABLE
    ---------- ------------ ----------- -------------   -------------
    CHANNELS FAILED COPY$1_LOG      COPY$1_BAD
    CHANNELS COMPLETED 5   COPY$2_LOG COPY$2_BAD

Next Tutorial 

Using Oracle Machine Learning with Autonomous Data Warehouse Cloud ServiceUsing Oracle Machine Learning with Autonomous Data Warehouse Cloud Service

 

Create a User in your Autonomous Transaction Processing Database

Once you have connected SQL Developer to your Autonomous Transaction Processing database, use a SQL Developer worksheet to define a create user statement to create the user atpc_user. In the next tutorial, you will create sales history tables in the atpc_user schema and load data into these tables from an object store.

  1. Open a SQL Developer worksheet and run the following SQL statements to create the user atpc_user, swapping in a password with the guidelines provided in the following Note section.
    create user atpc_user identified by "<password>";
    grant dwrole to atpc_user;


  2. Description of the illustration sql_developer_commands_create_atpc_userNote: Autonomous Transaction Processing requires strong passwords. The password you specify must meet the default password complexity rules. This database checks for the following requirements when you create or modify passwords:
    • The password must be between 12 and 30 characters long and must include at least one uppercase letter, one lowercase letter, and one numeric character.
    • The password cannot contain the username.
    • The password cannot be one of the last four passwords used for the same username.
    • The password cannot contain the double quote (") character

    Note: Autonomous Transaction Processing databases come with a pre-defined database role named DWROLE.

    This role provides the common privileges for a database user: CREATE ANALYTIC VIEW, CREATE ATTRIBUTE DIMENSION, ALTER SESSION, CREATE HIERARCHY, CREATE JOB, CREATE MINING MODEL, CREATE PROCEDURE, CREATE SEQUENCE, CREATE SESSION, CREATE SYNONYM, CREATE TABLE, CREATE TRIGGER, CREATE TYPE, CREATE VIEW, READ,WRITE ON directory DATA_PUMP_DIR, EXECUTE privilege on the PL/SQL package DBMS_CLOUD  

  3. In the next tutorial, "Connecting SQL Developer to Autonomous Transaction Processing", you will connect SQL Developer to your Autonomous Transaction Processing database as user atpc_user, and define SH tables(sales history tables from an Oracle sample schema) for that user. Later, you will load data into those tables from an Object Store.

Create SH Tables in your Autonomous Transaction Processing Database

After you have connected SQL Developer to your Autonomous Transaction Processing database, use a SQL Developer worksheet to define CREATE TABLE statements to create the SH tables (sales history tables from an Oracle sample schema) in the atpc_user schema. In the next tutorial, you will load data into these tables from an object store.  

  1. Copy and paste this code snippet to a SQL Developer worksheet.worksheet. Run the script to create the SH tables.
    Description of the illustration sql script to create sh tables

Examine the SH Tables that you Created

Now that you have created the SH tables, take a moment to examine them. In the next tutorial, you will load data into these tables from an object store.

  1. Note that the new tables also appear in the SQL Developer Connections panel. 
    Description of the illustration list of new tables in atpc_user  
  2. Examine the details of each column of the CHANNELS table.
    Description of the illustration details of the CHANNELS table
  3. Click the Data tab of the CHANNELS table. Note that so far, you have defined tables, but these tables are not yet populated with Data.
    Description of the illustration no data yet in CHANNELS table
  4. In the next tutorial, "Loading Your Data", you will load data from an object store into these SH tables.

 


 

 

Next Tutorial

Loading Your Data to Autonomous Transaction Processing  

Download the Credentials Zip File

Once you have created the database, download the credentials zip file for client access to that database. You will use this file in the next step, and in the next tutorial to connect SQL Developer to your Autonomous Transaction Processing database.

  1. In the console, in the details page of your new Autonomous Transaction Processing database, select DB Connection.
    Description of the illustration open_service_console
  2. The Database Connection dialog opens for downloading client credentials. For wallet type, select Instance Wallet.
    Note: Oracle recommends you download the database-specific wallet type, Instance Wallet, to provide to your end users and for application use whenever possible. The other wallet type, Regional wallet, should only be used for administrative purposes that require potential access to all Autonomous Databases within a region.
    Click Download Wallet.
    Description of the illustration database_connection_dialog
  3. In the Download Wallet dialog, enter an encryption password for the wallet, confirm the password, and then click Download.
    Description of the illustration download_wallet
  4. Click Save File, and then click OK.
  5. Store the zip file and make note of the password. You will use the zip file in the next step to define a SQL Developer connection to your Autonomous Transaction Processing database.

Define a SQL Developer Connection

Define a SQL Developer connection to the database in your Autonomous Transaction Processing service.

    1. Open SQL Developer on your local computer. In the Connections panel, right-click Connections and select New Connection.
      Note:
      Depending on your version of SQL Developer, do not right-click Cloud Connection or Database Schema Service Connections. That menu selection is for connecting to a different Oracle cloud service, the Oracle Database Schema Service.
      Description of the illustration select_new_connection
    2. The New/Select Database Connection dialog appears. Enter the following information:
      • Connection Name - Enter the name for this cloud connection.
      • Username - Enter the database username. Use the default administrator database account (admin) that is provided as part of the service.
      • Password - Enter the admin user's password that you or your Autonomous Transaction Processing administrator specified when creating the service instance.
      • Connection Type - Select Cloud Wallet.
      • Configuration File - Click Browse, and select the Client Credentials zip file, downloaded from the Autonomous Transaction Processing service console by you, or given to you by your Autonomous Transaction Processing administrator.
      • Service - In the drop-down menu, service selections are prepended with database names. Select the tpurgent, tp, high, medium, or low menu item for your database. These service levels map to the TPURGENT, TP, HIGH, MEDIUM and LOW consumer groups, which provide different levels of priority for your session.
        Note: Earlier versions of SQL Developer may not support this feature.  

Description of the illustration new_select_database_connection_dialog

  1. Click Test.
    Status: Success displays at the left-most bottom of the New/Select Database Connection dialog.
  2. Click Connect.
    An entry for the new connection appears under Connections.

Create a User in your Autonomous Transaction Processing Database

Once you have connected SQL Developer to your Autonomous Transaction Processing database, use a SQL Developer worksheet to define a create user statement to create the user atpc_user. In the next tutorial, you will create sales history tables in the atpc_user schema and load data into these tables from an object store.

  1. Open a SQL Developer worksheet and run the following SQL statements to create the user atpc_user, swapping in a password with the guidelines provided in the following Note section.
    create user atpc_user identified by "<password>";
    grant dwrole to atpc_user;
  2.  

    Description of the illustration sql_developer_commands_create_atpc_userNote: Autonomous Transaction Processing requires strong passwords. The password you specify must meet the default password complexity rules. This database checks for the following requirements when you create or modify passwords:
    • The password must be between 12 and 30 characters long and must include at least one uppercase letter, one lowercase letter, and one numeric character.
    • The password cannot contain the username.
    • The password cannot be one of the last four passwords used for the same username.
    • The password cannot contain the double quote (") character

    Note
    : Autonomous Transaction Processing databases come with a pre-defined database role named DWROLE.
    This role provides the common privileges for a database user: CREATE ANALYTIC VIEW, CREATE ATTRIBUTE DIMENSION, ALTER SESSION, CREATE HIERARCHY, CREATE JOB, CREATE MINING MODEL, CREATE PROCEDURE, CREATE SEQUENCE, CREATE SESSION, CREATE SYNONYM, CREATE TABLE, CREATE TRIGGER, CREATE TYPE, CREATE VIEW, READ,WRITE ON directory DATA_PUMP_DIR, EXECUTE privilege on the PL/SQL package DBMS_CLOUD  

  3. In the next tutorial, "Connecting SQL Developer to Autonomous Transaction Processing", you will connect SQL Developer to your Autonomous Transaction Processing database as user atpc_user, and define SH tables(sales history tables from an Oracle sample schema) for that user. Later, you will load data into those tables from an Object Store.

 


Next Tutorial

Connecting SQL Developer to Autonomous Transaction Processing

Oracle Cloud Free Tier 가입이 새롭게 변경되었습니다.

기존보다 간편하고 바로 사용할 수 있도록 개편되었습니다.

Oracle Cloud Free Tier(2021 ver.)

https://yooloo.tistory.com/28

 

Oracle Cloud Free Tier란?

오라클 클라우드 프리티어는 평생 무료인 Always Free 서비스와 30일 무료체험인 30-day Free Trial 서비스입니다. 이전에 Oracle Cloud Free Tier 또는 Free Trial에 가입하지 않은 사람은 누구나 신청 가능합니다. 기존에 Free Tail에 가입한 사람도 Always Free를 제공한다고 했는데, 제 경우에는 Always Free 서비스가 되지 않더군요. 기존에 이미 등록한 분에 대해서는 추후 확인하여 사용할 수 있는 방법을 알려드리겠습니다.

 

Oracle Free Tier에서 제공하는 서비스

  • 무제한 서비스(Always Free)
  • 30일 Free Trial(30-day Free Trial)

Always Free서비스는 다음의 제공받은 자원을 평생 제한없이 사용할 수 있습니다.

  • 1 OCPU와 20GB 스토리지를 가진 2개의 자율주행 데이터베이스(ATP, ADW)
  • 1/8 OCPU and 1 GB 메모리를 가진 VM 2개
  • 100GB Block Volume 2개.
  • 10 GB Object Storage.
  • 10 GB Archive Storage.
  • Load Balancer, 1 instance, 10 Mbps bandwidth.
  • Monitoring, 500 million ingestion datapoints, 1 billion retrieval datapoints.
  • Notifications, 1 million delivery options per month, 1,000 emails sent per month.
  • Outbound Data Transfer, 10 TB per month.

30-day Free Trial은 USD 300$ 크레딧을 30일간 무료로 제공하는 프로그램입니다

  • Compute  : 3,500 hours, 1.5 TB of storage. High-performance VMs and bare metal servers.
  • 112 million invocations and 20 million gigabyte memory-seconds of execution time.
  • Storage : 5 TB storage. Object and block storage to store and access data at scale.

사용 가능 서비스(별첨 참조)

30일이 경과하거나, 300불이 소진될 때까지 사용할 수 있습니다. 크레딧은 시간 단위로 계산됩니다.

오라클 클라우드 프리티어 신청 시 신용카드를 입력해야 합니다.

사용자 확인을 위해 오라클 싱가폴에서 1달러(SGD 1$)를 결제하고 바로 해당 결제를 승인취소합니다. 오라클 클라우드 트라이얼은 사용 기간과 크레딧이 한정된 서비스입니다. 30일 동안 제공된 크레딧을 초과하여 사용할 수 없습니다. 사용량 초과에 대한 신용카드 청구는 발생하지 않습니다.

오라클 클라우드 프리티어 신청

프리티어 신청 페이지

오라클 클라우드 프리티어를 신청하기 위해서는 Email, 핸드폰번호, 신용카드가 필요합니다. 오라클 클라우드 프리티어 신청 홈페이지는 https://cloud.oracle.com 이나 https://oracle.com 입니다. 얼마전까지는(2019.8월) cloud.oracle.com 이었으나, 최근(2019년 9월) 기존 oracle홈페이지와 oracle cloud 홈페이지를 하나로 통합했습니다.

우측 상단의 “Oracle cloud Free Tier”를 클릭합니다. 무료 등록 페이지가 나타납니다.

그림 1: http://cloud.oracle.com

 

아래 페이지에서 “Start for free” 버튼을 클릭합니다. Email 계정과 국가선택, 약관동의 화면이 나타납니다.

그림 2: Start for free클릭

계정생성

아래의 계정 생성 화면에서 Email Address 입력, 국가 선택, 4개의 약관에 동의한 후 “Next” 버튼을 클릭합니다. 단, 기존에 Try for Free를 이용했거나, Free Tier를 이용한 Email Address를 입력할 경우, 이미 등록이 되어 있다는 오류 메시지가 출력됩니다.

It looks like you are already registered.

This email address is already assigned to an Oracle Cloud Account.

Email Address : Email 주소 입력

Country/Territory : South Korea 선택

Terms of Use : 이용약관 동의

<그림 3>은 계정에 대한 상세 내역을 입력하는 화면입니다.

계정 상세 정보 입력.

Account Type : 회사용인지 개인용인지 선택

Cloud Account Name : 클라우드의 모든 자원을 관리할 수 있는 root Account입니다. 중복 이름은 허용이 안되고 영문 소문자와 숫자의 조합만 가능합니다.

Home Region : 클라우드를 구축할 기본 지역을 선택. 예) South Korea Central(Seoul). 참고로 대한민국에는 현재(2019년 9월) 가용도메인(Avalibility Domain)이 하나입니다. 2개 이상의 가용도메인이 필요한 경우, 가용도메인이 3개인 US East(Ashburn)를 선택해도 됩니다. 대한민국에는 2020년 상반기에 가용도메인(또는 Region)을 추가할 예정입니다.

First Name, Last Name, Address, City, Province, Zip/Postal code : 이름, 성, 주소, 도시, 지역, 우편번호 입력

예) City와 Province : 외국의 경우에는 State(미국 등에서 사용), Province(캐나다, 호주에서 사용)를 행정구역을 나누는데 한국은 City는 ‘시’로 State/Province는 ‘도’로 보시면 됩니다. 경기도 성남시라면 City는 ‘성남’, State/Province는 ‘경기’로 보시면 됩니다.

영문 주소 sample : 서울 강서구 마곡중안 8로 LG사이언스파크 E14

Address : LG sciencepark E14 Magockjungang 8-ro Gangseo-gu,Seoul

City : Seoul

Province : Seoul

Zip/Postal code : 07795

 

휴대폰 번호 : 휴대폰 번호 입력 시 010 으로 시작하는 ‘0’을 입력해도 되고 안해도 됩니다. ‘0’을 입력하지 않았을 경우에는 주소 검증창에서 “Use Original”이나 “Use Validated”를 클릭합니다. ‘0’을 입력한 경우에는 주소 검증창에서 “Use Validated”를 클릭해야 합니다. 국제전화 표기법에 따라 ‘010’으로 시작하는 ‘0’을 입력하지 않는 것이 좋습니다. 해외직구나 다른 사이트에서 대한민국 국제전화 입력 시 ‘0’을 처리해주지 않을 수 있습니다.

“Next: Verify Mobile Number” 버튼 클릭합니다.

Account Details: 사용자 정보 입력 - 이름, 메일, 주소

Validation Code: 핸드폰 SMS 코드 인증

Credit Card Details: 신용카드 정보 입력(비자카드, 마스터카드)

Terms&Condition: 라이선스 및 사용권 동의

 

휴대폰 인증

입력한 휴대폰 정보가 올바른지 휴대폰으로 인증코드 전송을 요청하는 화면입니다. “Use Validated” 를 클릭합니다.

EDIT : 기존 입력사항 수정

Use Orginal : 입력한 휴대폰번호로 인증코드 전송. 만일 010으로 입력을 했다면 그 번호를 그대로 사용하여 인증코드를 전송하는데, 전송이 되지 않습니다. 휴대폰번호를 0을 제외하고 입력했다면 인증코드가 전송됩니다.

Use Validated : 검증된 휴대폰번호로 인증코드 전송. 만일 010으로 입력을 했다면 처츰 ‘0’을 제거하고 인증코드를 전송합니다.

 

인증코드 입력

휴대폰으로 전송된 오라클 인증코드 7자리의 숫자를 2분 이내로 입력한 후 “Verify code”를 클립합니다.

휴대폰 문자내역 à [국제발신] Your Oracle Cloud verification code is xxxxxxx : 7자리 숫자.

 

클라우드 root 계정에 대한 패스워드를 생성합니다. 보안 규칙이 까다롭습니다. 클라우드 계정은 클라우드의 모든 자원과 사용자 권한, 비용 등을 관리하므로 패스워드 관리를 잘 해야 합니다. 패스워드 입력 후 “Next Payment Information”을 클릭합니다.

패스워드 생성 규칙

12자 이상

40자 미만

First Name(이름) 포함 불가

Last Name(성) 포함 불가

Email 주소 포함 불가

최소 1자 이상 소문자 포함

최소 1자 이상 대문자 포함

최소 1자 이상 숫자 포함

최소 1자 이상 특수문자 포함

지불정보 입력

지불정보 내용입니다. 계정을 upgrade하지 않는 한 과금되지 않고, 인증을 위해 지불수단(카드)에 임시로 청구한 후 자동으로 취소됩니다. 싱가폴 달러로 1달러(SGD 1$)가 결제된 후 취소됩니다.

신용카드를 정보를 입력하기 위해 “Add Credit Card Details” 버튼을 클릭합니다.

카드는 Visa, Mastercard, Amex 만 가능합니다. 보유하고 있는 카드번호, 카드 유효년월, CVN을 입력한 후 “Finish” 버튼을 클릭합니다.

최종 지불 정보에 동의를 체크한 후 “Complete Sign-Up” 을 클릭한다.

 

계정 생성에 약 1~2분 정도 소요됩니다.

 

등록에 대한 감사 페이지입니다.

계정 생성에 15분 정도 소요된다는 내용과 email을 확인하라는 내용입니다. 처음에 입력한 email을 확인합니다.

 

최종 승인 메일

등록한 Email을 확인합니다.

Thank you for signing up for an Oracle Cloud Account. We are reviewing your request”라는 제목으로 이메일이 날라옵니다. 계정생성 요청에 대해 검토한다는 내용입니다. 아직 오라클 클라우드를 사용할 수 있는 환경이 구성된 상태는 아닙니다.

 

Email을 통한 사인인

 

약 2~3일 후에, oracle에서 메일이 2개 더 옵니다.

Oracle(noreply@oracle.com)에서 Get Started Now with Oracle Cloud 제목과 Your Oracle Cloud Account is Fully Provisioned 제목으로 2통의 메일이 옵니다.

 

Get Started Now with Oracle Cloud의 내용은 Always Free 서비스를 사용할 수 있고, billing과 몇가지 세부적인 내용을 설정하고 있지만, 클라우드를 시작할 수 있다는 내용입니다. Sign In to Oracle Cloud를 클릭합니다.

 

 

Your Oracle Cloud Account is Fully Provisioned 메일 내용은 계정설정이 완료되었고 30일동안 SG 400$를 사용할 수 있다는 메일입니다. Sign In to Oracle Cloud를 클릭합니다.

 

Email을 통해서 오라클 클라우드를 접속하는 경우에는 아래와 같은 화면에 email과 비밀번호를 입력한 후 사인인 버튼을 클릭합니다. 사용자에 따라 영문으로 표기될 수도 있습니다.

최초 사인인 화면입니다. 우측에 보면 체험크레딧과 체험일수가 표기되어 있습니다.

 

홈페이지를 통한 사인인

수신한 Email로 접속하지 않고, 직접 오라클 홈페이지를 통해서 접속하는 경우에는 아래와 같이 우측상단의  클릭합니다. 기존 Oracle계정 사인인과 클라우드 계정 사인인이 같이 나타납니다. 클라우드 계정으로 사인인하기 위해서는 CLOUD ACCOUNT의 Sing in to Cloud를 클릭합니다.

Account 항목에 기존에 생성한 Cloud Account를 입력한 후 “Next”를 클릭합니다. Email로 접속하는 경우에는 이 부분이 생략됩니다.

계정 등록 시 입력했던 email주소와 비밀번호를 입력 후 “사인인”을 클릭합니다.

 

 

최초 사인인 화면입니다. 우측에 보면 체험크레딧과 체험일수가 표기되어 있습니다.

 

 

 

OCI란

OCI(Oracle Cloud Infrastructure)는 고가용성 호스팅 환경에서 어플리케이션 및 서비스를 구축하고 실행할 수 있는 서버, 네트워크, 스토리지, 보안과 같은 인프라 환경을 제공하는 클라우드 서비스입니다.

Amazon AWS, Google GCP, Microsoft Azure와 같은 Oracle Public Cloud 입니다.

 

 

주요용어 설명

오라클 클라우드에 대한 이해를 위해 기본적인 용어를 설명합니다. 각 CSP(Cloud Service Provider)마다 동일하거나 유사한 기능에 대해 약간씩 상이한 용어를 사용하고 있습니다. 

 

Tenancy(root compartment)

Oracle Cloud Infrastructure 에 등록 하면 Oracle은 등록 account에 대한 위한 테넌시를 생성합니다. 테넌시는 Oracle Cloud Infrastructure 내에서 클라우드 리소스를 생성, 구성 및 관리할 수 있는 격리된 파티션 입니다.

OCI의 최상위 구성은 테넌시입니다.

 

Compartments(구획)

컴파트먼트는 클라우드 자원을 구성하고 접근을 제어하기 위한 논리적인 단위입니다

테넌시가 생성되면 루트 구획이 생성됩니다. 루트 구획은 파일 시스템의 루트 폴더와 같다고 생각할 수 있습니다. 디렉터리 구조와 같이 Root Compartment 아래에 새로운 Compartment를 추가할 수 있습니다.

콘솔에서 자원을 구성할 때 반드시 컴파트먼트를 지정해야 합니다. 

 

OCI 문서 가이드에서는 크게 아래 두 가지 방법을 예로 들고 있습니다. Compartment 구성시 이를 참조하여 구성합니다.

예시 #1, 하나만 사용하기

Tenancy를 소규모 조직이 사용하는 경우 최초 생성된 Root Compartment 하나만 사용합니다. 다만, 기능 테스트 등을 고려하여 오라클 문서에서는 Sandbox Compartment 하나는 적어도 생성한 다음에 일반 사용자그룹에 Sandbox에 대해서는 많은 권한을 부여하되, Root Compartment에 대해서는 엄격하게, 세부적인 권한을 부여하도록 하는 방법을 예로 들고 있습니다.

예시 #2, 부서, 프로젝트 등을 고려한 Compartment 구성

Root Compartment, Sandbox Compartment 이외에 부서별, 프로젝트별 등을 고려해 Compartment를 구성하여 해당 Compartment 별로 세부적인 권한을 부여하도록 하는 방법을 예로 들고 있습니다.

 

VCN(Virtual Cloud Network)

Virtual Cloud Network (VCN)은 서브넷, 라우트 테이블과 게이트웨이 등으로 구성되는 가상 네트워크 환경입니다.

VCN은 리전 범위의 자원입니다. VCN은 특정 리전에 종속됩니다. VCN을 구성하는 서브넷(Subnet)을 만들 때, 리전 범위와 AD 범위를 선택할 수 있습니다. 리전 범위로 지정하면 리전을 구성하는 모든 AD에 걸쳐 서브넷이 구성됩니다. AD 범위를 지정하면 특정 AD에 구성됩니다.

SANDBOX, DEV, QAS, PRD, SHARED, COMMON 으로 구성합니다.

 

Subnet

하나의 네트워크를 분할하여 나눈 작은 네트워크입니다. 즉, VCN을 작게 나눈 네트워크입니다.

  • public subnet: 인터넷 게이트웨이와 연결된 subnet. 서브넷에 포함되는 VM 인스턴스에 Public IP 설정 가능
  • private subnet: 인터넷 게이트웨이와 연결이 안된 subnet.서브넷에 포함되는 VM 인스턴스가 Public IP를 설정 못함

 

Security Lists

VCN을 위한 가상의 방화벽으로 Subnet에 들어오고 나가는 트래픽에 대한 ingress 규칙 및 egress 규칙을 설정할 수 있습니다.

 

라우팅 테이블

라우팅 테이블(routing table)은 컴퓨터 네트워크에서 목적지에 도달하기 위해 목적지 주소를  네트워크 노선으로 변환시키는 목적으로 사용됩니다.  각 라우터의 라우팅 테이블은 모든 목적지 정보에 대해 해당 목적지에 도달하기 위해서 거쳐야 할 다음 라우터의 정보를 가지고 있습니다.

 

Internet Gateway

인터넷과 연결하기 위한 관문입니다.

 

security zones

보안 구역보안 영역은 구획과 연결됩니다. 보안 영역에서 클라우드 리소스를 생성 및 업데이트할 때 Oracle Cloud Infrastructure 는 보안 영역 정책에 대해 이러한 작업을 검증합니다. 정책을 위반하면 작업이 거부됩니다. 보안 영역을 사용하면 리소스가 Oracle 보안 원칙을 준수한다고 확신할 수 있습니다.

 

인스턴스 생성

오라클 클라우드에 Sign in 하고 인스턴스 생성하기.

 

  1. 오라클 클라우드 접속(https://oracle.com) 후 우측 상단의  View Accounts 클릭 후 Sign in to Cloud 클릭.
  2. Oracle Cloud 계정 입력 후 Next 클릭
    Description of the illustration cloud_login
  3. 사용자이름과 패스워드 입력 후 Sign In 클릭
    Description of the illustration cloud sign in
  4. Oracle Cloud page에서 왼쪽 상단의 navigation menu 클릭(일명 햄버거 메뉴).
    Description of the illustration cloud console
  5. Autonomous Transaction Processing 클릭.
    Description of the illustration console navigation
  6. The console for Autonomous Database displays. You can use the List Scope drop-down menu to select a compartment; in this example the Doc compartment is selected. Click here for documentation on creating compartments.ㄹㅇㄴㅁㄹ

  7. This console shows no databases. If there were a long list of databases, you could filter the list by using the Filters drop-down menu to filter by the state of the databases (available, stopped, terminated, and so on). You can also sort by workload type. Here Transaction Processing is selected.
    Click Create Autonomous Database to create a database instance.
    Description of the illustration create_autonomous_transaction_processing_database
  8. The Create Autonomous Database dialog appears. Enter the following information:

    Provide basic information for the Autonomous Database:

    • Choose a compartment - Select a compartment for the database from the drop-down list.
    • Display Name - Enter a name for the database for display purposes.
    • Database Name - Use letters and numbers only, starting with a letter. Maximum length is 14 characters. (Underscores not initially supported.)

    Choose a workload type. Select the workload type for your database from the choices:

    • Transaction Processing - For this tutorial, choose Transaction Processing as the workload type. Do not choose Data Warehouse.
    •  Data Warehouse - (Alternatively you can chosen Transaction Processing as the workload type.)

    Choose a deployment type. When you choose Transaction Processing as the workload type, you are presented with a choice of two deployment types:

    • Serverless - For this tutorial, select Serverless. This choice creates the autonomous database without provisioning a dedicated infrastructure.
    • Dedicated Infrastructure - (Alternatively, you can choose the Dedicated Infrastructure deployment type to create the autonomous database on a dedicated Exadata infrastructure. This tutorial does not cover the Dedicated Infrastructure deployment type.)

    Configure the database:

    • Always Free - For this tutorial, do not activate this option. Always Free databases are provided free of charge, and are suitable for small-scale applications or for learning about and exploring Oracle Cloud Infrastructure.
    • CPU core count - Number of CPUs for your service.
    • Storage (TB) - Select your storage capacity in terabytes. It is the actual space available to your service instance, including system-related space allocations.
    • Auto Scaling - For this tutorial, do not activate this option. If you select the auto scaling option, Autonomous Transaction Processing can use up to three times more CPU and IO resources than specified by the number of OCPUs. When auto scaling is enabled, if your workload requires additional CPU and IO resources, the database automatically uses the resources without any manual intervention required.
    • Enable Preview Mode - For this tutorial, do not activate this option. Oracle periodically provides a preview version of Autonomous Database. You can enable the preview mode to test your applications and become familiar with features in the next release of Autonomous Database.

    Create administrator credentials:

    • Password and Confirm Password - Specify the password for ADMIN user of the service instance. The password must meet the following requirements:
    • The password must be between 12 and 30 characters long and must include at least one uppercase letter, one lowercase letter, and one numeric character.
    • The password cannot contain the username.
    • The password cannot contain the double quote (") character.
    • The password must be different from the last 4 passwords used.
    • The password must not be the same password that is set less than 24 hours ago.
    Choose network access:
    • By default, secure connections are allowed from all IP addresses. You can control and restrict access to your Autonomous Database by setting network access control lists (ACLs). You can select from 4 IP notation types: IP Address, CIDR Block, Virtual Cloud Network, Virtual Cloud Network OCID).

    Choose a license type:

    • Bring Your Own License - Select when you have existing licenses.
    • License Included - Select when you want to subscribe to new database software licenses and the database cloud service.

        Click
     Create Autonomous Database
    Description of the illustration create_dialog_finish_top
    Description of the illustration create_dialog_finish
  9. The Create Autonomous Database dialog closes. On the console, the Lifecycle State field indicates that the database is Provisioning. When creation is completed, the Lifecycle State field changes to Available.
    Description of the illustration provisioning_state

자율 데이터베이스 콘솔이 표시됩니다. 목록 범위 드롭 다운 메뉴를 사용하여 구획을 선택할 수 있습니다. 이 예에서는 Doc 구획이 선택되었습니다. 구획 만들기에 대한 설명서를 보려면 여기를 클릭하십시오

자율 데이터베이스 콘솔이 표시됩니다. 목록 범위 드롭 다운 메뉴를 사용하여 구획을 선택할 수 있습니다. 이 예에서는 Doc 구획이 선택되었습니다. 구획 만들기에 대한 설명서를 보려면 여기를 클릭하십시오.

 


Download the Credentials Zip File

Once you have created the database, download the credentials zip file for client access to that database. You will use this file in the next step, and in the next tutorial to connect SQL Developer to your Autonomous Transaction Processing database.

  1. In the console, in the details page of your new Autonomous Transaction Processing database, select DB Connection.
    Description of the illustration open_service_console
  2. The Database Connection dialog opens for downloading client credentials. For wallet type, select Instance Wallet.
    Note: Oracle recommends you download the database-specific wallet type, Instance Wallet, to provide to your end users and for application use whenever possible. The other wallet type, Regional wallet, should only be used for administrative purposes that require potential access to all Autonomous Databases within a region.
    Click Download Wallet.
    Description of the illustration database_connection_dialog
  3. In the Download Wallet dialog, enter an encryption password for the wallet, confirm the password, and then click Download.
    Description of the illustration download_wallet
  4. Click Save File, and then click OK.
  5. Store the zip file and make note of the password. You will use the zip file in the next step to define a SQL Developer connection to your Autonomous Transaction Processing database.

Define a SQL Developer Connection

Define a SQL Developer connection to the database in your Autonomous Transaction Processing service.

    1. Open SQL Developer on your local computer. In the Connections panel, right-click Connections and select New Connection.
      Note:
      Depending on your version of SQL Developer, do not right-click Cloud Connection or Database Schema Service Connections. That menu selection is for connecting to a different Oracle cloud service, the Oracle Database Schema Service.
      Description of the illustration select_new_connection
    2. The New/Select Database Connection dialog appears. Enter the following information:
      • Connection Name - Enter the name for this cloud connection.
      • Username - Enter the database username. Use the default administrator database account (admin) that is provided as part of the service.
      • Password - Enter the admin user's password that you or your Autonomous Transaction Processing administrator specified when creating the service instance.
      • Connection Type - Select Cloud Wallet.
      • Configuration File - Click Browse, and select the Client Credentials zip file, downloaded from the Autonomous Transaction Processing service console by you, or given to you by your Autonomous Transaction Processing administrator.
      • Service - In the drop-down menu, service selections are prepended with database names. Select the tpurgent, tp, high, medium, or low menu item for your database. These service levels map to the TPURGENT, TP, HIGH, MEDIUM and LOW consumer groups, which provide different levels of priority for your session.
        Note: Earlier versions of SQL Developer may not support this feature.  

Description of the illustration new_select_database_connection_dialog

  1. Click Test.
    Status: Success displays at the left-most bottom of the New/Select Database Connection dialog.
  2. Click Connect.
    An entry for the new connection appears under Connections.

Create a User in your Autonomous Transaction Processing Database

Once you have connected SQL Developer to your Autonomous Transaction Processing database, use a SQL Developer worksheet to define a create user statement to create the user atpc_user. In the next tutorial, you will create sales history tables in the atpc_user schema and load data into these tables from an object store.

  1. Open a SQL Developer worksheet and run the following SQL statements to create the user atpc_user, swapping in a password with the guidelines provided in the following Note section.
    create user atpc_user identified by "<password>";
    grant dwrole to atpc_user;
    Description of the illustration sql_developer_commands_create_atpc_userNote: Autonomous Transaction Processing requires strong passwords. The password you specify must meet the default password complexity rules. This database checks for the following requirements when you create or modify passwords:
    • The password must be between 12 and 30 characters long and must include at least one uppercase letter, one lowercase letter, and one numeric character.
    • The password cannot contain the username.
    • The password cannot be one of the last four passwords used for the same username.
    • The password cannot contain the double quote (") character

    Note
    : Autonomous Transaction Processing databases come with a pre-defined database role named DWROLE.
    This role provides the common privileges for a database user: CREATE ANALYTIC VIEW, CREATE ATTRIBUTE DIMENSION, ALTER SESSION, CREATE HIERARCHY, CREATE JOB, CREATE MINING MODEL, CREATE PROCEDURE, CREATE SEQUENCE, CREATE SESSION, CREATE SYNONYM, CREATE TABLE, CREATE TRIGGER, CREATE TYPE, CREATE VIEW, READ,WRITE ON directory DATA_PUMP_DIR, EXECUTE privilege on the PL/SQL package DBMS_CLOUD  

  2. In the next tutorial, "Connecting SQL Developer to Autonomous Transaction Processing", you will connect SQL Developer to your Autonomous Transaction Processing database as user atpc_user, and define SH tables(sales history tables from an Oracle sample schema) for that user. Later, you will load data into those tables from an Object Store.

 


Next Tutorial

Connecting SQL Developer to Autonomous Transaction Processing

Create an Instance

Sign in to Autonomous Transaction Processing and create an instance.

  1. Sign in from https://cloud.oracle.com/home. On the Oracle Cloud page, click Sign In.
  2. On the Cloud Account page, enter your cloud account name and click Next.
    Description of the illustration cloud_login
  3. Enter your User Name and Password and click Sign In to sign in to your Oracle Cloud Account
    Description of the illustration cloud sign in
  4. On the Oracle Cloud Infrastructure page, click the navigation menu in the upper left to show top level navigation choices.
    Description of the illustration cloud console
  5. Click Autonomous Transaction Processing.
    Description of the illustration console navigation
  6. The console for Autonomous Database displays. You can use the List Scope drop-down menu to select a compartment; in this example the Doc compartment is selected. Click here for documentation on creating compartments.
    This console shows no databases. If there were a long list of databases, you could filter the list by using the Filters drop-down menu to filter by the state of the databases (available, stopped, terminated, and so on). You can also sort by workload type. Here Transaction Processing is selected.
    Click Create Autonomous Database to create a database instance.
    Description of the illustration create_autonomous_transaction_processing_database
  7. The Create Autonomous Database dialog appears. Enter the following information:

    Provide basic information for the Autonomous Database:

    • Choose a compartment - Select a compartment for the database from the drop-down list.
    • Display Name - Enter a name for the database for display purposes.
    • Database Name - Use letters and numbers only, starting with a letter. Maximum length is 14 characters. (Underscores not initially supported.)

    Choose a workload type. Select the workload type for your database from the choices:

    • Transaction Processing - For this tutorial, choose Transaction Processing as the workload type. Do not choose Data Warehouse.
    •  Data Warehouse - (Alternatively you can chosen Transaction Processing as the workload type.)

    Choose a deployment type. When you choose Transaction Processing as the workload type, you are presented with a choice of two deployment types:

    • Serverless - For this tutorial, select Serverless. This choice creates the autonomous database without provisioning a dedicated infrastructure.
    • Dedicated Infrastructure - (Alternatively, you can choose the Dedicated Infrastructure deployment type to create the autonomous database on a dedicated Exadata infrastructure. This tutorial does not cover the Dedicated Infrastructure deployment type.)

    Configure the database:

    • Always Free - For this tutorial, do not activate this option. Always Free databases are provided free of charge, and are suitable for small-scale applications or for learning about and exploring Oracle Cloud Infrastructure.
    • CPU core count - Number of CPUs for your service.
    • Storage (TB) - Select your storage capacity in terabytes. It is the actual space available to your service instance, including system-related space allocations.
    • Auto Scaling - For this tutorial, do not activate this option. If you select the auto scaling option, Autonomous Transaction Processing can use up to three times more CPU and IO resources than specified by the number of OCPUs. When auto scaling is enabled, if your workload requires additional CPU and IO resources, the database automatically uses the resources without any manual intervention required.
    • Enable Preview Mode - For this tutorial, do not activate this option. Oracle periodically provides a preview version of Autonomous Database. You can enable the preview mode to test your applications and become familiar with features in the next release of Autonomous Database.

    Create administrator credentials:

    • Password and Confirm Password - Specify the password for ADMIN user of the service instance. The password must meet the following requirements:
    • The password must be between 12 and 30 characters long and must include at least one uppercase letter, one lowercase letter, and one numeric character.
    • The password cannot contain the username.
    • The password cannot contain the double quote (") character.
    • The password must be different from the last 4 passwords used.
    • The password must not be the same password that is set less than 24 hours ago.
    Choose network access:
    • By default, secure connections are allowed from all IP addresses. You can control and restrict access to your Autonomous Database by setting network access control lists (ACLs). You can select from 4 IP notation types: IP Address, CIDR Block, Virtual Cloud Network, Virtual Cloud Network OCID).

    Choose a license type:

    • Bring Your Own License - Select when you have existing licenses.
    • License Included - Select when you want to subscribe to new database software licenses and the database cloud service.

        Click
     Create Autonomous Database
    Description of the illustration create_dialog_finish_top
    Description of the illustration create_dialog_finish
  8. The Create Autonomous Database dialog closes. On the console, the Lifecycle State field indicates that the database is Provisioning. When creation is completed, the Lifecycle State field changes to Available.
    Description of the illustration provisioning_state

 

Next Tutorial

Connecting SQL Developer to Autonomous Transaction Processing

+ Recent posts