DB Oracle

์‚ผ์ „ยท2023๋…„ 6์›” 1์ผ
0

Oracle

๋ชฉ๋ก ๋ณด๊ธฐ
1/15

๐Ÿš€Oracle XE112 Express Edition ์„ค์น˜ ๋ฐ”๋กœ๊ฐ€๊ธฐ

oracle์€ '๊ด€๋ฆฌ์ž'์™€ '์‚ฌ์šฉ์ž'๊ณ„์ •์ด ์žˆ๋‹ค. ๊ฐœ๋ฐœ์ž์˜ ๊ฒฝ์šฐ ์‚ฌ์šฉ์ž ๊ณ„์ •์— ํ•ด๋‹นํ•œ๋‹ค.

  • SYS: ๊ด€๋ฆฌ์ž๊ณ„์ •(=์Šˆํผ๊ด€๋ฆฌ์ž)์ด๊ธดํ•œ๋ฐ ๋น„๋ฒˆ์—†์–ด๋„ ์ ‘์†๊ฐ€๋Šฅ
  • SYSTEM: ๊ด€๋ฆฌ์ž ๊ณ„์ •, ๊ณ„์ •์˜ ๋น„๋ฐ€๋ฒˆํ˜ธ๋Š” ์žˆ์–ด์•ผ๋œ๋‹ค. **

โšก์„ค์น˜์ค‘์— ์•„๋ž˜์˜ ๋น„๋ฒˆ์„ ์ƒ์„ฑํ•˜๋ผ๊ณ  ์ฐฝ์ด ๋œฌ๋‹ค! ๊ทธ๋Ÿฌ๋ฉด! SYSTEM์˜ ๋น„๋ฒˆ์„ ์˜๋ฏธํ•œ๋‹ค.

  • Enter Password:master1234
  • confirm Password:master1234

-> โญ๊ด€๋ฆฌ์ž ๊ณ„์ •์„ ๋งŒ๋“ค์–ด์•ผ ์‚ฌ์šฉ์ž ๊ณ„์ •์„ ์ƒ์„ฑํ•  ์ˆ˜ ์žˆ๋‹ค.

์‚ฌ์šฉ์ž ๊ณ„์ • ์ƒ์„ฑ ๋ฐ ์ ‘์†

1.์‹œ์Šคํ…œ ๊ณ„์ • ์ ‘์† ๋ฐฉ๋ฒ•

  • cmd์ฐฝ: sqlplus ์—”ํ„ฐ user-name & Password ์‚ฝ์ž…
  • Enter user-name: sys as sysdba
    Enter password: (์—”ํ„ฐ)

๐ŸšจORA-01031 : insufficient privileges ์—๋Ÿฌ ๋ฐœ์ƒ์‹œ
์ฒซ ๋ฒˆ์งธ ๋ฐฉ๋ฒ•) ์„ค์น˜ ์‹œ SYS and the SYSTEM dabase accounts์—์„œ ๋น„๋ฐ€๋ฒˆํ˜ธ๋ฅผ ์ฃผ์—ˆ๋˜ master1234๋ฅผ ์ž…๋ ฅ!
๋‘ ๋ฒˆ์งธ ๋ฐฉ๋ฒ•) Administrator ๊ถŒํ•œ์— ora_dba ๊ทธ๋ฃน์„ ์ถ”๊ฐ€

โšก"์ ‘์† ์„ฑ๊ณต ํ›„ ์‚ฌ์šฉ์ž ๊ณ„์ •์„ ๋งŒ๋“ค๋ฉด๋œ๋‹ค!"

2. ์‚ฌ์šฉ์ž ๊ณ„์ • ์ƒ์„ฑ

  • SQL>create user scott identified by tiger; (์•„์ด๋””scott/tiger๋Š” ๋น„๋ฒˆ)

  • ๊ถŒํ•œ ๋ถ€์—ฌ: grant connect, resource to scott;

    *connect ์ ‘์†, resource ์ž์› ํ™œ์šฉ ๊ฐ€๋Šฅ

๐Ÿšจ์—๋Ÿฌ ๋ฐœ์ƒ:ora-01045 user lacks create session privilege logon denied

๋ฐ์ดํ„ฐ๋ฒ ์ด์Šค์— ์ ‘๊ทผํ•  ์ˆ˜ ์žˆ๋Š” ๊ถŒํ•œ

SQL> grant create session to ์œ ์ €๋ช…;

์—ฐ์Šต) ๋ช…๋ น ํ”„๋กฌํ”„ํŠธ์—์„œ sqlํŒŒ์ผ ์‹คํ–‰ํ•ด๋ณด๊ธฐ

โšกSQL> @ C:\demo.sql

3. SQLDeveloper ๋‹ค์šด๋กœ๋“œ ๋ฐ ์„ค์น˜ํ•˜๊ธฐ

SQLDeveloper ์ ‘์† ์ฐธ๊ณ  ์‚ฌํ•ญ

  • ํ˜ธ์ŠคํŠธ: local ํ˜น์€ ip์ฃผ์†Œ
  • SID: xe ์ „์—ญ๋ณ€์ˆ˜ ์—”ํ„ฐํ”„๋ผ์ด์ฆˆ์˜ ๊ฒฝ์šฐ ์ž„์˜๋กœ ์ƒ์„ฑ ๊ฐ€๋Šฅ!
  • Port for 'Oracle HTTP Listener': 8080 (๊ธฐ๋ณธ์œผ๋กœ ์“ฐ๊ณ  ์žˆ์Œ)
  • Tomcat์€ 9090 ์ด๋Ÿฐ์‹์œผ๋กœ ๋ณ€๊ฒฝ

์ฐพ๊ธฐ์—์„œ '์„œ๋น„์Šค' - โšกOracleServiceXE ์‹คํ–‰ ํ™•์ธ

profile
ํ’€์ŠคํƒeDot

0๊ฐœ์˜ ๋Œ“๊ธ€