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)
work on autovacuum postgreSQL parameter
In This blog, we are discussing the auto vacuum parameter on a small scale. we will understand the below parameters and will see how to mod...
-
WARNING: 2019-06-15 06:40:03 WARNING OGG-02045 Database does not have streams_pool_size initialization parameter configured. Solut...
-
[INS-41112] Specified network interface doesnt maintain connectivity across cluster nodes issue and solution 01:- restart both node an...
-
error Details : SQL> alter user C##GGATE default tablespace GGUSER; alter user C##GGATE default tablespace GGUSER * ERROR at line ...
No comments:
Post a Comment