2008년 05월 05일
Oracle 10g Express에서 scott/tiger 만들기
10g풀버전에는 있던것이 익스프레스 버전에선 없다.
풀버전깔았더니 부팅이 5분씩 막 걸려서 도저히 못쓰겠고,
익스버전은 혹시나 해서 바꿔 깔았는데 부팅이 풀버전보다빨라져서(3분 가량)이 부분은 만족.
하지만, 정작 예제 계정 데이터베이스인 scott/tiger 가없다. 물론 dept 따위의 테이블도 없다.
이런...
그냥 직접 scott/tiger 만들자!
우선 요놈을 자신이 쓰는 oracle 폴더에 넣고,
demobld.sql
SQL에 접속할때 system 계정으로 접속한다.
sqlplus system/manager
scott 님 계정을 생성해 드린다. 당연히 패스워드는 호랑이 님으로...
create user scott identified by tiger
default tablespace users
temporary tablespace temp;
계정생성 완료. 이제 권한을 부여한다.
grant connect, resource to scott;
권한 부여 완료.
다음은 생성한 scott 계정으로 접속하고 아까 복사해둔 demobld.sql 파일을 이용해
데모 DB를 oracle에 설정한다.
connect scott/tiger
@demobld.sql
완료.!
...
인 줄 알았는데 실행해보면
emp 테이블의 데이터가 없다.
우선 해결책은 scott 계정에 접속한 상태에서
alter session set nls_language='AMERICAN';
를 입력하고 다시 @demobld.sql 을 실행하면 정상 실행이 된다.
이유는 아래글 참조.
http://blog.naver.com/pro20cm/150024755218
다른 .sql 파일의 경우
다음을 이용하여 해당 형식을 맞춘다.
alter session set nls_date_format = 'YYYY/MM/DD';
'Computer Science' 카테고리의 다른 글
Writing “C” Code for Android (0) | 2010.05.22 |
---|---|
안드로이드 기반 오픈 소스 프로젝트 및 참고 사이트 모음 (0) | 2010.05.16 |
Mobile IP 위키 (0) | 2010.04.24 |
Mobile IP2 (0) | 2010.04.24 |
모바일 IP (0) | 2010.04.24 |