1. 노턴 안티바이러스가 설치되있는 경우 스크립트 차단기능 때문에 FSO 사용시 Hang 발생한다.

해결법 : 노턴 안티바이러스 환경설정-옵션에서 스크립트 차단기능 해제하고 재부팅 하라는 내용.

PRB: Antivirus Software Causes FileSystemObject Calls to Hang IIS (Q295375)

--------------------------------------------------------------------------------
The information in this article applies to:


Microsoft Active Server Pages


--------------------------------------------------------------------------------


SYMPTOMS
When you browse an Active Server Pages (ASP) page that contains FileSystemObject calls, the request
for that page stops responding (hangs) and eventually times out in the browser.



CAUSE
This problem occurs because the Script Blocking feature in Norton AntiVirus software blocks
scripting operations that access the file system, such as FileSystemObject . Although this problem
is prevalent in Active Server Pages (ASP) Web applications, it can also occur in other
technologies, such as Windows Scripting.

NOTE: This problem occurs even if Norton AntiVirus has been disabled.



RESOLUTION
To resolve this problem, contact Norton AntiVirus Software Support. The following Symantec Web site
describes how to remove the Script Blocking feature:

http://service1.symantec.com/SUPPORT/nav.nsf/aab56492973adccd8825694500552355/399a443be88ce25788256a
0e0068e180?OpenDocument
NOTE : You may have to reboot the server after you make the above-mentioned changes to the Norton
AntiVirus software.

The third-party contact information included in this article is provided to help you find the
technical support you need. This contact information is subject to change without notice. Microsoft
in no way guarantees the accuracy of this third-party contact information.



--------------------------------------------------------------------------------
Published Apr 10 2001 8:10AM Issue Type kbprb
Last Modifed Oct 30 2001 10:35AM Additional Query Words hang fail Anti-Virus iis 5
Keywords kbASP kbScript kbSecurity kbWebServer kbGrpDSASP kbDSupport kbFSO


Posted by Gu Youn
,
1. smalldatetime 타입 컬럼에 인서트 하기

ms-sql server의 smalldatetime에 인서트 하기 위해서는 YYYY-MM-DD HH:II:SS으로 변환해야 한다.

'asp 예제..
'YYYY-MM-DD HH:II:SS 형식으로 변환
end_time = Year(now)&"-"&Month(now)&"-"&Day(Now)&" "&FormatDateTime(now, 4)

2. 같은 이름의 form 요소 배열로 처리하기
  html에 파일의 인풋폼들의 이름이 같은경우 asp의 Request("schedule_id")에 ","를 구분기호로 해서 들어가 있다. 각 요소마다 접근하기 위해서는 아래 예처럼 하면 됨.
  -html-
  <input type="text" name="schedule_id" >
  <input type="text" name="schedule_id" >
  <input type="text" name="schedule_id" >

  -asp-
  Dim i ,strWhere
  i = 0

        for i = 1 to Request("schedule_id").Count
    if i = 1 then
      strWhere = "WHERE schedule_id="&trim(Request("schedule_id")(i))
                else
      strWhere = strWhere & " Or schedule_id="&trim(Request("schedule_id")(i))
    end if
        next


3. 웹 서버 이름
-asp 코드-
<%
  Dim strSName    : strSName = Request.ServerVariables("SERVER_NAME")
%>
<script language="javascript">
<!--
alert("<%= strSName %>");
-->
</script>

-결과-
사용자가 브라우져 주소창에 www.youngu.info를 입력해서 접속한 경우 strSName은 www.youngu.info가 된다.

4. 사용자 아이피 및 HTTP 헤더
request.servervariables("remote_addr")

Response.Write request.servervariables(1) 'http 모든 헤더를 화면에 출력한다.

5. ASP 페이지 내에서 에러(Error) 처리

SQL = "DELETE FROM test_cont_info_tbl "&strWhere
AdoDb.Execute(sql)
Select Case Err.Number
  Case 0
  Case 1
     ' 에러코드 1일 경우 처리
  Case Else
     ' 그밖의 에러 처리
     AdoDb.Close
     Set AdoDb = nothing
     Response.End
End Select

6. Transaction 처리
          On Error Resume Next        
         
          Dbcon.Execute SQL,LngRecs,adCmdText + adExecuteNoRecords
         
          Dim errCount
          errCount = Dbcon.Errors.Count

                If errCount = 0 Then
             DbCon.CommitTrans
             Response.Write "총 " & LngRecs & " 건의 레코드가 반영되었습니다..."
                Else
             DbCon.RollbackTrans        
             response.write "에러가 발생했습니다...따라서 DB에 반영되지 않았습니다....<br>"
             response.write "원인 : " & Err.Description
             Err.clear
                End If        
       
          Dbcon.Close
          Set Dbcon = nothing
Posted by Gu Youn
,
1. 디렉토리 크기 알아보기
du -s -h [directory name]

2. 설치된 rpm 알아보기
모든 설치된 패키지 리스트 : rpm -qa
특정 패키지 검색 : rpm -qa [package_name]
                    rpm -qa | grep [search_string]

3. 한 스크린에 출력할 수 없는 경우 (윈도우의 dir /p)
ls -al | more

4. 커널 버젼(kernel Version)
uname -a

5. 설치된 OS 종류
cat /etc/*release

6. CPU 정보
cat /proc/cpuinfo

7. 사용자(계정) 추가하기
그룹을 추가한다. :  groupadd -g 1000 user
사용자를 추가한다 : adduser -g 1000 -G user -d /home/happy -m -s /bin/bash happy

8. 파일 찾기
updatedb
locate [search_word]

9. 파일이름 일괄 변경
현재 디렉토리 .jsp를 .old로 변경
ls -1 *.jsp | sed "s/(.*).jsp$/mv '&' '1.old' /" | sh

서브디렉토리 포함 .jsp를 .old로 변경
find . -name "*.jsp" | sed "s/(.*).jsp$/mv '&' '1.old' /" | sh

(홈페이지에 2002-11-08 10:55:20에 올렸던 것을 옮김)
Posted by Gu Youn
,
  Dim arrList
  if Rs.Eof or Rs.Bof then
                arrList = ""
        else
          arrList = Rs.getString()
        end if
       
        if arrList <> "" then
    Dim arrRecord, arrColumn, inum
    arrRecord = Split(arrList,chr(13))
        else
                Response.end
        end if

        'arrRecord(Ubound(arrRecord))에는 마지막 vbCrLf뒤의 널값이 들어가므로 arrColumn으로 나누면 에러남
        '예를 들어 Ubound(arrRecord)값이 6이라면 arrRecord(6)은 NULL이므로 arrRecord(0)~arrRecord(5)까지만 사용한다
        for inum=0 to Ubound(arrRecord)-1
    arrColumn = Split(arrRecord(inum), Chr(9))
  next
Posted by Gu Youn
,
1. MS-SQL 의 두개 이상의 인스턴스가 설치된 컴퓨터와 같은 네트웍에 있는 경우에는 설치된 컴퓨터 이름에 인스턴스명을 붙여서 등록을 하면 된다.  
ex) SQLSERVERInstance1 , SQLSERVERInstance2

2. 같은 네트웍에 있지 않은 경우
클라이언트네트웍 유틸리티(Client Network Utility)를 이용해서 별명(Alias)를 만들어서 등록할때 사용한다. 이후 과정은 1번과 비슷하게 이루어진다. 별명을 만들때 Dynamically determine port 옵션을 해제하고 직접 포트 번호를 적어준다. 포트 번호는 SQL이 설치된 서버의 EM에서 등록정보 일반탭의 네트웍 구성(Network Configuration)을 살펴보면 포트번호를 알 수 있다.

'Computer > Database' 카테고리의 다른 글

MySQL 팁  (4) 2005.07.10
MS-SQL - ConnectionString 샘플  (14) 2005.07.10
MS-SQL - 패치및 서비스팩 적용에 따른 버전 정보  (6) 2005.07.10
데이터 베이스 잡담...  (4) 2003.05.23
Oracle 기본 정리  (3) 2003.03.26
MS-SQL 기본 정리  (16) 2002.10.07
Posted by Gu Youn
,