카테고리 없음

오라클 첫입문 세팅

kgmcscs 2017. 11. 17. 12:53

오라클 첫 입문 < 설치 및 scoff.sql 세팅>

scott.sql이란 테스트용 만들어진 sql입니다. 오라클에서 제공합니다. 



1. 설치 되어 있는 오라클 폴더에서 soff.sql을 복사한다. 



2. "D:\oracle_ex" 에 scott.sql 파일을 복사한다. 


3. cmd를 이용하여 D:\oracle_ex 폴더로 이동한다. 

C:> d: 

d:>cd oracle_ex


4. dba에 접속한다. 

D:\oracle_ex>  sqlplus system/1234

sql > @c:\scott.sql


5. sott의 비밀번호를 변경합니다. 

sql > alter user scott identified by tiger; 


6. scott의 계정에 접속합니다. 

sql > conn scott/tiger (scott계정으로 전환)


7. 종료하기 

sql > exit 


// hr 계정 활성화 하기 


1. 시스템 계정으로 로그인 합니다.

D:/> sqlplus sys/1234 as sysdba

2.  hr 계정 활성화 하기 

alter user hr account unlock;

3.  hr 비밀 번호 활성화 하기 

alter user hr identified by 비밀번호;




- 디비 구조 보기

desc 



- 계정 확성화 

alter user hr account unlock


- 계정 비밀번호 변경

alter user hr identified by 비밀번호;


- 디비 관리자로 접속

sqlplus sys/1234 as sysdba --dba