使用Docker的SQLPLUS镜像快速登录ORACLE数据库

使用Docker的SQLPLUS镜像快速登录ORACLE数据库

 

 

命令

$ docker run -e URL=/@//xxx.yyy.eu-west-1.rds.amazonaws.com:1521/ORCL -ti sflyr/sqlplus

SQL*Plus: Release 11.2.0.3.0 Production on Tue Aug 11 15:41:07 2015

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


Conectado a:
Oracle Database 11g Release 11.2.0.1.0 - 64bit Production

SQL> _

 

示例

[root@linux yunwisdom]# docker run -e URL=system/password@//172.1.1.18:1521/orcl -ti sflyr/sqlplus                                                               
Unable to find image 'sflyr/sqlplus:latest' locally                                                                                                                    
Trying to pull repository docker.io/sflyr/sqlplus ...                                                                                                                  
latest: Pulling from docker.io/sflyr/sqlplus                                                                                                                           
d3938036b19c: Pull complete                                                                                                                                            
a9b30c108bda: Pull complete                                                                                                                                            
67de21feec18: Pull complete                                                                                                                                            
817da545be2b: Pull complete                                                                                                                                            
d967c497ce23: Pull complete                                                                                                                                            
62f607fc55a3: Pull complete                                                                                                                                            
2802ef2ef0cd: Pull complete                                                                                                                                            
4e044c53ee66: Pull complete                                                                                                                                            
d45f5cf43015: Pull complete                                                                                                                                            
de20cb80e393: Pull complete                                                                                                                                            
4c022b6bda17: Pull complete                                                                                                                                            
2c27e176303f: Pull complete                                                                                                                                            
e7e76ea1c14e: Pull complete                                                                                                                                            
82baef1bda9e: Pull complete                                                                                                                                            
25dab8ffa20b: Pull complete                                                                                                                                            
bfce58fa5e98: Pull complete                                                                                                                                            
Digest: sha256:8365daa5aea8455bd733cc355e601ff3e3a5e6d6a23d5b5f1e6928126ac0bcde                                                                                        
Status: Downloaded newer image for docker.io/sflyr/sqlplus:latest                                                                                                      
                                                                                                                                                                       
SQL*Plus: Release 11.2.0.3.0 Production on Thu Jun 20 11:15:12 2019                                                                                                    
                                                                                                                                                                       
Copyright (c) 1982, 2011, Oracle.  All rights reserved.                                                                                                                
                                                                                                                                                                       
ERROR:                                                                                                                                                                 
ORA-28002: the password will expire within 7 days                                                                                                                      
                                                                                                                                                                       
                                                                                                                                                                       
                                                                                                                                                                       
Connected to:                                                                                                                                                          
Oracle Database 11g Enterprise Edition Release 11.2.0.1.0 - 64bit Production                                                                                           
With the Partitioning, OLAP, Data Mining and Real Application Testing options                                                                                          
                                                                                                                                                                       
SQL>                                                                                                                                                                   
SQL>                                                                                                                                                                   
SQL>                                                                                                                                                                   
SQL>                                                                                                                                                                   
SQL>                                                                                          

 

参考地址:https://github.com/sflyr/docker-sqlplus 

你可能感兴趣的:(oracle)