database.sarang.net
UserID
Passwd
Database
DBMS
MySQL
PostgreSQL
Firebird
Oracle
Informix
ㆍSybase
MS-SQL
DB2
Cache
CUBRID
LDAP
ALTIBASE
Tibero
DB 문서들
스터디
Community
공지사항
자유게시판
구인|구직
DSN 갤러리
도움주신분들
Admin
운영게시판
최근게시물
Sybase Q&A 793 게시물 읽기
No. 793
bcp 사용 에러..
작성자
희정
작성일
2003-12-10 10:06
조회수
8,161

bcp를 사용하여 데이터를 올릴려고 하는데 다음과 같은 에러가 나네요. 알려주세요

 

$ bcp tb_sm1011_eis in 1011test.txt -Udba -Psql -t","


The context allocation routine failed when it tried to load localization files!!
One or more following problems may caused the failure

Your sybase home directory is /data1/sybase. Check the environment variable SYBASE if it is not the one you want!
Using locale name "ko" defined in environment variable LANG
Cannot access /data1/sybase/locales/message/korean/common.loc file
Cannot access /data1/sybase/locales/message/korean/cslib.loc file
An error occurred when attempting to allocate localization-related structures.

 

이 글에 대한 댓글이 총 10건 있습니다.

charset이 안맞어서 그러는데요

 

unix서버에서 echo $LANG해보시면 ko로 나올겁니다.

 

우선 급하신대로 ksh,sh,bash인경우 LANG=C;export LANG하시고 하시면 될거구요

csh인경우 setnev LANG=C하시고 하심 될겁니다.

 

그래도 안됨, SYBASE환경변수가 제대로 setting되어 있는지 보세야 할겁니다.

지연님이 2003-12-10 11:13에 작성한 댓글입니다. Edit

CTLIB Message:  - L6/O8/S5/N3/5/0:
ct_connect(): directory service layer: internal directory control layer error: Requested server name not found.
Establishing connection failed.

locate.dat 에서 C와 English...등이 설정되어있구요 bcp명령을 사용하면  그다음 메세지는 이렇게 나옵니다.

희정님이 2003-12-10 13:39에 작성한 댓글입니다. Edit

server가 구동이 되지 않았거나 server의 이름이 SYBASE로 안되어 있는경우입니다.

 

sybase에서는 DSQUERY라는 변수가 있는데

 

isql -Usa -P 또는 bcp xxx -Usa -P하심 자동으로 연결되는 ASE server이름이 DSQUERY입니다

 

echo $DSQUERY해보시면 나타나고

DSQUERY나 DSLISTEN이 지정이 안되어 있는 경우 interface의 SYBASE를 찾아가게 되어 있습니다.

 

server가 떠 있다면 -Sservername도 붙여서 해보시기 바랍니다.

 

지연님이 2003-12-10 16:08에 작성한 댓글입니다. Edit

DSQUERY=서버명

export DSQUERY

 

이걸 프로파일에 넣었습니다.

그런데 똑같은 에러가 나는데요..

 

어떻게 해야 될까요?

 

charset LANG=C로 export 해놔도 똑같구요...제발

희정님이 2003-12-11 10:07에 작성한 댓글입니다. Edit

우선 isql이 되는지 확인 바랍니다.

 

된다면....bcp -v 해서 version좀 알려주세요.

지연님이 2003-12-11 10:39에 작성한 댓글입니다. Edit

bcp -v하면 이렇습니다.

 

Sybase CTBCP Utility/12.5/P-EBF10547/DRV.12.5.0.3/SPARC/Solaris 2.8/BUILD125-016/64bit/OPT/Wed Aug 2
1 17:15:38 2002

Confidential property of Sybase, Inc.
Copyright 1987, 2002
Sybase, Inc.  All rights reserved.
Unpublished rights reserved under U.S. copyright laws.

This software contains confidential and trade secret information of Sybase,
Inc.   Use,  duplication or disclosure of the software and documentation by
the  U.S.  Government  is  subject  to  restrictions set forth in a license
agreement  between  the  Government  and  Sybase,  Inc.  or  other  written
agreement  specifying  the  Government's rights to use the software and any
applicable FAR provisions, for example, FAR 52.227-19.
Sybase, Inc. 5000 Hacienda Drive, Dublin, CA 94568, US

 

 

isql은 들어가지는데 패스워드를 치면 똑같은 에러가나요.서버네임 에러요.. isql -Udba -Psql 로 들어가면 되지 않나요?

ㅁㅁ님이 2003-12-11 11:01에 작성한 댓글입니다.
이 댓글은 2003-12-11 11:03에 마지막으로 수정되었습니다. Edit

그럼 결국 isql도 안들어 간다는 얘기군요

 

그럼 ~sybase/ASE-12_5/install/RUN_servername으로 된 파일을 vi로 열어보시면

 

-sXXXXX라고 되어 있는 부분이 있을겁니다.

 

isql로 들어가실때 isql -Usa -Pxxxx -SXXXXX이라고 하시면 들어 갈거고요

bcp도 마찬가지로

bcp dbname.owner.objectname out outfile -Usa -Pxxxx -SXXXXX -c -t'||"로 하심 받아 질겁니다.

 

sybase에서 servername이라고 하는 것은 Unix의 servername이 아니고 sybase의 엔진이름입니다.

 

참고 oracle은 system과 dba가 super user이지만 sybase는 sa가 슈퍼유저입니다.

지연님이 2003-12-11 12:25에 작성한 댓글입니다. Edit
sybase/ASE-12_5/install/RUN_servername

 

이파일이 없습니다. install 폴더가 없네요

 

설치를 잘못한건가요? isql도 그렇게하면

 

ct_connect(): directory service layer: internal directory control layer error: Requested server name not found.
Establishing connection failed.

 

이렇게 뜨고요.어떻게 해요...ㅠ.ㅠ

ㅂㅂ님이 2003-12-11 16:43에 작성한 댓글입니다. Edit

RUN file이 없다면 server가 build되지 않은듯 합니다.

 

db가 ASE가 아니고 ASA나 IQ가 아닌지요?

 

mail 알려주세여

지연님이 2003-12-12 09:20에 작성한 댓글입니다.
이 댓글은 2003-12-12 09:22에 마지막으로 수정되었습니다. Edit

아 죄송합니다.

ASIQ입니다. 메일을 몰라서 여기에 답변드립니다.

 

ASIQ 아시는분은 없나요??

DB를 만들었는데 로그인도 안되고 답답합니다.

희정님이 2003-12-12 09:41에 작성한 댓글입니다. Edit
[Top]
No.
제목
작성자
작성일
조회
796로그인시 Language Name error에 대하여 [3]
류자현
2003-12-11
3501
795sybase에서 ERD뽑을 수 있나요?? [1]
박성준
2003-12-10
5075
794sp_dboption 사용했을시 에러 [2]
정이
2003-12-10
3889
793bcp 사용 에러.. [10]
희정
2003-12-10
8161
792identity의 적용에 대하여. [1]
류자현
2003-12-09
5408
791한글문제. [1]
jung
2003-12-09
5176
790drop table, create table [1]
류자현
2003-12-09
5601
Valid XHTML 1.0!
All about the DATABASE... Copyleft 1999-2024 DSN, All rights reserved.
작업시간: 0.018초, 이곳 서비스는
	PostgreSQL v16.2로 자료를 관리합니다