Home IT Linux Windows Database Network Programming Server Mobile  
           
  Home \ Database \ The practical application of Oracle synonyms + dblink     - In-depth understanding of PHP ini configuration (Server)

- Redis 3.0.3 Cluster Setup (Database)

- Ubuntu deployment Flask + UWSGI + Nginx Comments (Server)

- CentOS source installation GitLab Chinese Version (Server)

- Linux system man help tips (Linux)

- Tomcat installation under Linux (Server)

- Nginx concerning the location and rewrite applications proxy_pass (Server)

- Fedora 21 setting boot script (Linux)

- Oracle 11g contraction table space error ORA-03297: file contains used data beyondrequested RESIZE value (Database)

- The method to mount the CD under Linux (Linux)

- Json data with double backslashes to a single backslash Json data processing (Programming)

- LinkedList Basic Usage (Programming)

- Install the latest development version of Wine on RedHat and Debian-based systems (Linux)

- To install OwnCloud 7.0.4 under Ubuntu (Linux)

- Use the DBMS_SCHEDULER package to manage scheduled tasks (Database)

- Inxi: Get Linux system and hardware information (Linux)

- Ubuntu Tutorial: How to Upgrade a New Linux Kernel 3.12.7 on Ubuntu (Linux)

- Oracle Client + PL SQL Developer enables remote access to the Oracle database (Database)

- Linux install and configure Heartbeat (Server)

- How to use secure FTP file transfer (Server)

 
         
  The practical application of Oracle synonyms + dblink
     
  Add Date : 2018-11-21      
         
       
         
  The practical application of Oracle synonyms + dblink

Business need: the original database (10.2.0.4.0), the new database (11.2.0.3)
As the demand for procedural reasons, and now need a new library user is mapped directly to the user under the old library:

1. Back up the original library users
nohup exp scott / scott OWNER = scott BUFFER = 10240000 STATISTICS = none RESUMABLE = y FILE = scott_all_exp.dmp LOG = scott_all_exp.log &

2. Delete the original library users under the table
set linesize 180 pagesize 1000
SELECT 'DROP TABLE' || table_name || 'CASCADE CONSTRAINTS PURGE;' FROM user_tables;

Come to save SQL commands vi droptable.sql
Then SQL> @droptable

3. Create a new library to dblink in 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 Available:
select * from dual @ link167;

4. Create a synonym in the original library
create synonym MDRT_12E92 $ for MDRT_12E92 $ @ link167;

In the new database query user_tables get a list of table_name
set pagesize 1500
select table_name from user_tables;

Column editing command UE deal, vi saved to createsynonym.sql
Then SQL> @createsynonym
     
         
       
         
  More:      
 
- To modify the existing user ID and comments GPG key (Linux)
- Bash command substitution (Programming)
- Tree Traversals Again (Programming)
- Linux kernel programming parameter passing between modules and function calls (Programming)
- Linux firewall anti-hacker disguise malicious attacks (Linux)
- CentOS7 Minimal minimize installation and then install the GNOME graphical interface (Linux)
- Good wireless network security information spread in the air (Linux)
- Use apt-p2p up a local Debian package cache (Server)
- WebLogic 12c Configuration Node Manager Managed Server (Database)
- Debian (Wheezy) Install Redmine 2.6 (Programming)
- How to experience Unity 8 Mir on Ubuntu 16.04 (Linux)
- The mv command to move the directory two cases under Linux (Linux)
- OpenCV cvFindCornerSubPix () to find sub-pixel Corner (Programming)
- installation of Vim plugin YouCompleteMe under Ubuntu 15.04 (Linux)
- Ubuntu resolve sudo: source: command not found error (Linux)
- DVD production using CentOS installation source within the company Yum (Linux)
- To install Jetty server configuration in detail (Server)
- lolcat: an output terminal rainbow effects in the Linux command-line tool (Linux)
- Live Wallpaper for Linux release adds dynamic background (Linux)
- How wifi-linux AP signal strength detection (Linux)
     
           
     
  CopyRight 2002-2016 newfreesoft.com, All Rights Reserved.