小编Tal*_*evi的帖子

如何在 docker 容器内的 Oracle 数据库上使用 sqlplus?

我在我的 docker 环境中安装了 oracle db 版本 12c。我使用了以下命令:

docker run -d --name oracle -p 8080:8080 -p 1521:1521 quay.io/maksymbilenko/oracle-12c
Run Code Online (Sandbox Code Playgroud)

我连接到数据库,一切顺利,但我想启用统一审计。为此,首先您必须关闭数据库,并且在我发现的所有说明中都说使用 sqlplus 如下:

sqlplus / as sysoper
SQL> shutdown immediate
SQL> exit
Run Code Online (Sandbox Code Playgroud)

我使用下一个命令成功连接到数据库:

docker exec -it oracle "bash"
Run Code Online (Sandbox Code Playgroud)

然后我运行了 sqlplus 命令,我收到了“找不到命令”

[root@f30cc670f85f /]#   sqlplus / as sysoper
bash: sqlplus: command not found
Run Code Online (Sandbox Code Playgroud)

我做错了吗?我应该怎么做才能在我的 oracle 数据库上安装 sqlplus?我寻找它并没有找到任何对我有帮助的东西。

如果相关,我有 mac

database oracle sqlplus docker unified-log

7
推荐指数
2
解决办法
6866
查看次数

java.lang.ClassNotFoundException:将 xalan 升级到 2.7.3 后抛出 org.apache.xml.serializer.OutputPropertiesFactory

我有java代码将一些数据导出到excel文件中。(我只在下面包含了我认为代码中的相关部分)

一切工作正常,但后来我将 xalan 从 2.7.2 升级到 2.7.3,它停止工作。原因 - java.lang.ClassNotFoundException: org.apache.xml.serializer.OutputPropertiesFactory

异常在“wb.write(fileOutputStream);”处引发 export() 方法下的行

import org.apache.logging.log4j.Level;
import org.apache.poi.ss.usermodel.*;
import org.apache.poi.xssf.streaming.SXSSFSheet;
import org.apache.poi.xssf.streaming.SXSSFWorkbook;
     
private Workbook wb;

            private void init(String targetPath, String fileName, ExcelExportType exportType) {
                exportedFile = new File(Paths.get(targetPath, fileName  + FILE_EXTENSION).toString());
                try {
                    fileOutputStream = new FileOutputStream(exportedFile);
                    // if file doesn't exists, then create it
                    if (!exportedFile.exists()) {
                        exportedFile.createNewFile();
                    }
                } catch (Exception e) {
                    throw new RuntimeException("Init failed. File " + exportedFile.getName() + " cannot be found");
                }
        
                switch (exportType) …
Run Code Online (Sandbox Code Playgroud)

java excel xalan

5
推荐指数
1
解决办法
3657
查看次数

标签 统计

database ×1

docker ×1

excel ×1

java ×1

oracle ×1

sqlplus ×1

unified-log ×1

xalan ×1