Oracle about DB instance name and database service name (reprint)

Source: Internet
Author: User

Today, colleagues, there is a database connection failure problem, together Baidu a bit, the results finally solved, the following is a number of popular knowledge reproduced.

1, Query database name: Select Name,dbid from v$database; or command line: Show parameter db_name;
2. Query instance Name: Select instance_name from v$instance; or command line: Show parameter instance_name;
3. Query the database domain name: Select value from V$parameter where name= ' db_domain '; or command line: Show parameter domain;
4. Query database server: Select value from V$parameter where name= ' service_name '; or command line: show parameter service; or command line: Show parameter Names
5. Database service Name: This parameter is a database identification class parameter, represented by Service_Name. If the database has a domain, the database service name is the global database name, and if not, the database service name is the database name. Command line query: Show parameter service_name;

Reproduced:

Http://doudouweed.blog.sohu.com/117454473.html

http://blog.csdn.net/f_zongjian/article/details/5835425 (Detailed introduction)

The same problem:

http://blog.163.com/xoq_412885496/blog/static/85157205201242171518892/

Note:

Oracle database connection URL1), normal SID mode Jdbc:oracle:thin: @Host:p ort:sid such as: JDBC:ORACLE:THIN:@127.0.0.1:1521:ORCL 2), Ordinary servername way Jdbc:oracle:thin: @Host:p ort/servername such as: JDBC:ORACLE:THIN:@127.0.0.1:1521/ORCL

Oracle about DB instance name and database service name (reprint)

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.