BackEnd/RDBMS 8

[MySQL 8.0] Node.js 프로젝트에서 MySQL 연동 오류 해결

Error: ER_NOT_SUPPORTED_AUTH_MODE: Client does not support authentication protocol requested by server; consider upgrading MySQL client -> 연동시 설정한 username, host가 사용자로 등록되어 있지 않을때 발생하는 오류같습니다! 1. 터미널로 MySQL bash 접속 docker exec -it mysql-local bash 저는 도커로 mysql을 설치했으며 이름은 'mysql-local'로 되어있어서 위에처럼 터미널에 입력했습니다. 상황에 맞게 변경해서 해주세요. 2. 루트계정으로 접속 /# mysql -u root -p Enter password: test 저는 root 계정의 비밀번..

BackEnd/RDBMS 2022.10.30

[SQL_MyBatis] Insert문 실행하고 추가된 행의 원하는 컬럼 값 리턴받기 (selectKey사용)

저는 MyBatis과 Oracle를 사용했습니다. INSERT INTO EATAEWONBBS (SEQ, ID, NICKNAME, TITLE, CONTENT,PICTURE, HASHTAG, WDATE, SHOPNAME, ADDRESS, LATITUDE, LONGITUDE, READCNT,LIKECNT,shopphnum,shopurl, testurl) VALUES (bbsseq.NEXTVAL, #{id}, #{nickname}, #{title}, #{content}, 0, #{hashtag}, SYSDATE, #{shopname}, #{address}, #{latitude},#{longitude}, 0, 0,#{shopphnum},#{shopurl},#{testurl}) 원래 SEQ값을 만들어둔 bbsseq..

BackEnd/RDBMS 2022.04.07

[Oracle] ORA-00054 : resource busy and acquire with nowait specified or timeout expired

select, insert, update, delete문 실행하고 commit을 안한채로 drop문 실행시 나타나는 오류라고한다. (까먹지말고 커밋을 꼭해주자!!) system 계정으로 접속하고 아래 select문을 실행해준다. select c.owner, c.object_name, c.object_type, b.sid, b.serial#, b.status, b.osuser, b.machine from v$locked_object a, v$session b, dba_objects c where b.sid = a.session_id and a.object_id = c.object_id; ALTER SYSTEM KILL SESSION 'sid,serial#'; 그리고 나오는 표에서 SID와 SERIAL#으로..

BackEnd/RDBMS 2022.03.25

[Oracle, Sqlplus] Oracle11g 한글깨짐 해결중...

https://imthekingofcoding.tistory.com/4 SQL Developer 한글설정하기 - For MAC 맥에서 SQL Developer 툴을 사용할때 한글로 설정하는법 SQL Developer 앱 오른쪽 버튼 -> 패키지내용 보기 -> Contents -> Resources -> sqldeveloper -> sqldeveloper -> bin bin 폴더 선택 후 command + c 한.. imthekingofcoding.tistory.com https://im-codding.tistory.com/17 [ Oracle ] 오라클 한글 깨짐 현상 안녕하세요 코띵입니다 :D CentOS에서 오라클 설치를 완료한 후, SQLPlus를 통해 접속을 했는데, 다음과 같이 한글이 나오지 않..

BackEnd/RDBMS 2022.03.16

[Oracle] 맥 Docker 설치 후 오라클 연동

도커 설치 brew install --cask docker 설치 버전 확인 docker --version 이미지 검색 docker search oracle-xe 이미지 다운 docker pull jaspeen/oracle-xe-11g 컨테이너 확인 docker ps 컨테이너 sqlplus 접속 docker exec -it oracle11g sqlplus 오라클 유저 추가하면서 테스트 눌렀을때 상태부분에 아래처럼 뜬다면 'ORA-00604: error occurred at recursive sql level 1 ORA-01756' 1. 시스템 환경설정 2. 언어 및 지역 3. 선호하는 언어 - 한국어 - 지역 : 아메리카(미국) 설정 4. 오라클 실행 5. 다시 12..

BackEnd/RDBMS 2022.02.24

[Oracle] 서브쿼리 (SubQuery ) - SELECT, FROM, WHERE

SELECT 단일 row 단일 column select employee_id, first_name (select first_name from employees where employee_id = 100) from employees; FROM 다중 row 다중 column select employee_id, first_name from (select employee_id, first_name, salary from employees where department_id = 60) where salary > 10000; WHERE 다중 row 다중 column select first_name, salary from employees where salary > (select avg(salary) from emp..

BackEnd/RDBMS 2021.12.26

[Oracle] SQL Joins (INNER, FULL, LEFT, RIGHT, SELF)

더보기 그림은 제가 이해하기 위해 직접 그렸습니다...😏 -- ansi SQL SELECT e.employee_id, e.first_name, e.department_id, d.department_id, d.department_name FROM employees e INNER JOIN departments d ON e.department_id = d.department_id; -- oracle SELECT e.employee_id, e.first_name, e.department_id, d.department_id, d.department_name FROM employees e, departments d WHERE e.department_id = d.department_id; --ansi SELECT e..

BackEnd/RDBMS 2021.12.26

[Oracle] SELECT * FROM +(WHERE,GROUP,ORDER)

WHERE ANY() / ALL() -조건 '또는'='or'과 같은 역할인 any / 조건 '그리고'='and'와 같은 역할인 all select first_name, salary from employees where salary = ANY(6000,3200); --salary = 6000 or salary = 3200 select first_name, salary from employees where salary = ALL(6000,3200); --salary = 6000 and salary = 3200 LIKE-특정 글자를 포함하는지 확인하기 select first_name from employees where first_name LIKE 'G_ra_d'; --'_'는 한글자의 칸을 의미하여 아무 단..

BackEnd/RDBMS 2021.12.26