In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-09-12 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Database >
Share
Shulou(Shulou.com)05/31 Report--
How is dblink used in Oracle? Many novices are not very clear about this. In order to help you solve this problem, the following editor will explain it in detail. People with this need can come and learn. I hope you can gain something.
Business requirements: original database (10.2.0.4.0), new database (11.2.0.3)
Due to the requirements of the program, it is now necessary to map a user on the new library directly to the old library user:
1. Users who back up the original library
Nohup exp scott/scott OWNER=scott BUFFER=10240000 STATISTICS=none RESUMABLE=y FILE=scott_all_exp.dmp LOG=scott_all_exp.log &
two。 Delete the table under the user of the original library
Set linesize 180 pagesize 1000 SELECT 'DROP TABLE' | | table_name | | 'CASCADE CONSTRAINTS PURGE;' FROM user_tables
The command to get SQL is saved to droptable.sql by vi.
Then SQL > @ droptable
3. Create a dblink to the new library on the original library
Create public database link link167 connect to scott identified by scott using'(DESCRIPTION = (ADDRESS_LIST = (ADDRESS = (PROTOCOL = TCP) (HOST = 192.168.1.167) (PORT = 1521)) (CONNECT_DATA = (SERVICE_NAME = NEWDB)))'
Test dblink is available:
Select * from dual@link167
4. Create synonyms on the original library
Create synonym MDRT_12E92 $for MDRT_12E92 $@ link167
Query user_tables in the new library to get a list of table_name
Set pagesize 1500 select table_name from user_tables
The command is edited with UE column, and vi is saved to createsynonym.sql.
Then SQL > @ createsynonym
Is it helpful for you to read the above content? If you want to know more about the relevant knowledge or read more related articles, please follow the industry information channel, thank you for your support.
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.
The market share of Chrome browser on the desktop has exceeded 70%, and users are complaining about
The world's first 2nm mobile chip: Samsung Exynos 2600 is ready for mass production.According to a r
A US federal judge has ruled that Google can keep its Chrome browser, but it will be prohibited from
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
About us Contact us Product review car news thenatureplanet
More Form oMedia: AutoTimes. Bestcoffee. SL News. Jarebook. Coffee Hunters. Sundaily. Modezone. NNB. Coffee. Game News. FrontStreet. GGAMEN
© 2024 shulou.com SLNews company. All rights reserved.