SID 파일을 적용하려는데 다음 오류가 난다.
ERROR: A lock is not available for SASHELP.CORE.CATALOG.
ERROR: The site validation data cannot be updated. This is most likely due to the fact that
the SASHELP catalog is not available in write mode, and/or that the SETINIT option
has not been specified when using the SAS command.
ERROR: Difficulty reading the site validation data.
라이선스 정보는 SASHELP.CORE 카탈로그에 기록된다. 이 카탈로그를 쓰기 모드로 열지 못하거나 -SETINIT 모드로 SAS 를 띄우지 않았을 때 나오는 오류다.
모든 SAS 세션과 서버를 내린다. Display Manager, Enterprise Guide, DI Studio 같은 클라이언트도 모두 닫는다.
cd <SASConfig>/Lev1
./sas.servers stop
리눅스에서는 누가 파일을 잡고 있는지 확인할 수 있다.
lsof | grep core.sas7bcat
fuser -v <SASROOT>/sashelp/core.sas7bcat
Windows 에서는 백신이나 백업 에이전트가 파일을 잠그는 경우가 있다.
proc options option=(sasroot sashelp) value;
run;
ls -ld $SASROOT/sashelp
ls -l $SASROOT/sashelp/core.sas7bcat
root_squash NFS 가 아닌가$SASHOME/SASDeploymentManager/9.4/sasdm.sh
Windows 에서는 sasdm.exe 를 관리자 권한으로 실행한다.
메뉴에서 Renew SAS Software 를 고르고 SID 파일을 지정한다.
$SASROOT/sas -setinit
"C:\Program Files\SASHome\SASFoundation\9.4\sas.exe" -setinit
에디터 창에 SID 파일의 갱신 블록을 붙여 넣고 실행한다.
proc setinit;
update;
run;
로그에 사이트 검증 데이터가 갱신됐다는 메시지가 나오고 오류가 없어야 정상이다.
제품 디렉터리가 정책상 읽기 전용인 환경에서는 쓰기 가능한 임시 SASHELP 를 앞에 두고 갱신한 뒤 파일만 되돌린다.
mkdir -p /opt/sashelp_rw
cp -a $SASROOT/sashelp/* /opt/sashelp_rw/
$SASROOT/sas -setinit -sashelp "/opt/sashelp_rw $SASROOT/sashelp"
갱신 후 core.sas7bcat 을 원래 위치로 되돌린다. 원본은 반드시 먼저 백업하고 권한과 소유자를 유지한다.
cp -p $SASROOT/sashelp/core.sas7bcat $SASROOT/sashelp/core.sas7bcat.bak
cp /opt/sashelp_rw/core.sas7bcat $SASROOT/sashelp/core.sas7bcat
proc setinit;
run;
로그의 만료일이 새 SID 기준으로 바뀌었으면 완료다.
core.sas7bcat 을 열고 있다-SETINIT 옵션 없이 실행했다root_squash 다