You are on page 1of 7

1.

Hướng dẫn cài đặt ứng dụng


1.1. Cài đặt Oracle
1.1.1. Các bước cài đặt
- Sử dụng phiên bản 12c 64bit, giải nén ra thư mục database
- Không gõ email, tắt check “I wish to receive …support”

- Chọn Create and configure a database

- Chọn Server Class

- Chọn Single instance database installation


1
- Chọn Advanced install

- Chọn Use Windows Built-in-Account

- Chọn yes

2
- Chọn Next/ General Purpose/ Transaction Processing

- Tắt Create as Container database, trong mục Global name gõ tên vào

- Xác lập các tùy chọn như hình bên dưới

3
- Chọn Next

- Chọn Next và xác lập như bên dưới

4
- Chọn mục Use the same password for all accounts, gõ mật khẩu có chữ cái, chữ số, chữ
viết hoa. Ví dụ Oracle123

1.1.2. Kiểm tra cài đặt thành công


cmd
C:\Users\hacnp>sqlplus / as sysdba
SQL*Plus: Release 12.1.0.2.0 Production on Fri Jul 7 05:07:06 2023
Copyright (c) 1982, 2014, Oracle. All rights reserved.
Connected to:
Oracle Database 12c Enterprise Edition Release 12.1.0.2.0 - 64bit Production
With the Partitioning, OLAP, Advanced Analytics and Real Application Testing options
SQL> select instance_name from v$instance;
INSTANCE_NAME
----------------
orcl1
SQL> select name from v$database;
NAME
---------
ORCL1
SQL> select * from hr.countries;
CO COUNTRY_NAME REGION_ID
-- ---------------------------------------- ----------
AR Argentina 2
AU Australia 3
BE Belgium 1
BR Brazil 2
CA Canada 2
CH Switzerland 1
CN China 3
…..

5
25 rows selected.
SQL> alter user sys identified by sys;
User altered.
SQL>exit
C:\Users\hacnp>sqlplus sys/sys as sysdba;
SQL*Plus: Release 12.1.0.2.0 Production on Fri Jul 7 05:12:11 2023
Copyright (c) 1982, 2014, Oracle. All rights reserved.
Connected to:
Oracle Database 12c Enterprise Edition Release 12.1.0.2.0 - 64bit Production
With the Partitioning, OLAP, Advanced Analytics and Real Application Testing options
SQL>exit
C:\Users\hacnp>sqlplus hr/Oracle123
SQL*Plus: Release 12.1.0.2.0 Production on Fri Jul 7 05:13:02 2023
Copyright (c) 1982, 2014, Oracle. All rights reserved.
ERROR:
ORA-28000: the account is locked
Enter user-name:
C:\Users\hacnp>sqlplus / as sysdba;
SQL*Plus: Release 12.1.0.2.0 Production on Fri Jul 7 05:15:44 2023
Copyright (c) 1982, 2014, Oracle. All rights reserved.
Connected to:
Oracle Database 12c Enterprise Edition Release 12.1.0.2.0 - 64bit Production
With the Partitioning, OLAP, Advanced Analytics and Real Application Testing options
SQL> alter user hr identified by hr account unlock;
User altered.
SQL>exit
C:\Users\hacnp>sqlplus hr/hr
SQL*Plus: Release 12.1.0.2.0 Production on Fri Jul 7 05:17:08 2023
Copyright (c) 1982, 2014, Oracle. All rights reserved.
Connected to:
Oracle Database 12c Enterprise Edition Release 12.1.0.2.0 - 64bit Production
With the Partitioning, OLAP, Advanced Analytics and Real Application Testing options
SQL> select * from countries;
CO COUNTRY_NAME REGION_ID
-- ---------------------------------------- ----------
AR Argentina 2
AU Australia 3
…..
25 rows selected.

6
1.2. Cài đặt công cụ kết nối SQL Developer
1.2.1. Cài đặt ứng dụng

1.2.2. Kiểm tra kết nối thành công


- Chọn công cụ New Connection

-
- Tạo kết nối đến user sys với password là sys và instance (ví dụ instance đã được kiểm
tra bằng lệnh hướng dẫn bên trên là orcl1 và password đã được đổi)

- Tạo kết nối đến user hr với password là hr và instance là orcl1 (password đã được đổi
và instance đã được kiểm tra bằng lệnh hướng dẫn bên trên)

You might also like