์์ฝ
- ํ์ฌ ๊ถํ ํ์ธ
- ๊ณ์ ๊ถํ ๋ถ์ฌ
- ์คํค๋ง
- ์คํค๋ง ๋ด ํ ์ด๋ธ
- ํ ์ด๋ธ ๊ถํ ๋ถ์ฌ ์์ ์ฃผ์!
- ์คํค๋ง ๊ถํ ๋ถ์ฌ๊ฐ ์ต์ฐ์
- ๊ทธ ํ ์คํค๋ง ๋ด ํ ์ด๋ธ ๊ถํ ๋ถ์ฌ
1. ์ฌ์ฉ์ ๊ด๋ จ
- ์ฌ์ฉ์ ์์ฑ ๋ฐ ์ญ์
-- ์ฌ์ฉ์ ์์ฑ
create user ์ฌ์ฉ์๋ช
password '๋น๋ฐ๋ฒํธ'
-- ์ฌ์ฉ์ ์ญ์
drop user ์ฌ์ฉ์๋ช
2. ํ์ฌ ๊ถํ ํ์ธ
grantor: ๊ถํ ๋ถ์ฌ์grantee: ๊ถํ ๋์์table_schema: ์คํค๋ง๋ชtable_name: ํ ์ด๋ธ๋ชprivilege_type: ๊ถํ ๋ชฉ๋ก
select *
from information_schema.role_table_grants3. ๊ณ์ ๊ถํ ๋ถ์ฌ
3.1 ์คํค๋ง
grant: ๊ถํ ๋ถ์ฌtablespace: ๋ชจ๋ ๊ถํ ๋ถ์ฌ ์
revoke: ๊ถํ ์ญ์
-- ํน์ ์คํค๋ง ๊ถํ ๋ถ์ฌ
grant all privileges on schema ์คํค๋ง๋ช
to ์ฌ์ฉ์๋ช
-- ๋ชจ๋ ์คํค๋ง ๊ถํ ๋ถ์ฌ
grant all privileges on tablespace bv_space to ์ฌ์ฉ์๋ช
-- ์คํค๋ง ๊ถํ ์ญ์
revoke all on all tables in schema ์คํค๋ง๋ช
from ์ฌ์ฉ์๋ช
3.2 ์คํค๋ง ๋ด ํ ์ด๋ธ
-- ๋ชจ๋ ํ
์ด๋ธ ๊ถํ ๋ถ์ฌ
grant all privileges on all tables in schema ์คํค๋ง๋ช
to ์ฌ์ฉ์๋ช
-- ํน์ ํ
์ด๋ธ ๊ถํ ๋ถ์ฌ
grant usage on schema ์คํค๋ง๋ช
to ํ
์ด๋ธ๋ช
-- ์กฐํ๊ถํ ๋ง ๋ถ์ฌ
grant select on all tables in schema ์คํค๋ง๋ช
to ํ
์ด๋ธ๋ช
์ฐธ๊ณ ์ฌ์ดํธ