디비 및 웹소스 로컬에 백업하고 ftp로 리모트에 보내는 쉘

#!/bin/bash #dump ‘puzzl’ /usr/local/mysql/bin/mysqldump -u아이디 -p패스워드 puzzle > /home/puzzle/data/puzzle_$(date +%Y%m%d).sql #web source cd /home/puzzle tar zcvf puzzle_$(date +%Y%m%d).tar.gz htdocs mv puzzle_$(date +%Y%m%d).tar.gz data # 3일 지난것들은 삭제한다. find /home/puzzle/data -atime +3 -exec rm -f {} \; # 186 서버로 파일들 … Continue reading

오페라 카르멘을 보다.

http://bluesoul.pe.kr/blueblog/attachfile/DSCF0387.jpg 간만의 문화생활.. 더구나 오페라.. 내 인생의 기억속에 그다지 아니 거의 자리잡고 있지 않은 단어이다. 돈좀 있는 넘들은 오페라다 발레다 유명 교향악단 공연이다 하는 것들을 즐기는 모양이지만 나같은 이들은 초대권이나 어디서 생겨야 이게 무슨 횡재인가 하며 가기 마련이다. 돈주고 보기엔 … Continue reading

특정디비의 모든 테이블의 row수 알아내기 2

예전에 프로시저로 만들었었는데. –> http://222.112.187.32:9090/solui/blueboard/board/solui_study/content.asp?b_nm=solui_study&s_num=61&GotoPage=1&order= 그냥 sql문도 함 보자.. set nocount on declare @name varchar(80) select @name = ‘ while @name is not null begin select @name = min(table_name) from information_schema.tables where table_type = ‘base table’ and table_name > @name … Continue reading

COMPUTE 와 COMPUTE BY 쓰기

group by 는 그룹에 대한 부분합계를 볼수 있다. 하지만 상세내역을 볼수는 없다. 상세내역과 그룹합계를 모두 한꺼번에 볼수는 없을까.. 그게 바로 compute와 compute by 문이다. 전체 평균과 그룹별 평균을 구해보자 select avg(price) from titles : 전체평균 select type, avg(price) from titles … Continue reading

페이지 75 의 108« 처음...102030...7374757677...8090100...마지막 »