この記事は約12分19秒で読むことができます。

Oracle SQLcl 環境構築

参考文献

Oracle SQLcl  
SQLcl Downloads  
SQLcl について  
SQLclの出力フォーマットを試す(Oracle Database 12c Release 2)  

zipおとす

コード表示

[oracle@centos jj]$ ll
合計 21376
-rw-r--r--. 1 oracle docker 21886970  5月 25 13:23 sqlcl-19.1.0.094.1619.zip

zip解凍

コード表示

[oracle@centos jj]$ unzip sqlcl-19.1.0.094.1619.zip
Archive:  sqlcl-19.1.0.094.1619.zip
   creating: sqlcl/
   creating: sqlcl/bin/
   creating: sqlcl/lib/
  inflating: sqlcl/bin/sql           
  inflating: sqlcl/lib/orai18n-utility.jar  
  inflating: sqlcl/lib/httpcore.jar  
  inflating: sqlcl/lib/jzlib.jar     
  inflating: sqlcl/lib/jdbcrest.jar  
  inflating: sqlcl/lib/osdt_cert.jar  
  inflating: sqlcl/lib/dbtools-sqlcl.jar  
  inflating: sqlcl/bin/sql.exe       
  inflating: sqlcl/lib/jackson-annotations.jar  
  inflating: sqlcl/lib/jaxb-api.jar  
  inflating: sqlcl/lib/dbtools-http.jar  
  inflating: sqlcl/lib/httpmime.jar  
  inflating: sqlcl/lib/httpclient.jar  
  inflating: sqlcl/lib/jansi.jar     
  inflating: sqlcl/lib/oraclepki.jar  
  inflating: sqlcl/bin/README.md     
  inflating: sqlcl/lib/xmlparserv2-sans-jaxp-services.jar  
  inflating: sqlcl/lib/orai18n-mapping.jar  
  inflating: sqlcl/lib/pom.xml       
  inflating: sqlcl/lib/xdb6.jar      
  inflating: sqlcl/lib/antlr-runtime.jar  
  inflating: sqlcl/lib/jackson-core.jar  
  inflating: sqlcl/lib/commons-codec.jar  
  inflating: sqlcl/lib/commons-logging.jar  
  inflating: sqlcl/lib/dbtools-net.jar  
  inflating: sqlcl/lib/low-level-api.jar  
  inflating: sqlcl/lib/orajsoda.jar  
  inflating: sqlcl/lib/javax.json.jar  
  inflating: sqlcl/lib/stringtemplate.jar  
  inflating: sqlcl/lib/jackson-databind.jar  
  inflating: sqlcl/lib/osdt_core.jar  
  inflating: sqlcl/lib/dbtools-common.jar  
  inflating: sqlcl/lib/ojdbc8.jar    
  inflating: sqlcl/lib/orai18n.jar   
  inflating: sqlcl/lib/jsch.jar      
  inflating: sqlcl/lib/jline.jar     
[oracle@centos jj]$ tree
.
├── sqlcl
│   ├── bin
│   │   ├── README.md
│   │   ├── sql
│   │   └── sql.exe
│   └── lib
│       ├── antlr-runtime.jar
│       ├── commons-codec.jar
│       ├── commons-logging.jar
│       ├── dbtools-common.jar
│       ├── dbtools-http.jar
│       ├── dbtools-net.jar
│       ├── dbtools-sqlcl.jar
│       ├── httpclient.jar
│       ├── httpcore.jar
│       ├── httpmime.jar
│       ├── jackson-annotations.jar
│       ├── jackson-core.jar
│       ├── jackson-databind.jar
│       ├── jansi.jar
│       ├── javax.json.jar
│       ├── jaxb-api.jar
│       ├── jdbcrest.jar
│       ├── jline.jar
│       ├── jsch.jar
│       ├── jzlib.jar
│       ├── low-level-api.jar
│       ├── ojdbc8.jar
│       ├── oraclepki.jar
│       ├── orai18n-mapping.jar
│       ├── orai18n-utility.jar
│       ├── orai18n.jar
│       ├── orajsoda.jar
│       ├── osdt_cert.jar
│       ├── osdt_core.jar
│       ├── pom.xml
│       ├── stringtemplate.jar
│       ├── xdb6.jar
│       └── xmlparserv2-sans-jaxp-services.jar
└── sqlcl-19.1.0.094.1619.zip

3 directories, 37 files

javaバージョン確認

コード表示

[oracle@centos jj]$ java -version
openjdk version "1.8.0_161"
OpenJDK Runtime Environment (build 1.8.0_161-b14)
OpenJDK 64-Bit Server VM (build 25.161-b14, mixed mode)

接続

ぉぉぉ

コード表示

[oracle@centos jj]$ ll
合計 21380
drwxr-xr-x. 4 oracle docker     4096  4月  4 16:18 sqlcl
-rw-r--r--. 1 oracle docker 21886970  5月 25 13:23 sqlcl-19.1.0.094.1619.zip
[oracle@centos jj]$ cd sqlcl/bin
[oracle@centos bin]$ ./sql sys/ORACLE_PWD as sysdba

SQLcl: 土 5 25 15:02:00 2019のリリース19.1 Production

Copyright (c) 1982, 2019, Oracle.  All rights reserved.

接続先:
Oracle Database 19c Enterprise Edition Release 19.0.0.0.0 - Production
Version 19.3.0.0.0


SQL> select sysdate from dual;

SYSDATE 
--------
19-05-25

動画参考にいろいろできそう

fin

Leave a Reply

Your email address will not be published. Required fields are marked *