[oracle@node1 ~]$ sqlplus hr/hr@standby
SQL*Plus: Release 10.2.0.1.0 - Production on Wed Aug 4 17:50:17 2010
Copyright (c) 1982, 2005, Oracle. All rights reserved.
Connected to:
Oracle Database 10g Enterprise Edition Release 10.2.0.1.0 - Production
With the Partitioning, OLAP and Data Mining options
SQL> create database link mylink using 'standby';
Database link created.
SQL> select count(*) from employees@mylink;
COUNT(*)
----------
107
SQL> conn / as sysdba
Connected.
SQL> select name from v$database;
NAME
---------
STANDBY
SQL> create database link mylink1 using 'primary';
Database link created.
SQL> select count(*) from employees@mylink1;
COUNT(*)
----------
107
[oracle@node1 ~]$ export ORACLE_SID=primary
[oracle@node1 ~]$ sqlplus '/ as sysdba'
SQL*Plus: Release 10.2.0.1.0 - Production on Wed Aug 4 18:24:33 2010
Copyright (c) 1982, 2005, Oracle. All rights reserved.
Connected to:
Oracle Database 10g Enterprise Edition Release 10.2.0.1.0 - Production
With the Partitioning, OLAP and Data Mining options
SQL> select name from v$database;
NAME
---------
PRIMARY
SQL> create table hr.siri(name varchar2(30));
Table created.
SQL> insert into hr.siri values('shoaib ansari');
1 row created.
SQL> commit;
Commit complete.
SQL> select * from hr.siri;
NAME
------------------------------
shoaib ansari
SQL> commit;
Commit complete.
SQL> exit
Disconnected from Oracle Database 10g Enterprise Edition Release 10.2.0.1.0 - Production
With the Partitioning, OLAP and Data Mining options
[oracle@node1 ~]$ export ORACLE_SID=standby
[oracle@node1 ~]$ sqlplus '/ as sysdba'
SQL*Plus: Release 10.2.0.1.0 - Production on Wed Aug 4 18:27:02 2010
Copyright (c) 1982, 2005, Oracle. All rights reserved.
Connected to:
Oracle Database 10g Enterprise Edition Release 10.2.0.1.0 - Production
With the Partitioning, OLAP and Data Mining options
SQL> select name from v$database;
NAME
---------
STANDBY
SQL> conn hr/hr@standby
Connected.
SQL> select count(*) from siri@mylink1;
COUNT(*)
----------
1
SQL> select * from hr.siri@mylink1;
NAME
------------------------------
shoaib ansari
Shoaibansari73@gmail.com
ORACLE DBA
SQL*Plus: Release 10.2.0.1.0 - Production on Wed Aug 4 17:50:17 2010
Copyright (c) 1982, 2005, Oracle. All rights reserved.
Connected to:
Oracle Database 10g Enterprise Edition Release 10.2.0.1.0 - Production
With the Partitioning, OLAP and Data Mining options
SQL> create database link mylink using 'standby';
Database link created.
SQL> select count(*) from employees@mylink;
COUNT(*)
----------
107
SQL> conn / as sysdba
Connected.
SQL> select name from v$database;
NAME
---------
STANDBY
SQL> create database link mylink1 using 'primary';
Database link created.
SQL> select count(*) from employees@mylink1;
COUNT(*)
----------
107
[oracle@node1 ~]$ export ORACLE_SID=primary
[oracle@node1 ~]$ sqlplus '/ as sysdba'
SQL*Plus: Release 10.2.0.1.0 - Production on Wed Aug 4 18:24:33 2010
Copyright (c) 1982, 2005, Oracle. All rights reserved.
Connected to:
Oracle Database 10g Enterprise Edition Release 10.2.0.1.0 - Production
With the Partitioning, OLAP and Data Mining options
SQL> select name from v$database;
NAME
---------
PRIMARY
SQL> create table hr.siri(name varchar2(30));
Table created.
SQL> insert into hr.siri values('shoaib ansari');
1 row created.
SQL> commit;
Commit complete.
SQL> select * from hr.siri;
NAME
------------------------------
shoaib ansari
SQL> commit;
Commit complete.
SQL> exit
Disconnected from Oracle Database 10g Enterprise Edition Release 10.2.0.1.0 - Production
With the Partitioning, OLAP and Data Mining options
[oracle@node1 ~]$ export ORACLE_SID=standby
[oracle@node1 ~]$ sqlplus '/ as sysdba'
SQL*Plus: Release 10.2.0.1.0 - Production on Wed Aug 4 18:27:02 2010
Copyright (c) 1982, 2005, Oracle. All rights reserved.
Connected to:
Oracle Database 10g Enterprise Edition Release 10.2.0.1.0 - Production
With the Partitioning, OLAP and Data Mining options
SQL> select name from v$database;
NAME
---------
STANDBY
SQL> conn hr/hr@standby
Connected.
SQL> select count(*) from siri@mylink1;
COUNT(*)
----------
1
SQL> select * from hr.siri@mylink1;
NAME
------------------------------
shoaib ansari
Shoaibansari73@gmail.com
ORACLE DBA
No comments:
Post a Comment