2018년 12월 9일 일요일

Applying jellybean theme Vim on Mac OS X

https://www.vim.org/scripts/script.php?script_id=2555 에서


jellybeans.vim 링크를 선택하여 해당 파일을 다운로드 한뒤

$ sudo mv jellybeans.vim /usr/share/vim/vim80/colors

수행한 뒤

사용자 홈 디렉토리에서 .vimrc파일 생성 후 아래와 같이 작성해 주면 끝

if has("syntax")
    syntax on
endif

set autoindent
set cindent
set smartindent
set ts=4
set shiftwidth=4

colorschem jellybeans




Enable sudo on Mac OS X

Mac OS X 에서 sudo 명령어를 사용하여
시스템에서 사용되는 폴더에 접근하려면 다음과 같이 해줘야 한다.

Mac OS X  부팅전에 command + R 키를 누르고 있으면 복구모드로 들어가게 된다.
복구모드에서 Terminal을 수행 후

$ csrutil disable

재부팅 후에 사용중인 사용자로 로그인 한 후에
 terminal에서

$ csrutil status
System Integrity Protection status: disabled.

위 처럼 메시지가 표시되면 성공!

2018년 12월 8일 토요일

oracle 18c installation sample schema

오라클 설치를 하였으니
테스트용으로 HR 샘플 스키마를 설치한다.

oracle@solaris:~$ sqlplus sys as sysdba

Connected to:
SQL*Plus: Release 18.0.0.0.0 - Production on Sun Dec 2 06:50:10 2018
Version 18.3.0.0.0

Copyright (c) 1982, 2018, Oracle.   All rights reserved.

Enter password:

Connected to:
Oracle Database 18c Enterprise Edtion Release 18.0.0.0.0 - Production
Version 18.3.0.0.0

SQL> alter session set "_ORACLE_SCRIPT"=true;    -- 이걸 안해주면 아래와 같은 오류가 발생한다.

-- ora-20000 schema hr does not exist or insufficient privileges

SQL> @?/demo/schema/human_resources/hr_main.sql

specify password for HR as parameter 1:
Enter value for 1: hr

specify default tablespace for HR as parameter 2:
Enter value for 2: users

specify temporary tablespace for HR as parameter 3:
Enter value for 3: temp

specify log path as parameter 4:
Enter value for 4: $ORACLE_HOME/demo/schema/log/

……

Comment created.

Commit complete.

PL/SQL procedure successfully completed.


SQL>

2018년 12월 1일 토요일

oracle 18c install 관련하여

오랜만에 뜬금없이 solaris 11.4를 설치하고 무얼할까? 고민하다가
oracle 18c를 설치해 보기로 한다.
12c 이후로 참으로 오랜만에 oracle을 설치해본다.

우선은 https://docs.oracle.com/en/database/oracle/oracle-database/18/ssdbi/lot.html 페이지를 스르륵 한번 보는 걸로 시작.


설치하면서 잘 안되는 부분에 대해서만 나중에 잊어버리지 않기 위해 나름대로
정리를 해둔다.

우선  oracle을 설치전에 preinstall 패키지를 설치





oracle 유저 생성
오랜만에 하려니 이것도 옵션이 잘 기억이 나지 않네.


패스워드 설정







파일 다운 받아서 적절한 위치로 옮겨주고 unzip 해준뒤에
runInstaller을 수행한다.


순조롭게 잘 진행이 되다가 swap 관련 오류가 발생

swap 용량 확인 후 좀 늘려줘서 해결하고


아래는 공유 메모리 부족으로 오류 발생

공유 메모리를 좀 더 잡아주니 해결됨

$ dbca 수행 시작!
별 오류없이 순조롭게 잘 진행이 되고
설치는 완료

일단 재부팅을 한번 해주고

.profile 에 다음을 추가

$lsnrctl start를 했는데 뭔가 이상하다.
아래 그림의 아래에서 셋째줄
The listener supports no services


















listener.ora 파일을 수정



정지하고
 시작 하니 된다.


이제 오랜만에 sql 가지고 좀 놀아봐야겠다. ㅋㅋ

2018년 11월 29일 목요일

[Virtualbox] Guest OS solaris 11.4 Increse hdd size







How to resize a virtualbox VDI disk under windows

VBoxManage.exe 명령을 사용한다.

아래 명령을 관리자: 명령 프롬프트에서 수행 하면 끝
"c:\Program Files\Oracle\VirtualBox\VBoxManage.exe" modifyhd "C:\Users\bitnine\VirtualBox VMs\solaris\solaris.vdi" --resize 40960
0%...10%...20%...30%...40%...50%...60%...70%...80%...90%...100%


리눅스 문자와숫자 조합의 파일이름 정렬( Sort alphanumeric filenames in Linux )

아래 처럼 문자와 숫자가 섞여 있는 파일에 대해서 정렬이 제대로 되지 않을 때 When sorting is not done properly for files with mixed letters and numbers as shown below [codeh...