Job Seekers   Employers
dbapool: Authors | Submissions | Contact Us
   Forgot password? | Sign up
  Home   Discussion Forum   Articles   Interview Questions   FAQs   Scripts   Rewards   Analyzer   White Papers   Blog   Certification   Downloads   Tools
 

Topic: Database Administration >> connectivity

Disclaimer: The purpose of all dbapool forums including OCP and Other Oracle Certification forums is to help each other with specific issues but not to share dump and copyrighted exam content, materials or intellectual property. You may review the entire Oracle Certification Program Candidate Agreement online Here.



  


 Title: connectivity
 ramesh  Posted: Apr 11, 2008 01:57:13 AM

 Total Post: 40
 Joined: Aug, 2007






 Hi all,

To find out that which database is connecting to which server this query is correct or there is any other query please tell me....

select instance_name,hostname,status from v$instance;
select machine,terminal,sid,username,status from v$session;


Thanks in Advance....

 Gitesh
Posted: Apr 11, 2008 03:11:00 AM  

 Total Post: 322
 Joined: May, 2005






 
select (select name from v$database) "DATABASE",(SELECT UTL_INADDR.get_host_name FROM dual) "HOST NAME",(SELECT UTL_INADDR.get_host_address from dual) "IP Address" from dual;



 Murtuja
Posted: Apr 11, 2008 03:18:30 AM  

 Total Post: 815
 Joined: Jan, 2006






 
Hi,

Thanks Gitesh,

Can you please explain me why this query need to be executed ? where we can use this query in DBA activities ?

Regards,
Murtuja

 Gitesh
Posted: Apr 11, 2008 05:21:40 AM  

 Total Post: 322
 Joined: May, 2005






 
This query is needed to be executed when we have more than 1 databases with same name or in 1 server we have more than 1 databases.

Example: If you have a production database named flexcube. Now you have also 1 standby in local and 1 report database for same in local location. All databases are containing same name and same instance name. And you want get output from report database or want to apply some user patch on specify database that time you should identified with hostname or ip address that you are sitting and executing query/patch in right database.



 Murtuja
Posted: Apr 11, 2008 06:04:51 AM  

 Total Post: 815
 Joined: Jan, 2006






 
Thanks Gitesh for detailed answer.

 Time Zone: EDT

  




Forum Rules & Description


Who Can Read The Forum? Any registered user or guest
Who Can Post New Topics? Any registered user
Who Can Post Replies? Any registered user




 








Get FREE Magazines

Top 10 Forum User

  Murtuja Khokhar815
  Mohammed Taj704
  Jayanta Sur479
  positive fanatic416
  Vigyan Kaushik386
  Gitesh Trivedi322
  Gopu Gopi242
  neeraj sharma231
  Ramesh Jois226
  Bishal Khetan196






oracle Mag



  About Us Advertise Terms of Use Privacy Newsletters Contact Us    

Home   Discussion Forum   FAQs  Articles  Jobs   Newsletters  Directory  Downloads 

Our Premium Sponsor
Confio Software