使用 SQL*Plus 18c 进行连接

SQL*Plus 18c 可以连接到 Oracle Database Exadata Express Cloud Service。使用 Oracle Wallet(可从数据库服务下载)加强网络安全。

1。 下载和安装 SQL*Plus 18c

  • 将“sqlplus”和“basic”(或“basiclite”)程序包解压缩到同一目录中,例如,解压缩到 C:\instantclient_18_5 or /home/myuser/instantclient_18_5.
  • On Windows, add C:\instantclient_18_5 to the PATH variable in the "System variables" section of the Environment Variables pane. On Windows 8 this can be accessed by navigating to Control Panel>System>Advanced System Settings>Environment Variables. If you have multiple versions of Oracle libraries installed, make sure the new directory occurs first in the path.
  • 在 Windows 上,安装 Microsoft 的 Visual Studio Redistributable。对于 Instant Client 18c 和 12.2,请安装 VS 2013 Redistributable。使用 64 位或 32 位 Redistributable 来匹配您的 Instant Client 架构。
  • 在非 Windows 平台上,如果还没有 libclntsh.so 的符号链接,请创建一个,例如:
    
    
    cd /home/myuser/instantclient_18_5
    ln -s libclntsh.so.18.1 libclntsh.so
    
    And set the library and executable paths:
    
        export LD_LIBRARY_PATH=/home/myuser/instantclient_18_5:$LD_LIBRARY_PATH
        export PATH=/home/myuser/instantclient_18_5:$PATH
    
    Instead of setting LD_LIBRARY_PATH, you could create an ldconfig configuration file
     if there is no other Oracle software that will be impacted:
    
        sudo sh -c "echo /home/myuser/instantclient_18_5 > /etc/ld.so.conf.d/oic.conf"
        sudo ldconfig
     

还可以使用 Linux“sqlplus”和“basic”RPM。使用这两个程序包,就无需创建 libclntsh.so 符号链接。

2。 启用 Oracle Network Connectivity 并下载 Client Wallet

  • 在您的 Web 浏览器中,导航到 Exadata Express 服务控制台。
  • 如果当前未启用客户端访问,请在控制台中单击“启用客户端访问”。
  • 在控制台上单击“下载客户端凭据”,下载包含安全证书和网络配置文件的 client_credentials.zip,这将允许客户端访问您的云数据库。将此 zip 文件保存到安全位置。
  • 在 Instant Client 目录中创建 networknetwork/admin 子目录(如果不存在),然后在其中解压缩客户端凭据。例如,解压缩 wallet,则文件位于该目录中。
  • 
    C:\instantclient_18_5\network\admin, /home/myuser/instantclient_18_5/network/admin
    or /usr/lib/oracle/18.5/client64/lib/network/admin

    确保文件的安全,以便只有获得授权可以连接到 Exadata Express 服务的用户可以访问这些文件。默认情况下,Oracle 建议仅将权限授予文件所有者。

  • 或者,将解压缩的 wallet 文件放入安全目录中,并将 TNS_ADMIN 环境变量设置为该目录名称。

3。 运行 SQL*Plus

  • 查看 Oracle Database Exadata Express Cloud Service 的已知问题
  • 运行 SQL*Plus,并使用在解压缩 tnsnames.ora 文件中所用的 Oracle 网络服务名称进行连接。例如,如果用户“CJ”获得了对数据库的访问权限,则可在终端运行 SQL*Plus,如下所示:sqlplus cj@dbaccess

如需创建用户,请参阅创建数据库模式

注:为免疑义,本网页所用以下术语专指以下含义:

  1. 除Oracle隐私政策外,本网站中提及的“Oracle”专指Oracle境外公司而非甲骨文中国。
  2. 相关Cloud或云术语均指代Oracle境外公司提供的云技术或其解决方案。