oracle 创建dblink
时间: 2023-12-03 18:02:09 浏览: 35
Sure, I can help you with that. To create a database link in Oracle, you can use the following syntax:
CREATE DATABASE LINK link_name
CONNECT TO username
IDENTIFIED BY password
USING 'tns_service_name';
In the above syntax, replace "link_name" with the name you want to give to the database link, "username" with the username of the remote database, "password" with the password for the remote database, and "tns_service_name" with the TNS service name of the remote database.
For example, if you want to create a database link to a remote database with username "john" and password "secret" using TNS service name "remote_service", and you want to give the link a name "remote_link", you would use the following syntax:
CREATE DATABASE LINK remote_link
CONNECT TO john
IDENTIFIED BY secret
USING 'remote_service';
相关推荐
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)