Pro*c when connecting to a database dbname settings __ Database

Source: Internet
Author: User

A lot of primary problems have been encountered in the research pro*c in recent years. When connecting to a database in pro*c, we typically use the configuration of a connection in "Tnsnames.ora", which is simple to write, and the syntax is as follows:

EXEC SQL Connect:username identified by:p Assword USING:d bname;

* * Here is the dbname in the "Tnsnames.ora" configured name * * *

So how do you write a dbname if you don't have the appropriate connection information configured in "Tnsnames.ora"? I found a good time on the internet did not find the right answer, I can only try. Tried a few times finally got the answer, in fact dbname settings have this similar to write the connection string in JDBC, namely: "IP Address: Port number/Instance name" For example: Connect the local Oracle Express can be written as "Localhost:1521/xe".

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.