连接oracle数据库配置
时间: 2023-08-30 22:04:41 浏览: 139
连接Oracle数据库的配置可以在Java代码中进行。可以使用以下配置信息来连接Oracle数据库:
oracle_url=jdbc:oracle:thin:@192.168.1.111:1521:orcl
oracle_username=sys as sysdba
oracle_password=admindljjk
oracle_jdbcName=oracle.jdbc.OracleDriver
另外,还需要在listener.ora文件中进行配置。listener.ora文件通常位于Oracle安装目录下的network\admin文件夹中。可以使用以下配置信息:
#listener.ora Network Configuration File:
#e:\app\Administrator\product\11.2.0\dbhome_1\network\admin\listener.ora
Generated by Oracle configuration tools.
在listener.ora文件中,可以添加以下内容来配置监听程序:
SID_LIST_LISTENER =
(SID_LIST =
(SID_DESC =
(SID_NAME = orcl)
(ORACLE_HOME = e:\app\Administrator\product\11.2.0\dbhome_1)
)
)
然后,重启Oracle服务以使配置生效。在PL/SQL中连接数据库时,可以使用以下连接字符串:
MyOracleDB = (DESCRIPTION =
(ADDRESS = (PROTOCOL = TCP)(HOST = 192.168.0.1)(PORT = 1521))
(CONNECT_DATA =
(SERVER = DEDICATED)
(SERVICE_NAME = orcl)
)
)
请注意,如果连接失败,可以尝试将HOST更改为本机的IP地址。
#### 引用[.reference_title]
- *1* [连接 Oracle数据库 配置方法](https://blog.csdn.net/gaoxiang19820514/article/details/126365163)[target="_blank" data-report-click={"spm":"1018.2226.3001.9630","extra":{"utm_source":"vip_chatgpt_common_search_pc_result","utm_medium":"distribute.pc_search_result.none-task-cask-2~all~insert_cask~default-1-null.142^v91^insertT0,239^v4^insert_chatgpt"}} ] [.reference_item]
- *2* *3* [Oracle数据库连接配置](https://blog.csdn.net/weixin_42291166/article/details/106140859)[target="_blank" data-report-click={"spm":"1018.2226.3001.9630","extra":{"utm_source":"vip_chatgpt_common_search_pc_result","utm_medium":"distribute.pc_search_result.none-task-cask-2~all~insert_cask~default-1-null.142^v91^insertT0,239^v4^insert_chatgpt"}} ] [.reference_item]
[ .reference_list ]
阅读全文