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

The methods of viewing, creating, using and deleting dblink in oracle

2025-04-11 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Development >

Share

Shulou(Shulou.com)05/31 Report--

This article introduces the relevant knowledge of "the methods of viewing, creating, using and deleting dblink in oracle". In the operation of actual cases, many people will encounter such a dilemma, so let the editor lead you to learn how to deal with these situations. I hope you can read it carefully and be able to achieve something!

one。 View dblink-- view all users SELECT OWNER,OBJECT_NAME FROM DBA_OBJECTS WHERE OBJECT_TYPE='DATABASE LINK';-- view all users SELECT * FROM DBA_DB_LINKS;-- view this user SELECT * FROM USER_DB_LINKS; II. Create dblink

1. Give permission if you don't have permission (omit if you have permission)

Give scoot user rights GRANT CREATE PUBLIC DATABASE LINK,CREATE DATABASE LINK TO scoot

two。 Create dblink

-- (connection is dblink name, scott is database user name, tiger is user name password, quotation marks are contents of tnsnames.ora file under remote database) create database link connection connect to scott identified by "tiger" using'(DESCRIPTION = (ADDRESS = (PROTOCOL = TCP) (HOST = 192.168.100.52) (PORT = 1521)) (CONNECT_DATA = (SERVER = DEDICATED) (SERVICE_NAME = orcl))'

3. Use dblink

SELECT * FROM DEPT@connection

three。 Delete dblinkdrop database link connection; supplement: usage query of DBLink

Oracle databases can be accessed across different database instances through database link. Sometimes we need to use dblink in views, functions, and stored procedures. This information can be obtained in the following ways.

Select d.* from dba_dependencies d where d.referencedlinklinks

Where xxx is the defined dblink name.

Through the above script, you can get the names of all objects referenced to dblink in the database.

This is the end of the content of "how to view, create, use and delete dblink in oracle". Thank you for reading. If you want to know more about the industry, you can follow the website, the editor will output more high-quality practical articles for you!

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

Development

Wechat

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

12
Report