설문조사
PostgreSQL/PPAS 관련 듣고 싶은 교육은


총 게시물 174건, 최근 0 건
   

edbplus 사용하기

글쓴이 : PostgresDBA 날짜 : 2013-07-04 (목) 17:25 조회 : 8196
PPAS 에는 오라클의 SQL*Plus 에 대응하는 edbplus 라는 유틸리티가 존재합니다.(물론 pgsql 도 사용가능합니다.)
(edbplus 를 좀 살펴보니 자바 프로그램이였습니다.)

[enterprisedb@pgserver edbplus]$ pwd
/PostgresPlus/9.2AS/edbplus

[enterprisedb@pgserver edbplus]$ ls -l edbplus.sh
-rwxr-xr-x 1 enterprisedb dba 1613 May 16 20:17 edbplus.sh

[enterprisedb@pgserver edbplus]$ ./edbplus.sh 
    User: enterprisedb/xxx@localhost:5447/edb
Connected to EnterpriseDB 9.2.4.8 (localhost:5444/edb) AS enterprisedb

EDB*Plus: Release 9.2 (Build 31)
Copyright (c) 2008-2012, EnterpriseDB Corporation.  All rights reserved.

SQL> col product format a40
SQL> col version format a10
SQL> col status format a20
SQL>  select * from product_component_version;

PRODUCT                                  VERSION    STATUS              
---------------------------------------- ---------- --------------------
Oracle Database 10g Edition is similar   10.2       Available           
PL/SQL is similar                        10.2       Available                                          

SQL> show database;
DATABASE is "edb"

SQL> show user;
USER is "enterprisedb"
SQL> 

정말 오라클하고 비슷하죠?
PPAS 9.2 가 오라클 10g 기능에 많이 매치되는 모양입니다. 10g similar 라고 나오네요. 재밌네요.

사실 필자는 edbplus 보다는 pgsql 을 주로 쓴답니다.

아래 질문 답변
$ ./edbplus.sh
    User: test/test@localhost:8888/edb
Connected to EnterpriseDB 9.5.0.5 (localhost:8888/edb) AS test

EDB*Plus: Release 9.4 (Build 33.0.0)
Copyright (c) 2008-2015, EnterpriseDB Corporation.  All rights reserved.

SQL> host cat a.sql
select version();

SQL> @a.sql

VERSION
--------------------------------------------------
EnterpriseDB 9.5.0.5 on x86_64-pc-linux-gnu, compi
led by gcc (GCC) 4.1.2 20080704 (Red Hat 4.1.2-55)
, 64-bit

SQL> @a

VERSION                                           
--------------------------------------------------
EnterpriseDB 9.5.0.5 on x86_64-pc-linux-gnu, compi
led by gcc (GCC) 4.1.2 20080704 (Red Hat 4.1.2-55)
, 64-bit

포로리 2016-07-08 (금) 13:18
edbplus에서도 oracle sqlplus 처럼 @~~.sql 을 사용 가능 하나요?
oracle의 경우 shell에 sql을 사용하기 위해 sqlplus를 많이 이용을 하는데... 가능한지 문의 드립니다.
댓글주소
     
     
PostgresDBA 2016-07-11 (월) 17:21
댓글주소
          
          
포로리 2016-07-25 (월) 09:35
자세한 답변글 감사드립니다.
즐거운 하루 되세요.
댓글주소
   

postgresdba.com