안드로이드 개발자에게 오류 알림
public void uncaughtException(Thread t, Throwable e) { sendEmail(stacktrace); defaultUEH.uncaughtException(t, e); } private void sendEmail(String stacktrace) { Intent intent = new Intent(Intent.ACTION_SEND); intent.setType("message/rfc822"); intent.putExtra(Intent.EXTRA_EMAIL , new String[]{Constants.DEVELOPER_EMAIL}); intent.putExtra(Intent.EXTRA_SUBJECT, "개발자에게 오류 알림"); String body = ""; body = "보내주신 오류를 분석하여 최대한 빠른 시간 안에 수정하여 패치하겠습니다."; body += "\n " + appName +"["+android.os.Build.VERSION.RELEASE+"-"+android.os.Build.MODEL+"]"; body += "\n " + stacktrace; intent.putExtra(Intent.EXTRA_TEXT , body); this.activity.startActivity(Intent.createChooser(intent, "개발자에게 오류 알림")); }
xp_ReadErrorLog
xp_enumerrorlogs : DBA를 위한 비공식 프로시져
xp_readerrorlog : sp_readerrorlog 0, 1, 'Failed', 'login'
설명 : http://www.sqlteam.com/article/using-xp_readerrorlog-in-sql-server-2005
오류로그 초기화)
sp_cycle_errorlog
JDBC로 모니터 프로그램 개발)
sql = (" { call sp_readerrorlog ( 0, 1, 'Failed', 'login' )}");
pstmt = conn.prepareStatement(sql);
rs = pstmt.executeQuery();
.오류내용)
com.microsoft.sqlserver.jdbc.SQLServerException: 업데이트에 대한 결과 집합이 생성되었습니다.
com.microsoft.sqlserver.jdbc.SQLServerException: 'xp_readerrorlog'이(가) 프로시저 개체이므로 프로시저 'xp_readerrorlog'을(를) 요청하지 못했습니다.
output 매개 변수로 선언되지 않았지만 실제 매개 변수가 요청된 출력에 전달되었습니다
.'DB > MSSQL' 카테고리의 다른 글
MSSQL 오류 순환 문제 (0) | 2016.06.05 |
---|---|
MSSQL Bruteforce 공격 차단 방법 (0) | 2016.06.05 |
MSSQL OS 메모리 사용량 확인 (0) | 2016.06.05 |
MSSQL DMV (동적 관리 뷰) (0) | 2016.06.04 |
MSSQL Server Management Studio 사용 권한 (0) | 2016.06.04 |