暂无图片
暂无图片
暂无图片
暂无图片
暂无图片

oci 数据库连接方式

许玉冲 2024-05-23
596

oci 数据库连接方式:


1.通过SQLcl ( with a Wallet (mTLS

sql /nolog
SQL> set cloudconfig directory/client_credentials.zip
SQL> connect username@servicename
password





2,通过SQLcl (Without a Wallet)

sql admin/password@'(description= (retry_count=20)(retry_delay=3)
(address=(protocol=tcps)(port=1521)(host=adb.region.oraclecloud.com))
(connect_data=(service_name=u9adutfb2ba8x4d_database_medium.adb.oraclecloud.com))
(security=(ssl_server_dn_match=yes)))'

SQLcl: Release 21.2 Production on Thu Sep 16 10:43:00 2021
Copyright (c) 1982, 2021, Oracle. All rights reserved.

Last Successful login time: Thu Sep 16 2021 10:43:01 -07:00

Connected to:
Oracle Database 19c Enterprise Edition Release 19.0.0.0.0 - Production
Version 19.12.0.1.0

SQL>




3,SQL Developer with a Wallet (mTLS)

Description of adb_connect_sqldev_db20.png follows
  • Connection Name: Enter the name for this connection.

  • Username: Enter the database username. You can either use the default administrator database account (ADMIN) provided as part of the service or create a new schema, and use it.

  • Password: Enter the password for the database user.

  • Connection Type: Select Cloud Wallet (if you are using SQL Developer 18.2, this is Cloud PDB)

  • Configuration File : Click Browse, and select the client credentials zip file.

  • Service: Enter the database TNS name. The client credentials file includes a tnsnames.ora file that provides database TNS names with corresponding services.


4,Connect Oracle SQL Developer Without a Wallet

Description of adb_connect_sqldev_db21_tls.png follows
  • Name: Enter the name for this connection.

  • Username: Enter the database username. You can either use the default administrator database account ADMIN provided as part of the service or create a new schema, and use it.

  • Password: Enter the password for the database user.

  • Connection Type: Select Custom JDBC.

  • Custom JDBC URL: Enter the following:

    jdbc:oracle:thin:@ followed by the connection string you copied in step one.

  • jdbc:oracle:thin:@(description= (retry_count=20)(retry_delay=3)(address=(protocol=tcps)
    (port=1521)(host=adb-preprod.us-phoenix-1.oraclecloud.com))(connect_data=(service_name=u9adutfb2_fmexample1_medium.adb.oraclecloud.com))
    (security=(ssl_server_dn_match=yes)))










参考地址:

https://docs.oracle.com/en/cloud/paas/autonomous-database/serverless/adbsb/connect-sqlcl.html#GUID-AC24404D-8D0B-4716-83F6-F0F501318011



「喜欢这篇文章,您的关注和赞赏是给作者最好的鼓励」
关注作者
【版权声明】本文为墨天轮用户原创内容,转载时必须标注文章的来源(墨天轮),文章链接,文章作者等基本信息,否则作者和墨天轮有权追究责任。如果您发现墨天轮中有涉嫌抄袭或者侵权的内容,欢迎发送邮件至:contact@modb.pro进行举报,并提供相关证据,一经查实,墨天轮将立刻删除相关内容。

评论