when we want to access data from different database that time we use database link through service name to access particular data.so my this post is for to create database link without change in to tnsname.ora file that means without using service name.
Example:-
Targate Database: orcl
Source Database : test
1)target database
SQL>create user test
identified by test
default tablespace test;
SQL>grant connect,resource to test;
SQL> connect scott/tiger;
SQL> create table test(id number);
SQL>begin
for i in 1..10 loop
insert into test values(i);
end loop;
end;
/
SQL> commit;
SQL> select count(*) from test;
COUNT(*)
----------
10
SQL>
2)Source Database
SQL> CREATE DATABASE LINK test_db_link
CONNECT TO scott IDENTIFIED BY tiger
USING '192.168.128.135:1521/db11g'; ---(use ip address or host_name which you specified in listener file)
SQL>select * from test@test_link;
COUNT(*)
----------
10
********END*************
Subscribe to:
Post Comments (Atom)
Oracle to MySQL Unidirectional Replication
Topic : Oracle to MySQL Unidirectional Replication O racle Goldengate facilitates heterogeneous data replication, including repli...
-
è example of edbldr ç = smaple .csv file: city.csv nashik,MH,2000 pune,MH,3000 ...
-
Topic : Upgrade MySQL Commercial Edition from 8.4.5 to 9.3.0 on Oracle Linux 8.0 U pgrade in MySQL generally refers to updating...
No comments:
Post a Comment