http://iotn.co.kr 연락처: gilho.kr@gmail.com [ The Japanese government should apologize to Japanese Military Sexual Slavery victim. / 日本政府は日本軍の性的奴隷?牲者に謝罪すべき. ]

사용자

ID:
PW:

INDEX
01.게시판
게시판 [71]
02.File Book
File 자료실 [95]
Site Link [17]
개인폴더 [201]
03.Field Book
Altibase [19]
Tibero [30]
MS-SQL [25]
MySQL [43]
DB2 [79]
ORACLE [3003]
PSQL [134]
기타정보 [155]
운영체제 [603]
04.Q/A Book
Q/A [53]
05.방명록
방명록 [54]
레벨업 [37]
구인/구직 [2]

기념일
Search
LINK
+ 가족 Hompy
+ DNSEver
IOTN :: Field Book :: PostgreSQL

 회원가입

odbc_fdw test
최길호 [LIST]   2021-11-22 05:27:06, 조회 : 186

https://github.com/CartoDB/odbc_fdw


cd /psql/odbc_fdw-0.5.2.3
# 8.4.20
grep pgxs Makefile
pg_config --pgxs
/usr/lib64/pgsql/pgxs/src/makefiles/pgxs.mk
# 13.4
psql13
pg_config --pgxs
/psql/13.4/lib/postgresql/pgxs/src/makefiles/pgxs.mk
pg_config --configure
'--prefix=/psql/13.4' '--with-pgport=5413'


cd /psql/odbc_fdw-0.5.2.3
# more Makefile [ 설치 위치 확인 ]
make

root#
cd /psql/odbc_fdw-0.5.2.3
make install
==========================================
/bin/sh /usr/lib64/pgsql/pgxs/src/makefiles/../../config/mkinstalldirs '/usr/lib64/pgsql'
/bin/sh /usr/lib64/pgsql/pgxs/src/makefiles/../../config/install-sh -c -m 755  odbc_fdw.so '/usr/lib64/pgsql/odbc_fdw.so'
/bin/sh /usr/lib64/pgsql/pgxs/src/makefiles/../../config/install-sh -c -m 644 ./odbc_fdw--0.5.2.sql '/usr/share/pgsql/contrib'
/bin/sh /usr/lib64/pgsql/pgxs/src/makefiles/../../config/install-sh -c -m 644 ./odbc_fdw--0.2.0--0.3.0.sql '/usr/share/pgsql/contrib'
/bin/sh /usr/lib64/pgsql/pgxs/src/makefiles/../../config/install-sh -c -m 644 ./odbc_fdw--0.2.0--0.4.0.sql '/usr/share/pgsql/contrib'
/bin/sh /usr/lib64/pgsql/pgxs/src/makefiles/../../config/install-sh -c -m 644 ./odbc_fdw--0.3.0--0.4.0.sql '/usr/share/pgsql/contrib'
/bin/sh /usr/lib64/pgsql/pgxs/src/makefiles/../../config/install-sh -c -m 644 ./odbc_fdw--0.4.0--0.5.0.sql '/usr/share/pgsql/contrib'
/bin/sh /usr/lib64/pgsql/pgxs/src/makefiles/../../config/install-sh -c -m 644 ./odbc_fdw--0.5.0--0.5.1.sql '/usr/share/pgsql/contrib'
/bin/sh /usr/lib64/pgsql/pgxs/src/makefiles/../../config/install-sh -c -m 644 ./odbc_fdw--0.5.1--0.5.2.sql '/usr/share/pgsql/contrib'



CREATE SERVER odbc_server FOREIGN DATA WRAPPER odbc_fdw OPTIONS (dsn 'oracle');
ERROR:  foreign-data wrapper "odbc_fdw" does not exist

cp /psql/odbc_fdw-0.5.2.3/odbc_fdw.control /psql/13.4/share/postgresql/extension/
cp /usr/share/pgsql/contrib/odbc_fdw* /psql/13.4/share/postgresql/extension/
cp /usr/lib64/pgsql/odbc_fdw.so /psql/13.4/lib/postgresql/

CREATE EXTENSION odbc_fdw;
CREATE SERVER odbc_server FOREIGN DATA WRAPPER odbc_fdw OPTIONS (dsn 'oracle');
CREATE FOREIGN TABLE
  odbc_table (
    id integer,
    name varchar(255)
  )
  SERVER odbc_server
  OPTIONS (
    sql_query 'select file#,name from v$dbfile'
  );

CREATE USER MAPPING FOR postgres
  SERVER odbc_server
  OPTIONS (odbc_UID 'user_000', odbc_PWD 'user_000');

select * from odbc_table;
ERROR:  Connecting to driver


3.235.60.197


  LIST

제목 작성자 작성일 조회
Admin  psql 10.7 oracle dblink [ oracle_fdw db link ]    최길호 2023/07/25 20
Admin  HA 복구 test    최길호 2023/03/03 31
Admin  log: COPY public.xxxx (xxx, xxx, xxx) TO stdout; / pg_dump 백업시 발생    최길호 2023/03/03 14
Admin  requested timeline x is not a child of this server's history    최길호 2023/03/02 16
Admin  recovery_target_action / archive log 받아서 계속 복구    최길호 2023/02/28 25
Admin  recovery_target_action = 'pause' / select pg_wal_replay_pause(); / select pg_get_wal_replay_pause_state();    최길호 2023/02/27 6
Admin  memory buffer cache    최길호 2023/02/06 14
Admin  active session, pid, lock sql , kill pid / pg_terminate_backend    최길호 2023/02/06 60
Admin  psql HA    최길호 2023/02/05 46
Admin  pg_ctl start -D . | postmaster.pid | /tmp/.s.PGSQL.5432 |    최길호 2023/02/03 31
Admin  pg_waldump    최길호 2023/02/03 9
Troubleshoot  $PGDATA/pg_wal/00000002.history 없는경우 [ ERROR: could not open file "pg_wal/00000002.history": ENOENT ]    최길호 2023/02/02 24
Admin  pg_basebackup 복구 test lv:9   최길호 2023/02/02 23
Admin  shmem_exit(0): 0 before_shmem_exit callbacks to make [ 로그 기록용 ]    최길호 2023/02/01 46
Troubleshoot  LOG: invalid resource manager ID in primary checkpoint record    최길호 2023/02/01 24
Admin  pg_restore [ 다른 계정, 다른 DB, sql 파일로 저장 ]    최길호 2023/01/30 16
Admin  pg_basebackup pg_dump pg_dumpall backup script    최길호 2023/01/30 79
Admin  session 정보    최길호 2023/01/27 21

    목록보기   다음페이지 1 [2][3][4][5][6][7]
       

Copyright 1999-2023 Zeroboard / skin by 최길호(gilho.kr@gmail.com)
최근 댓글
최근 게시물
12/01
[ORACLE]
dgmgrl 운영, db11st h/w 교체 시나리....
by 최길호
12/01
[ORACLE]
DGMGRL> show configuration;....
by 최길호
11/23
[운영체제]
arch filesystem 100% full 예방 /....
by 최길호