반응형



re: 윈도우 업데이트 문제 해결해주세여
시작 - 실행 - cmd 입력

net stop wuauserv
proxycfg -d
proxycfg -u
net start wuauserv

거의 모든 문제는 해결됩니다.

 

========================================================================

 

참조사이트: http://laigo.kr/65 

Proxy 를 사용하는 환경에서 윈도우 업데이트 실패 이슈와 관련하여 아래와 같이 정리하였습니다.


[환경]


[참고자료]
Windows Update 웹 사이트 또는 Microsoft Update 웹 사이트를 사용하려고 하면 "오류 0x80072EE2", "오류 0x80072EE7", "오류 0x80072EFD", "오류 0x80072F76" 및 "오류 0x80072F78" 오류 메시지가 나타난다
http://support.microsoft.com/kb/836941/ko

WinHTTP 5.1에 Proxycfg.exe 구성 도구를 사용할 수 있다
http://support.microsoft.com/kb/830605

About WinHTTP
http://msdn.microsoft.com/en-us/library/aa382925(VS.85).aspx

참조 : http://blog.daum.net/hscense/11792291

반응형
반응형

윈도우즈 업데이트시 아래와 같은 오류가 발생할때ㅣ.ㅣ

403 - Forbidden: Access is denied



윈도우즈 업데이트 에이전트 설치 오류시...

There was a new update to the Windows Update Software that you may not have downloaded.

Please download it from the links below.  Also note that there are 32 bit versions and 64 bit versions, please download the version that you require.

Please see the following KB article for the details (and download links):

http://support.microsoft.com/default.aspx/kb/946928

To speed things up, I'll link the downloads directly:

(32 Bit) x86: http://download.windowsupdate.com/windowsupdate/redist/standalone/7.4.7600.226/windowsupdateagent30-x86.exe
(64 Bit) x64: http://download.windowsupdate.com/windowsupdate/redist/standalone/7.4.7600.226/windowsupdateagent30-x64.exe

Thanks!
반응형
반응형
제품 : JDBC

작성날짜 :

FILE을 CLOB에 INSERT하고, 반대로 컬럼을 읽어 FILE로 WRITE하는 JDBC PROGRAM 예제 (JDBC 8.1 이상)



PURPOSE

text file을 읽어서 CLOB column 에 저장하는 방법과, CLOB column의 데이타를
읽어서 file로 write하는 방법을 예제를 통해서 살펴본다.


Explanation



oracle.sql package에서 제공하는 CLOB class를 이용한다.
file의 내용을 읽어 CLOB type에 저장할 때는 CLOB.getCharacterOutputStream을
이용하고, 반대로 file에 write를 위해 CLOB type을 읽을 때는
clob.getCharacterStream() 를 이용한다.

Oracle JDBC driver 8.1.x 이상 version의 classes12.zip file이 CLASSPATH에
지정되어 있어야 한다. JDK는 1.2 이상을 사용한다.

[참고] 화일을 이용하지 않고 직접 text를 CLOB에 입력하고, 입력된 CLOB
데이타를 화면에 display하기 위해서는 아래 bulletin을 참고한다.
<Bulletin No: 19360>: Subject: ORACLE.SQL.CLOB CLASS를 이용하여
4000 BYTES이상의 CLOB TEXT 데이타를 저장하고, 조회하는 예제

Example


1. 테이블의 생성과 데이타 입력

미리 다음 작업이 수행되어 있어야 하며, 이 작업도 java application내에
statement.execute를 통해 포함시킬 수 있다.

sqlplus scott/tiger
SQL> create table test_clob(id number, c clob);
SQL> insert into test_clob values (1, empty_clob());

2. ClobFile.java

다음 내용을 ClobFile.java라는 이름으로 생성한 후,

os>javac ClobFile.java
os>java ClobFile
후 out.txt file내용을 확인하고, scott.TEST_CLOB table의 데이타도 조회하여
수해이 잘 되었는지 확인한다.

import java.sql.*;
import java.io.*;
import java.util.*;
import oracle.jdbc.driver.*;

import oracle.sql.*;

public class ClobFile {

public static void main (String args []) throws Exception {

try {
Connection conn;

DriverManager.registerDriver( new oracle.jdbc.driver.OracleDriver() );
conn = DriverManager.getConnection( "jdbc:oracle:thin:@krint-5:1521:ORA920"

, "scott","tiger" );

conn.setAutoCommit (false);

CLOB clob = null;

Statement stmt = conn.createStatement ();

String cmd = "select * from test_clob for update";
ResultSet rset = stmt.executeQuery(cmd);
while (rset.next())
clob = ((OracleResultSet)rset).getCLOB(2);

// 아랫부분에 file로 부터 데이타를 읽어 CLOB column에 저장하는
// readFromFile()이 작성되어 있다.

readFromFile(clob);
stmt.execute("commit");

rset = stmt.executeQuery ("select * from test_clob where id=1");

if (rset.next ())
{
clob = ((OracleResultSet)rset).getCLOB(2);
String st = rset.getString(2);

if (clob != null)
System.out.println ("clob length = "+clob.length ());
}

// 아랫부분의 CLOB 컬럼의 데이타를 읽어 다시 다른 file로 write하는
// writeToFile()을 호출한다.

writeToFile(clob);
}

catch (SQLException sqle) {
System.out.println("SQL Exception occured: " + sqle.getMessage());
sqle.printStackTrace();
}

catch(FileNotFoundException e) {
System.out.println("File Not Found");
}

catch (IOException ioe) {
System.out.println("IO Exception" + ioe.getMessage());
}
}

//


// test.txt file을 읽어 test_clob.c column에 저장한다.

static void readFromFile (CLOB clob) throws Exception {
File file = new File("/home/ora920/eykim/test.txt");
FileReader in = new FileReader(file);
Writer out = clob.getCharacterOutputStream();

int chunk = clob.getChunkSize();
System.out.print("The chunk size is " + chunk);
char[] buffer = new char[chunk];
int length;

while ((length = in.read(buffer,0,chunk)) != -1)
out.write(buffer, 0, length);

in.close();
out.close();
}

//------------------------------------------------------------------
// test.clob.c column의 데이타를 읽어 out.txt file로 write한다.

static void writeToFile (CLOB clob) throws Exception {
int chunk = clob.getChunkSize();

int length;
char[] buffer = new char[chunk];
FileWriter outFile = null;
outFile = new FileWriter("/home/ora920/eykim/out.txt");
Reader instream = clob.getCharacterStream();

while ((length = instream.read(buffer)) != -1) {
outFile.write(buffer, 0, length);
}

instream.close();
outFile.close();
}

}


Reference Documents


SCR #998


반응형
반응형

SQL%NOTFOUND 라는 구문을 사용하면 Update를 사용할 때 일치하지 않는 조건을 찾을 수 있다.

ex)

TABLE 명 : STUDENT

COLUMN : NAME, GRADE, ADDRESS1, ADDRESS2

VALUE    : 김가을, 1, 서울, 양천구
              : 고운손, 2, 서울, 마포구
              : 유하늘, 1, 경기, 일산시


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

DECLARE

BEGIN
UPDATE STUDENT
      SET NAME = '김가우'
    WHERE NAME='김가오'

IF SQL%NOTFOUND THEN
     DBMS_OUTPUT.PUT_LINE('일치하는 조건 없음');
     -- 에러 코드와 에러 메시지를 조회한다. 물론 값은 정상이다.
     DBMS_OUTPUT.PUT_LINE(SQLCODE || ' : ' || SQLERRM);
END IF;
END;

일치하는 조건이 없기 때문에

일치하는 조건 없음 ORA-0000 (정상코드) 값등이 출력된다.)
반응형

+ Recent posts