My Name is Kay....

DIY , 먹방 , 개발 , 육아 , 여행 좋아합니다.
AdBlock 사용시 화면이 정상적으로 노출되지 않습니다.
포스팅 관련 문의 및 개발 문의는 Email : wkzkfmxksi@gmail.com

추가 포스팅이 이뤄지지 않는 블로그입니다. 문의는 wkzkfmxksi@gmail.com 으로 연락주세요.
kay
조회 수 12861 추천 수 0 댓글 0
?

단축키

Prev이전 문서

Next다음 문서

크게 작게 위로 아래로 댓글로 가기 인쇄
?

단축키

Prev이전 문서

Next다음 문서

크게 작게 위로 아래로 댓글로 가기 인쇄

EXEC master.dbo.xp_fixeddrives 프로시저를 실행해보면

물리 디스크의 잔여 용량을 확인할수 있습니다..


응용하여 메일링 및 SMS 발송을 통해 모니터링 , 통계가 가능합니다.


create table #driveInfo(drive varchar(1), [freesize(MB)] int, insertTime datetime default(getdate()))

BEGIN
	insert #driveInfo (drive, [freesize(MB)]) EXEC master.dbo.xp_fixeddrives
END

declare @size as float
declare @sizeGB as float
declare @sendSize as varchar(50)
 
select top 1 @size = [freesize(MB)] from #driveinfo where drive = 'D' order by insertTime desc

set @sizeGB = @size / 1024
set @sendSize = str(round(@sizeGB,2),5,2)

select @sendSize

if @size < 5120
	begin
		print '약 5기가미만으로 남았습니다.'
	end

drop table #driveInfo
?

  1. split 함수 "구분자로 문자열 쪼개기"

    Date2013.08.19 Bykay Views8620
    Read More
  2. MS-SQL Express 원격접속 허용하도록 셋팅하기

    Date2013.05.12 Bykay Views9670
    Read More
  3. 특정 사용자에게 특정 테이블 , 뷰테이블 등.. 권한주기

    Date2014.02.12 Bykay Views9945
    Read More
  4. SQL Server 상태 모니터링

    Date2013.11.14 Bykay Views11449
    Read More
  5. 물리적 스토리지 용량 체크하기 (exec master.dbo.xp_fixeddrives)

    Date2013.05.23 Bykay Views12861
    Read More
  6. 특정 컬럼 , 타입 , 테이블 조건 확인하기 - information_schema .columns

    Date2013.05.09 Bykay Views15739
    Read More
  7. 테이블 정의서 생성

    Date2013.03.15 Bykay Views17631
    Read More
  8. 테이블별 사이즈 및 Row 수 체크하기

    Date2013.08.26 Bykay Views25248
    Read More
Board Pagination Prev 1 2 3 Next
/ 3