아래는 스크랩하여 첨부한 것.

출처 : http://blog.naver.com/cwisky/80157033872


설치

Oracle 11g XE를 다운로드하고 설치파일을 실행할 때 관리자의 암호를 입력을 요구하고 그 후로는 끝까지 진행하여 설치가 종료된다.

아래의 설명은 암호로 orcl을 입력한 것으로 간주한다.

 

scott 계정 생성하기

Oracle 11g XE가 설치된 경로(디폴트, c:\oraclexe)에서 검색하여 scott.sql 파일을 찾고 그 경로를 복사한다.

시작 > Oracle 11g XE > Run SQL CommandLine > 커맨드 창에 위에서 복사한 내용을 이용하여 다음과 같이 입력한다.

 

SQL> @C:\oraclexe\app\oracle\product\11.2.0\server\rdbms\admin\scott.sql<enter>

SQL> conn system/orcl<enter>

SQL> alter user scott identified by tiger;<enter>

SQL> conn scott/tiger;<enter>

SQL> select * from emp;<enter>

AND

MS SQL Server 2008 에러 40

Scrap 2011. 11. 29. 14:24
AND

드림위버와 ftp

Memo 2011. 11. 28. 15:14
드림위버에서 ftp를 설정하여 윈도우에서의 작업과 리눅스 서버에서의 데이터를 연동할 수 있다.

방법 : 메뉴->site->New Site
AND

윈도우 vc++ 환경에서 fflush()를 fflush(stdin)과 같이 입력 버퍼를 비울 때 사용했었다. 그러나, 리눅스에서 코딩을 하다 보니 fflush()의 원래 용도는 입력 버퍼를 비우는 것과 전혀 상관이 없다는 사실을 알게 되었다. 윈도우에서 코딩할 때는 visual studio에서 알아서 확장하였기 때문에 (MSDN에 나와 있음) 상관이 없지만, 리눅스 환경에서 이식성이 없다.

윈도우 환경에서만 fflush(stdin)을 사용하는 것과 마찬가지로
리눅스 환경에서만 사용 가능한 __fpurge(stdin)이라는 함수가 있는데..

리눅스에서 아무리 테스트해도 버퍼가 비워지지 않는다.
코드가 잘못된 것일까.

아래는 내가 작성한 예제 코드. (아래 코드에서 주석을 해제하면 된다.)


이 코드를 작성한 이유는 아래와 같은 상황이 연출되기 때문이다.


입력 받기 전에 남아 있는 표준 입력 버퍼를 비워서 이 문제를 해결하고 싶은데
좋은 방법이 없을까. 

__fpurge() 함수를 테스트하기 위해 아래와 같은 코드를 작성해보았으나
역시나 동작하지 않는다. 무슨 문제일까.

 
AND

./program 이라는 프로그램이 존재한다면,

./program > result.txt 라고 쓰면 정상 출력
./program 2> result.txt 라고 쓰면 에러 출력
./program &> result.txt 라고 쓰면 모든 결과 출력

| more 을 덧붙이는 것도 유용하지만, 위 방법은 결과를 가공할 일이 있을 때 유용하다.
AND

출처 : http://www.rain9.com/wp/?p=501

아래는 스크랩 자료.

ubuntu APM(apache2 php mysql) 설치 방법


출처 : http://jubuntu.tistory.com/7

추가적인 스크랩 자료(phpmyadmin 활성화)

AND

mysql 의 mysql 데이터베이스 내의 user 테이블에서
update 쿼리를 잘못 날려서 debian-sys-maint의 비밀번호를 잊어버렸을 경우, 대처하는 방법.

배경 지식)
debian-sys-maint 계정은 기본적으로, mysql 데몬을 관리함.
/etc/init.d/mysql 스크립트를 start, stop, restart 등을 할 때
/etc/mysql/debian.cnf의 debian-sys-maint 계정과 암호를 사용.
debian.cnf 파일의 password 부분은 encryption된 것이 아니라 그냥 clear-text.

해결 방법)
즉, debian.cnf 파일의 password 부분을 임의의 문자열로 변경하고,
mysql> update user set password = password('랜덤스트링') where user = 'debian-sys-maint'
mysql> flush privileges;
를 하면 됨.

걍 .. update 쿼리를 날릴 때 where 절을 꼭 쓰도록 조심조심 하기.
AND

옵션 -C를 사용한다.
AND

echo ("<meta http-equiv="refresh" content="시간지정; url=경로/파일명">")

참고 링크 : http://web.lge.cn:8000/system/?mid=php&document_srl=1958&page=3&listStyle=&cpage=
AND

아래 예제 소스에서 굵게 표시한 부분에 주의하면 해결된다.
1. 데이터베이스를 만들 때 utf8로 설정
2. 테이블을 만들 때 utf8로 설정
3. 쿼리를 날리기 전에 "set names 'utf8'" 쿼리 먼저 날리기(select할 때 등도 포함)
참고 : http://php.net/manual/en/function.mysql-client-encoding.php

$query = "create database grade CHARACTER SET utf8 COLLATE utf8_general_ci";
mysql_query($query) or die (mysql_error());
$db_status = mysql_select_db('grade');
mysql_query("set names 'utf8'");  // it's important thing.
$query = "CREATE TABLE student_2 (
student_number smallint unsigned not null,
student_name char(9) charset utf8 not null,
grade_pl tinyint unsigned not null,
grade_wp tinyint unsigned not null,
grade_cs tinyint unsigned not null,
grade_sp tinyint unsigned not null,
grade_sum smallint unsigned not null,
grade_avg float unsigned not null,
grade_rank tinyint unsigned,
primary key(student_number)
)";
mysql_query($query) or die (mysql_error());
AND