2003/02/24

StandAlone System 시스템 백업 및 복원

백업 시스템디스크 전체백업.
백업시 시스템상태 꼭. 백업.
hdd 관리도구에서 포맷후, 꼭 활성화 체크.
활성화를 할경우 bootable 상태가 됨. 복원.
시스템전체복원 및 시스템상태복원.
시스템상태 복원결과, 레지스트리 복사. winnt 폴더 전체 복사.
복원 hdd에 system 계정에 full 권한세팅.

2003/02/13

Oracle ODBC 세팅시 에러가 날 경우

Window상에 오라클을 설치했을 경우 관련 드라이버가 설치되었고, ODBC 및 OLE-DB 테스트에서 접속이 잘이루어 짐에도 불구하고, 다음과 같은 에러가 발생합니다.

현상:

Oracle 지원 ODBC 드라이버를 이용할경우
---------------------
Microsoft OLE DB Provider for Oracle (0x80004005)

Oracle 클라이언트 및 네트워킹 구성 요소가 없습니다. 이 구성 요소는
Oracle Corporation에서 제공하며 Oracle 버전 7.3.3 또는 그 이후 버전의 클라이언트 소프트웨어 설치의 일부입니다. 공급자가 작동하려면 이 구성 요소가 설치되어야 합니다.

MS 지원 ODBC 드라이버를 이용할경우
--------------------
Microsoft OLE DB Provider for ODBC Drivers (0x80004005)
[Microsoft][ODBC 드라이버 관리자] SQL_HANDLE_ENV에서 드라이버의 SQLAllocHandle을 실패했습니다.



원인:
Oracle ODBC 및 OLE-DB를 통해서 오라클서버에 접속할때, IIS의 asp에서 접속을 시도하게 됩니다. 그러나, 일반적으로 oracle 폴더는 관리자만 접근가능하도록 세팅이 되어 있습니다. 물론, 디폴트상태에서는 everyone 접근이지만, 보안을 강화하는 측면에서 관리자만 세팅을 해놓습니다.


그래서, iis의 실행계정인 IWAM_(computer이름) 이 접근을 하지 못해서 에러가 나는 것입니다. 그러나, 이런경우 에러메시지를 권한관련 에러를 뿌려야 하는데, 에러 메시지를 보면 드라이버 문제라고 표시를 합니다.


해결방법:

대상 디렉토리 : ORACLE_HOME 폴더(D:\Oracle\Ora81)
권한을 줄 개정 : IWAM_(computer이름)
권한의 종류 : 읽기 및 실행권한

여러 웹 서버에서 단일 로그온을 구현하는 방법

ㄴㅇㄹㄴㅇㄹ

2003/02/11

Windows2000 기본 서비스 포트 종류

The information in this article applies to:
- Microsoft Windows 2000 Advanced Server
- Microsoft Windows 2000 Server
-------------------------------------------------------------------------------

SUMMARY
=========
This article describes the most common ports, protocols, and services that are opened on a Windows 2000-based server that is running Active Directory. The purpose of this article is to list the different services and their respective ports, not to explain how to configure the ports for either a firewall or a proxy.


MORE INFORMATION
==================


21/TCP (Transmission Control Protocol) -- FTP
------------------------------------------
This File Transfer Protocol (FTP) server is part of Internet Information Services (IIS) and is administered from the IIS administration tool. FTP is a common method to transfer files between two networked computers and to enable the convenient use of remote file storage capabilities.

25/TCP -- SMTP
---------------
This Simple Mail Transfer Protocol (SMTP) service is administered from the IIS administration tool. SMTP is the protocol that is used to send e-mail messages by means of the Internet.


80/TCP -- HTTP
--------------
Hypertext Transfer Protocol (HTTP) is the set of rules for exchanging files (for example, text, graphic images, sound, video, and other multimedia
files) on the World Wide Web (WWW).In comparison to the Transmission Control Protocol/Internet Protocol(TCP/IP) suite of protocols (that are the basis for information exchange on the Internet), HTTP is a program protocol.


88/UDP (User Datagram Protocol) -- Kerberos
------------------------------------------
Kerberos protocol is a network authentication method that is based on the key distribution model. This protocol enables entities that are communicating over networks to prove their identity to each other and at the same time this protocol can prevent eavesdropping or replay attacks. The Kerberos Key Distribution Center (KDC) listens on this port for ticket requests. Port 88 for the Kerberos protocol can also be TCP/UDP.


119/TCP -- NNTP
--------------
Network News Transfer Protocol (NNTP) is the predominant protocol that is used by computers for managing the notes that are posted on Usenet newsgroups. NNTP servers manage the global network of collected Usenet newsgroups.


123/UDP -- 시간 동기화 서버


135/TCP -- RPC
--------------
Remote procedure call (RPC) is a facility that enables a program on one Windows-based computer (the client computer) to invoke the services of another program that is running on a separate Windows-based computer (the
server) in a distributed network.RPC is a program-level protocol that can use the communications services of any of the Windows networking protocols, which includes TCP/IP.


137/UDP -- NetBIOS Name Server
------------------------------
The network basic input/output system (NetBIOS) Name Server (NBNS) protocol, which is part of the NetBIOS over TCP/IP (NetBT) family of protocols, provides a means for hostname and address mapping on a NetBIOS-aware network.


138/UDP -- NetBIOS Datagram
---------------------------
The NetBIOS Datagram is part of the NetBIOS over TCP/IP (NetBT) family of protocols and is used for network logon and browsing.


139/TCP -- NetBIOS Session Services
-----------------------------------
NetBIOS Session Services are part of the NetBIOS over TCP/IP (NetBT) family of protocols and is used for server message block (SMB), file sharing, and printing.


389/UDP -- LDAP
---------------
LDAP is the Lightweight Directory Access Protocol. LDAP is designed to be a standard way of providing access to directory services. In Windows 2000, LDAP is the primary way that the operating system accesses the Active Directory database.


443/TCP -- HTTPS
----------------
Secure Hypertext Transfer Protocol (HTTPS) is a variant of HTTP that is used for handling secure transactions. HTTPS is a unique protocol that is Secure Sockets Layer (SSL) underneath HTTP.


445/TCP -- SMB
--------------
The SMB protocol is used for file sharing in Microsoft Windows NT and Windows 2000. Windows 2000 enables you to run SMB directly over TCP/IP, without the extra layer of NetBT.


464/TCP -- Kerberos Password V5
-------------------------------
The Kerberos change password protocol is used to deny an administrator from setting a password for a new user. This functionality is useful in some environments, and this proposal can be used to enable password setting. This protocol is used when users changes their passwords.


500/TCP -- ISAKMP
-----------------
Internet Security Association and Key Management Protocol (ISAKMP) or IKE (for Windows 2000) is the key exchange mechanism for a virtual private network (VPN). ISAKMP manages the exchange of cryptographic keys and employs a two-phase process for establishing the Internet Protocol security (IPSec) connection between two gateways.


563/TCP -- SNEWS
-----------------
SNEWS is secure NNTP.


593/TCP -- RPC over HTTP
------------------------
RPC over HTTP is used for COM+ Internet Services and requires IIS to operate.


636/TCP -- LDAP over SSL
------------------------
When SSL is enabled, LDAP data that is transmitted and received is encrypted.


1067/TCP -- Installation Bootstrap Service
--------------------------------------
The installation bootstrap protocol server.


1068/TCP -- Installation Bootstrap Service
--------------------------------------
The installation bootstrap protocol client.


1433/TCP - MSSQL Server


1521/TCP -- 오라클


1645/UDP -- IAS: Internet Authentication Service
-------------------------------------------
This service is used for processing Remote Authentication Dial-In User Service (RADIUS) authentication messages and is supported by IAS to provide backward compatibility with earlier RADIUS servers.


1646/UDP -- IAS: Internet Authentication Service
-------------------------------------------
This service is used for processing RADIUS accounting messages and is supported by IAS to provide backward compatibility with earlier RADIUS servers.


1701/UDP -- L2TP
----------------
Layer 2 Tunneling Protocol (L2TP) is a method for encapsulating standard Point-to-Point Protocol (PPP) by means of a variety of media. The protocol also enables encapsulation of PPP by using UDP packets.


1723/UDP -- PPTP
----------------
PPTP is an abbreviation for Point-to-Point Tunneling Protocol. It is an Internet protocol that is commonly used in VPN products. Windows NT supports PPTP server, and both Windows NT and Microsoft Windows 95 support PPTP client.


1755/TCP/UDP -- 윈도우 스트리밍 서비스


1812/UDP -- IAS Internet Authentication Service
------------------------------------------
This service is used for processing RADIUS authentication messages.



1813/UDP -- IAS Internet Authentication Service
------------------------------------------
This service is used for processing RADIUS authentication messages.



3268/TCP -- Microsoft Global Catalog
----------------------------------
Active Directory global catalogs listen on this port.


3269/TCP -- Microsoft Global Catalog with LDAP/SSL
-----------------------------------------------
Microsoft global catalog SSL connections listen on this port.



3389/TCP -- RDP
---------------
Remote Desktop Protocol (RDP) is the protocol that enables a thin client to communicate with the Terminal server over the network. This protocol is based on the International Telecommunication Union (ITU) T.120 protocol, an international, standard multiple-channel conferencing protocol that is currently being used in the Microsoft NetMeeting conferencing software product.


4899 - Remote Administrator

WSH 및 CDONTS를 사용 예약 전자 메일 메시지 만들기

Windows NT Option Pack(NTOP) 및 Windows 2000은 SMTP(Simple Mail Transfer Protocol) 서비스를 기본적으로 설치하여 일반적으로 전자 메일 기반 HTML 양식 처리를 위한 ASP(Active Server Page)를 통해 이를 다양한 목적으로 사용할 수 있도록 합니다. 다음 예제에서는 메일 보내기를 위한 WSH 스크립트뿐만 아니라 메일 보내기를 위한 예약 작업 및 메일 내용을 업데이트할 수 있는 텍스트 파일의 작성을 단계별로 설명합니다.
  1. 예약 작업을 설정하는 첫 단계로 스케줄러 서비스가 실행 중인지 확인합니다.
    1. 작업 표시줄에서 시작, 설정을 차례로 누른 다음 제어판을 누릅니다.
    2. 제어판에서 서비스 애플릿을 두 번 누릅니다.
    3. 작업 스케줄러 서비스가 나올 때까지 아래로 스크롤합니다.
    4. 상태실행 중으로 표시되어 있는지 확인합니다.
    5. 시작자동으로 표시되어 있는지 확인합니다.
    6. 닫기를 눌러 서비스 애플릿을 종료하고 제어판을 닫습니다.
  2. 다음 내용의 텍스트 파일을 만들고 컴퓨터에 C:\Mailout.txt로 저장합니다.
    <p>This is line 1.</p> <p>This is line 2.</p>
  3. WSH 스크립트를 만들어서 방금 만든 텍스트 파일을 읽습니다. 다음 코드를 복사하여 컴퓨터에 "C:\mailout.vbs"로 저장합니다. 보내는 사람/받는 사람을 사용자 지정하려면 strFromstrTo 변수 값을 변경합니다.


  4. 보낼 메일의 예약 작업을 만듭니다. 명령 세션을 열고 다음 예와 같이 입력합니다. 다음 작업은 오후 9시에 한 번 실행됩니다. AT 9:00pm Cscript.exe C:\Mailout.vbs 다음 작업은 매주 월요일 오전 6시에 실행됩니다. AT 6:00am /every:M Cscript.exe C:\Mailout.vbs 다음 작업은 매월 1일 오전 1시에 실행됩니다. AT 1:00am /every:1 Cscript.exe C:\Mailout.vbs 위의 작업에서 선택한 예약 시간이 되면 전자 메일이 보내집니다.



10-TechNetB_masthead_ltr.gif

테이블에서 중복 행을 제거하는 방법

Microsoft SQL Server 테이블에는 중복 행이나 고유하지 않은 기본 키가 없어야 합니다. 본 문서에서는 기본 키를 간략히 "키" 또는 "PK"로 지칭하기도 합니다. 그렇다고 해서 "키" 또는 "PK"가 반드시 "기본 키"를 나타내는 것은 아닙니다.

중복 PK는 엔티티 무결성을 위반하는 것이며 관계형 시스템에서는 허용되지 않습니다. SQL Server에는 엔티티 무결성을 유지하기 위한 인덱스, UNIQUE 제약 조건, PRIMARY KEY 제약 조건, 트리거 등의 다양한 메커니즘이 포함되어 있습니다.

그럼에도 불구하고 중복된 기본 키가 발생하는 예외적 경우가 있습니다. 이런 경우에는 중복된 기본 키를 제거해야 합니다. 중복 PK가 SQL Server 외부의 비관계형 데이터에 존재하고 PK 고유성이 항상 유지되도록 설정되지 않은 상태에서 데이터를 들여올 경우가 여기에 해당합니다. 각 테이블에서의 엔티티 무결성이 항상 유지되도록 설정하지 않는 등의 데이터베이스 디자인 오류로 인해서도 중복된 기본 키가 발생합니다.

대개 고유 인덱스를 만들려고 할 때 중복 PK가 발견되는데, 이런 경우에는 다음 메시지와 함께 작업이 중단됩니다. 이 메시지는 다음과 같습니다.

Msg 1505, Level 16, State 1 Create unique index aborted on duplicate key.

다음은 중복된 기본 키를 확인하고 제거하는 절차입니다.
create table t1(col1 int, col2 int, col3 char(50))
insert into t1 values (1, 1, 'data value one')
insert into t1 values (1, 1, 'data value one')
insert into t1 values (1, 2, 'data value two')

1. 첫 단계는 중복된 기본 키 값이 있는 행을 확인하는 것입니다.
SELECT col1, col2, count(*) FROM t1 GROUP BY col1, col2 HAVING count(*)

결과값이 1 이상일 경우 중복값이 있음을 의미합니다.

중복 PK 값의 집합이 많지 않은 경우 가장 좋은 방법은 이들 집합을 수동으로 하나씩 삭제하는 것입니다.

예를 들면 다음과 같습니다.

set rowcount 1 delete from t1 where col1=1 and col2=1

rowcount 값은 주어진 키 값의 중복 수에서 1을 뺀 값(n-1)이어야 합니다. 이 예에서는 2개의 중복이 있으므로 rowcount가 1로 설정됩니다. col1/col2 값은 위의 GROUP BY 쿼리 결과에서 가져온 것입니다. GROUP BY 쿼리가 여러 행을 반환하는 경우 "set rowcount" 쿼리를 각 행에 대해 한 번씩 실행해야 합니다. 이를 실행할 때마다 rowcount를 특정 PK 값의 중복 수에서 1을 뺀 값(n-1)으로 설정합니다.

행을 삭제하기 전에 행 전체가 중복인지 확인해야 합니다. 가능성이 희박하기는 하지만 PK 값이 중복되고 행 전체는 중복되지 않을 수 있습니다. 이것의 예로 기본 키가 사원 번호인 테이블에 번호는 같지만 각각 고유한 속성을 갖는 두 명의 다른 사람(또는 행)이 있는 경우를 들 수 있습니다. 이러한 경우 중복 키로 인해 행에 유효한 고유 데이터가 온 것일 수도 있습니다. 이 데이터는 나중에 조사 및 조정할 수 있도록 삭제 전에 복사해 놓고 보존해야 합니다.

테이블에 서로 다른 중복 PK 값의 집합이 많은 경우 이들 집합을 하나씩 제거하는 것은 너무 시간 낭비일 수 있습니다. 이러한 경우 다음 절차를 사용할 수 있습니다.

먼저, 위의 GROUP BY 쿼리를 실행하여 중복 PK 값의 집합 수와 각 집합의 중복 수를 파악합니다. 중복 키 값을 선택하여 보관 테이블에 넣습니다. 예를 들면 다음과 같습니다.

SELECT col1, col2, col3=count(*) INTO holdkey
FROM t1 GROUP BY col1, col2
HAVING count(*)

중복 행을 선택하여 보관 테이블에 넣고 처리 중인 중복을 제거합니다. 예를 들면 다음과 같습니다.

SELECT DISTINCT t1.* INTO holddups
FROM t1, holdkey
WHERE t1.col1 = holdkey.col1 AND t1.col2 = holdkey.col2

이 시점에서 holddups 테이블에 고유한 PK가 있어야 하지만 위의 SSN 예에서와 같이 t1에 중복 PK와 고유한 행이 동시에 있는 경우에는 이 테이블의 PK가 고유하지 않게 됩니다. holddups의 각 키가 고유한지, 중복 키와 고유 행이 동시에 존재하지 않는지 확인하십시오. 중복 키와 고유 행이 같이 존재하는 경우에는 일단 작업을 중단하고 주어진 중복 키 값을 보관할 행을 조정해야 합니다. 예를 들어, 아래 쿼리는

SELECT col1, col2, count(*)
FROM holddups
GROUP BY col1, col2

각 행에 대해 1의 개수를 반환해야 합니다. 쿼리가 각 행에 대해 1의 개수를 반환하면 아래의 5단계로 갑니다. 그렇지 않은 경우에는 중복 키와 고유 행이 같이 존재하는 것이므로 저장할 행을 결정해야 합니다. 이를 위해 대개 행을 삭제하거나 이 행에 대한 고유 키 값을 새로 만듭니다. holddups 테이블의 이러한 각 중복 PK에 대해 이들 절차 중 적절한 방법을 사용하십시오. 원본 테이블에서 중복 행을 삭제합니다. 예를 들면 다음과 같습니다.

DELETE t1 FROM t1, holdkey
WHERE t1.col1 = holdkey.col1 AND t1.col2 = holdkey.col2

고유 행을 다시 원래 테이블에 넣습니다. 예를 들면 다음과 같습니다.

INSERT t1 SELECT * FROM holddups


출처 : 데브피아

2003/02/10

서비스 팩 3 설치 후 성능모니터 에러 해결방법

서비스 팩 3 설치 후 성능 카운터 개체가 나타나지 않는 현상.

■ 현상
Windows 2000 서비스 팩 3을 설치한 이후 관리 도구성능에서 카운터 추가를 할 때 성능 개체와 성능 카운터가 나타나지 않을 수 있습니다.

■ 원인
Windows 2000 서비스 팩 3의 문제입니다. ---> 현재 나온 SP4를 설치하시면 됩니다.

■ 해결 방법
이 문제를 해결하려면 다음 방법 중 한 가지를 사용하십시오.

1.핫픽스 설치
한글 Windows 2000 핫픽스는 다음 위치에서 다운로드할 수 있습니다.

http://download.microsoft.com/download/win2000platform/Patch/Q327384/
NT5/KO/Q327384_W2K_SP4_X86_KO.exe


2.레지스트리 변경
레지스트리 편집기(Regedt32.exe)를 시작합니다. 아래의 레지스트리 키를 찾습니다. HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\WindowsNT\
CurrentVersion\Perflib\CollectUnicodeProcessNames


편집 메뉴에서 DWORD를 눌러 데이터를 1에서 0으로 변경한 후 확인 버튼을 누릅니다.
  • 레지스트리 편집기를 종료합니다.

    *레지스트리를 직접 수정하는 방법을 추천합니다.



  • 09-TechNetB_masthead_ltr.gif

    가장 많이 본 글