# 프로시저 실행 스크립트를 생성.
   - 해당 서버에 오라클이 설치된 환경으로 수정.

localhost:/export/home/oracle] cat procedureScript.sh

#!/bin/sh
export ORACLE_HOME=/app/oracle/product/10.1.0
export ORACLE_SID=orcl

/app/oracle/product/10.1.0/bin/sqlplus -s 오라클ID/PASSWD << EOF

SET SERVEROUTPUT ON  -- DBMS_OUTPUT 출력
SET TIMING ON
SET TIME ON

EXEC PROCEDURE_NAME('');  -- 프로시저 실행

EOF



echo " " >> /oracle/log/report_$TODAY.txt
echo " " >> /oracle/log/report_$TODAY.txt
echo " This is End ~!" >> /oracle/log/report_$TODAY.txt

cat /oracle/log/report_$TODAY.txt | mail -s "[FREEUSE - STAT] TODAY report" sunshiny@sunshiny.co.kr



# root 계정으로 /var/spool/cron/crontabs/oracle 크론 파일을 생성.

localhost:/var/spool/cron/crontabs] cat oracle

# Oracle Procedure Start - 20110311
# 새벽 1시에 스크립트 실행
0 1 * * * /export/home/oracle/procedureScript.sh




03 11, 2011 18:04 03 11, 2011 18:04

Trackback URL : http://develop.sunshiny.co.kr/trackback/590

Leave a comment


Service management details

svcs(1) command

System administrators can more easily monitor services using Solaris Service Manager’s service status information and service activation/deactivation interfaces based on the commands (svcs(1), svcadm(1) etc). Until Solaris 9, it was a complicated procedure to understand service status. Service level information was not provided and system administrators have to assume service status from their own analysis of kernel level information. A slow and error prone process.

svcadm(1M) command

Services and the services on which they depend are started in their appropriate order using the Solaris Service Manager svcadm(1) command. System administrators are longer required to run complicated service startup operations.

For example, if there are two services, Service A and Service B, and Service A depends on Service B, previously the system administrator needed to start the services paying close attention to their dependent relationship. Now with Solaris10, they only have to start Service A. Solaris Service Manager automatically detects that Service B needs to be started, and starts the services in the right sequence.

사용자 삽입 이미지

With Solaris 10 the traditional service stop procedure using the kill(1) or pkill(1) commands is no longer available. This is because, once stopped, Solaris Service Manager will automatically restart them. So a new command, svcadm (1M) is now used for stopping services.

References
  Solaris 9 or earlier versions Solaris 10
Service status ps(1) command
(only process information is shown)
svcs(1) or ps(1) command
Service stop # /etc/init.d/cron stop # svcadm disable -t
system/cron:default
Service restart (temporary) # /etc/init.d cron start # svcadm enable -t
system/cron:default
Service stop
After service restart the service isn't started
(1)# /etc/init.d/cron stop
(2)# mv /etc/rc2.d/S75cron /etc/rc2.d/_S75cron
(Need to rename the service start script)
# svcadm disable -t
system/cron:default
Service restart (permanent) (1) # /etc/init.d/cron stop
(2) # /etc/init.d/cron start
# svcadm restart -t
system/cron:default


- Solaris 10 간단한 재실행
# svcs cron
STATE          STIME    FMRI
online          4월_26  svc:/system/cron:default
# svcadm restart cron
#
# svcs cron
STATE          STIME    FMRI
online         11:26:41 svc:/system/cron:default


출처 : http://www.fujitsu.com/global/services/computing/server/unix/os/solaris10/self-healing/ssm/

05 7, 2010 11:34 05 7, 2010 11:34

Trackback URL : http://develop.sunshiny.co.kr/trackback/456

Leave a comment


1. Crontab에 등록하기


등록: crontab -e 계정


보기: crontab -l


crontab file은 각 entry마다 여섯개의 field로 구성되어있다. 각 필드는 space 나  tab으로 구분한다.

#bpm process call(normal work)
 0 1 * * * /usr/j2se/bin/java -Dfile.encoding=8859_1 -classpath /data/jeus/ksd/WEB-INF/classes ksd.common.DailyScheduler


#apache daily call
 59 23 * * * /home/shell/apache_daily.sh

  |  | | | | |

  |  | | | | 명령어라인

  |  | | | 주필드(0~6)

  |  | | 월필드(1~12)

  |  | 일필드(1~31)

  |  시필드(0~23)

  분필드(0~59)



2. class 실행하기


/usr/j2se/bin/java -Dfile.encoding=8859_1 -classpath /data/jeus/ksd/WEB-INF/classes ksd.common.DailyScheduler

-Dfile.encoding=8859_1
or
-Dfile.encoding=KSC5601


출처 : http://blog.paran.com/mudongi/12396788

 

04 25, 2009 13:10 04 25, 2009 13:10

Trackback URL : http://develop.sunshiny.co.kr/trackback/204

Leave a comment


Recent Posts

  1. EditPlus - 문자열 검색및 변경 팁
  2. Unix - 압축 파일 내용 조회및 풀기
  3. Java - Class 버전 확인
  4. Linux - Telnet 서비스 비활성및 실행
  5. NT - 서버 원격데스크탑 연결

Recent Comments

  1. 네. 고맙습니다^^ 행복한 한해 보... sunshiny 01 16,
  2. sunshiny님. 안녕하세요... 올려 주... yihans 01 16,
  3. 답글 주셔서 고맙습니다^^ 소스 복... sunshiny 01 11,
  4. 관리자만 볼 수 있는 댓글입니다. 비밀방문자 01 11,
  5. 넵 답변감사합니다^^ 좋은 하루 되... 노로링

Recent Trackbacks

  1. 윈도우 cmd 명령어 팁 월풍도원(月風道院) - Delight on th... %M
  2. 파일 압축 Like RadioHead %M
  3. Mysql - mysql 설치후 Character set... 멀고 가까움이 다르기 때문 %M

Calendar

«   02 2012   »
      1 2 3 4
5 6 7 8 9 10 11
12 13 14 15 16 17 18
19 20 21 22 23 24 25
26 27 28 29      

Bookmarks

  1. 위키피디아
  2. MysqlKorea
  3. Oracle All Documentation
  4. 엑셈
  5. 오라클 클럽
  6. 네이버개발자센터
  7. API - Java
  8. API - Spring
  9. Java Community
  10. Reference - Spring
  11. 스프링사용자
  12. 자바소스
  13. 자바지기
  14. Ready System
  15. Solaris Freeware
  16. Linux-Site
  17. RedHat Korea
  18. 윈디하나의 솔라나라

Site Stats

TOTAL 222016 HIT
TODAY 44 HIT
YESTERDAY 312 HIT