CLIENT SIDE
Dba12~]$ cd $ ORACLE_HOME / network /admin
Dba12 admin}$ cp tnsnames.ora $ HOME
Dba12 admin ] $ cd
Dba12 ~] $ vi .bash-profile
Export tTNS_ADMIN = $ HOME
:wq
Dba12 ~]$ ..bash_profile
Dba12 ~]$ vi tnsnames.ora
Tnsnames_dba12=
( [Alias]
(
(protocol=tcp) (HOST=192.168.0.158)
(PORT=1111)
[same of dba15] (
SERVICE_NAME=bunny)
[parameter name of dba15}
:wq
Inclined to build a profession as Oracle DBA Training? Then here is the blog post on, explore Oracle DBA Training
Dba12~] $ tnsping tnsnames_dba12
Dba12 ~] $ sqlplus ‘/as sysbda’
Dba12 sys> startup
Dba12 SYS> !
Dba12 ~]$ sqlplus Wilshire/Wilshire@tnsnames.dba12
(dba15’s user)
Dba12 SQL > sho user
Dba12 wilshire > select * fro tab;
[his own schema from server dba 15]
Dba15 SYS> select username, machine,
Terminal from V$ version
Where username = ‘WILSHIRE’;
Username machine terminal
Wilshire dba12 PTS/1
Dba15 SYS> !PS -ef
(for all users remotely)
Dba15 SYS> !PS -x
(for all users locally)
For connecting from dba12 (server) [now acting as client] as sysdba of dba15’s SYS
Dba15 ~]$ cd $ ORACLE_HOME/dbs
Dba 15 dbj]$ vi initbunny.ora
Remote_login_password file = exclusive
:wq
Dba12 dba]$ orapwd file=orapw$ ORACLE_SID
Password=bunny
Dba15 dbs]$ exit
Dba15 SYS > startup force
Dba15 SYS> select * from v$pwfile_users
Username SYSDBA SYSOPER
SYS TRUE TRUE
Dba12 ~]$ sqlplus ‘SYS/SYS @tnsnames_dba12 as SYS dba’
Dba12 Sys> sho user
“SYS” [for the database of bunny of server dba15]
To connect remotely for more than one servers
Dba12 ~]$ vi tnsnames.ora
ALIAS 1 = (
(
(
(protocol=tcp) (Host= 192.168.0.158)
(port = 1111)
(SERVICE _ NAME= bunny)
ALIAS 2 = (
(
(
(protocol=tcp) (Host= 192.168.0.158)
(port =2222)
(SERVICE _ NAME= sunny)
ALIAS 3 = (
(
(
(protocol=tcp) (Host= 192.168.0.158)
(port = 3333)
(SERVICE _ NAME= funny)
For an Indepth knowledge on,click on below