Thứ Tư, 8 tháng 1, 2020

SQL*PLus - Một số câu lệnh hay sử dụng trong Oracle Database

  1.    Set môi trường cho SQL*Plus
col owner_name format a10
col table_name format a15
col cluster_name format a7
col partition_name format a9
col subpartition_name format a12
col head_rowid format a20
col <column_name> 999,999
col target format a25
Định dạng dữ liệu kiểu string, 10 ký t






Định dạng dữ liệu cột kiểu  number, VD: 123,456
set linesize 200 
Mỗi dòng 200 ký tự
SQL> set pagesize 9999
Định dạng cỡ của trang
Set timing on
Hiển thị thời gian chạy của câu lệnh

Sửa bài viết

Mẫu báo cáo SỨC KHỎE HIỆN TẠI của cơ sở dữ liệu, máy chủ


 Danh sách các tiêu chí giám sát cho Oracle Database
#
Loại Tiêu chí
Tiêu chí
Ngưỡng cảnh báo

Phương thức nhận cảnh báo

Danh sách người nhận cảnh báo




Warning
Critical
Warning
Critical
Warning
Critical
1
Database Instances









Archive Area
> 75
> 90
Email
SMS + Email




Database Service
Up with warning
Down
Email
SMS + Email




Dataguard Status
Warning
Error
Email
SMS + Email




Dataguard Sync
> 300 s

Email
SMS + Email




Tablespace Usage
> 85
> 90
Email
SMS + Email




Tablespace Usage (TEMP)
> 85
> 90
Email
SMS + Email




Unusable Indexes

> 0
Email
SMS + Email




Block Session Count
> 0

Email
SMS + Email




Failed Job Count
> 0

Email
SMS + Email


Sửa bài viết

Các công cụ quản trị cơ sở dữ liệu Oracle DBA cần dùng thành thạo

1.    Tools for installation and upgrade:
Oracle Universal Installer (OUI):
Installs your Oracle software and options; can automatically launch the Database Configuration Assistant to create a database
Database Configuration Assistant (DBCA):
Creates a database from Oracle-supplied templates, enabling you to copy a preconfigured seed database (Alternatively, you can create your own database and templates.)
Database Upgrade Assistant (DBUA):
Guides you through the upgrade of your existing database to a new Oracle release
Oracle Net Manager (netmgr):
Configures network connectivity for your Oracle databases and applications
Oracle Net Configuration Assistant (NetCA):
A graphical, wizard-based tool—used to configure and manage Oracle Network configurations

Sửa bài viết

Các tài liệu cần thiết cho DBA theo chuẩn Oracle hãng

Get Started
2 Day + Performance Tuning Guide
2 Day DBA
Oracle Database 2 Day + Security Guide

Sửa bài viết

Bài 5.PL/SQL cơ bản - I/O dữ liệu

1.    Console:
DBMS_OUTPUT.ENABLE (1000000);   // enable output voi 1000000 ky tu
dbms_output.put_line('Hi Binh, I can write PL/SQL');

Sửa bài viết

Bài 4.PL/SQL cơ bản - Chương trình con

Bài 4.PL/SQL cơ bản - Chương trình con
Sửa bài viết

Bài 3.PL/SQL cơ bản - Cấu trúc điều khiển (if, else, case, for, while)

1.    Cấu trúc tuần tự
Thực hiện lần lượt từng lệnh một.
dbms_output.put_line('Excellent 1');
dbms_output.put_line('Excellent 2');
dbms_output.put_line('Excellent 3'); 

Sửa bài viết

ĐỌC NHIỀU

Trần Văn Bình - Oracle Database Master