Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

Example of oracle method for creating dblink

2025-04-01 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Database >

Share

Shulou(Shulou.com)06/01 Report--

1. Application scenarios:

There are two databases, one is nc650115, the other is nc56, and now you want to connect to nc56 in nc650115 through dblink.

two。 First check in nc650115 to see if you have permission to create dblink. Execute in nc650115

Select * from user_sys_privs where privilege like upper ('% DATABASE LINK%')

Permissions are displayed as follows

Do not have permission to authorize in sys

Grant CREATE PUBLIC DATABASE LINK,DROP PUBLIC DATABASE LINK to nc650115

3. Create a dblink under nc650115.

Create public database link NC65DBLINK connect to nc56 identified by nc56 using'(DESCRIPTION = (ADDRESS_LIST = (ADDRESS = (PROTOCOL = TCP) (HOST = 192.168.17.254) (PORT = 1521)) (CONNECT_DATA = (SERVICE_NAME = orcl)'

Where NC65DBLINK is the name of dblink

Connect to requires the user name of the connection, identified by password

HOST= requires ip to connect to the database

SERVICE_NAME= database instance

Check to see if the creation is successful

Select * from dba_db_links;select owner,object_name from dba_objects where object_type='DATABASE LINK';-- query time is long

4. Action:

Query the data in nc56

Select * from crm_bd_building@NC65DBLINK

Delete dblink

Drop public database link NC65DBLINK

The above is the whole content of this article, I hope it will be helpful to your study, and I also hope that you will support it.

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Database

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report