오라클 설치는 (window 기준) - 오라클 아이디 필요
https://www.oracle.com/database/technologies/xe-prior-releases.html
XE Prior Release Archive
Support Oracle Database Express Edition (XE) is a community supported edition of the Oracle Database family. Please go to the Oracle Database XE Community Support Forum for help, feedback, and enhancement requests. Note: Oracle Support Services only provid
www.oracle.com
운영체제 기준으로 설치해 주면 됩니다.
그리고 맥은 먼저 도커를 설치해줘야 합니다. - 도커 아이디 필요
https://hub.docker.com/editions/community/docker-ce-desktop-mac
Docker Desktop for Mac - Docker Hub
Docker Desktop for Mac Docker Desktop for Mac is an easy-to-install desktop app for building, debugging, and testing Dockerized apps on a Mac. Docker Desktop for Mac is a complete development environment deeply integrated with the Mac OS Hypervisor framewo
hub.docker.com
Get Docker 을 클릭 해 줍니다.
도커를 설치해 주시고요.
docker login
터미널을 사용해 docker에 로그인을 해줍니다.
docker pull deepdiver/docker-oracle-xe-11g
docker run -d -p 49160:22 -p 49161:1521 deepdiver/docker-oracle-xe-11g
명령어를 입력해줘서 oracle11g를 설치해 줍니다.
https://www.oracle.com/technetwork/developer-tools/sql-developer/downloads/index.html
Oracle SQL Developer Downloads
This archive. will work on a 32 or 64 bit Windows OS. The bit level of the JDK you install will determine if it runs as a 32 or 64 bit application. This download does not include the required Oracle Java JDK. You will need to install it if it's not already
www.oracle.com
맥버전 SQL Developer 를 설치해줍니다.
Name : localhost
Username : system
Password : oracle
Hostname : localhost
Port : 49161
SID : xe
Developer의 초기 system유저의 아이디와 비밀번호입니다. 이걸로 접속을 해줍니다.
이제 오라클 설치는 다 했습니다.
먼저 저희가 연습해볼 데이터베이스 유저를 생성해 보도록 하겠습니다.
sys 유저에 접속 해주시고요.
유저를 만드는 기본 문법 입니다.
create user 유저 이름 identified by 유저 비번
예제로 blog 유저를 만들어 보았습니다.
create user blog identified by blog
default tablespace users
temporary TABLESPACE temp;
그럼 밑에 스크립트 출력으로 blog 유저가 생성되었습니다. 가 출력 되었습니다.
그 다음에 그 유저에 권한을 주도록 합니다.
grant connect, resource, plustrace, alter session to blog;
밑에 스크립트에 권한을 주는게 성공되었다고 뜹니다.
sql Developer에 유저 추가 버튼을 눌러 위에서 만들어준 blog 유저로 접속을 해봅니다.
HostName 하고 SID , PORT 는 똑같습니다.
SELECT SYSDATE FROM DUAL
이 그림처럼 되있는걸 실행 시켜줍니다.