Label:The JDBC Connection database uses the difference between SID and Service_Name most recently using JDBC to connect to the Oracle times error:ORA-12505, Tns:listener does not currently know of SID given in Connect descriptor the Connection descriptor used by the C Lient was:10.12.162.84:1521:xxxxLogging in to Oracl
The JDBC Connection database uses the difference between SID and Service_NameBlog Category:
Oracle
Recently using JDBC to connect to Oracle times error:ORA-12505, Tns:listener does not currently know of SID given in Connect descriptor the Connection descriptor used by the C Lient was:10.12.162.84:1521:xxxx
connection from the thread poolConnectionmanager.getconnection () line:167Batchingbatcher (Abstractbatcher). Preparequerystatement (String,boolean, Scrollmode) line:161Entityloader (Loader). Preparequerystatement (Queryparameters,boolean, Sessionimplementor) line:1700
Problem:Two. For an extension of the 3rd minor problem above, note 3 indicates that no session is generated here. The
Druid in the field of connection pool can be said to be relatively fire, Alibaba open source of the JDBC connection pool, monitoring components, the following is a brief introduction to it.
It consists of three parts:
Druiddriver Agent driver, can provide the plug-in system based on Filter-chain mode.
Druiddatasource Efficient and manageable database
settings, including name, type, length of value, initial value, encoding, etc. (click to view larger image);4) After the successful accession, view the staff table situation:5 ) insert some experimental data into the table and insert two, one for the employee, Lucy , and Lili :3 . Create the project in Myeclips and add the MySQL driver to the project: the project type created can be either a Java project or a Java Web project. The Web project is created here, the project name can be arbitrari
1. The premise is that MyEclipse has been able to properly develop Java engineering
2. Install MySQL
The individual is using the version is Mysql-5.0.22-win32.zip
URL: http://www.mysql.com/downloads/mysql/#downloads
3. Download JDBC Driver
The individual is using mysql-connector-java-5.1.22.zip, what is needed is the Mysql-connector-java-5.1.22-bin.jar after the decompression
URL: http://www.mysql.com/downloads/connector/j/
4. Code Testing
Recently, I was working on an azure Cloud project. The front-end is the Java code. The Java code uses the JDBC driver to access SQL azure.
After a JDBC connection string is used, it is found that the connection times out in about 2 minutes, and it can work normally on SQL Se
Download the jdbc driver to the official website and place it under the relevant jdk directory, or add the jar file to the project packagetest_mysql; importjava. SQL. *; importjava. util. set; publicclasstestjdbc {publicstaticConnectiongetConnection () throwsClassNotFoundException, SQLException {Stri
Download the jdbc driver to the official website and place it under the relevant jdk directory, or add the j
Tags: for load security Rman object OTF Manager execution voidNo nonsense, directly on the code looks more cool! Level a bit low, don't mind, welcome to The Spit Groove! public class Jdbctest { The database driver usedPrivate final static String DRIVER = "Com.mysql.jdbc.Driver";Connected databasesPrivate final static String URL = "jdbc:mysql://localhost:3306/here write the database name you want to manipula
)MyEclipse: Project right mouse button Project->properties->java Build path->libraries->add External jars-> Find SQLJDBC4 LoadWhy put a database driver package into a project instead of the entire system?Put into the system, the project and the project will have an impact, different versions of the jar package will create a conflict2 Registration to DriverManagerDriverManager: Basic service for managing databases, to connect to a database, you need to register with DriverManager. (Autoenrollment
Two ways to establish a database connection using JDBC:
1. Use DriverManager in your code to get a database connection. This approach is inefficient, and its performance, reliability, and stability decrease with the increase in user traffic.
2. The way to connect the database using the configuration data source is to increase the database
Reprinted from: http://www.jb51.net/article/31876.htm1. If MyEclipse has been able to develop the Java project normally 2. Install MySQL The individual is using the version is Mysql-5.0.22-win32.zip Website: http://www.mysql.com/downloads/mysql/#downloads 3. Download the JDBC driver Personal use of the mysql-connector-java-5.1.22.zip, what is needed is the Mysql-connector-java-5.1.22-bin.jar after decompressionWebsite: http://www.mysql.com/downloads/c
1. What is JDBC and what is the effect?
Java Data Base Connectivity Java Database Connection protocol
is a Java API for executing SQL statements that provides uniform access to a variety of relational databases.
He provides a benchmark by which more advanced tools and interfaces can be built to enable developers to write database applications
With JDBC, it
FALSE, when the cursor points to a row, the data in one of the fields in this row can be obtained through the GetXXX () method.
How to fetch data from a resultset1. First Snoop through the next () method to see if there is a row of data in the result set, return FALSE if it returns true and the result set pointer moves to the next line2. When the next () method returns True, the data can be fetched by means of the ResultSet object, such as: GetInt () getString () getDate () GetOb
Oracle_xa and XAOSW are semicolon ";", not colon ":"Second: The above Lib write on a line, the middle with a space apart, if not in the system environment variable set oracle_home, write absolute path.
' Java.sql.SQLException:IO exception, not in streaming mode ' when JDBC operates Oracle databaseWith Oraclestatment, don't use java.sql.Statment.If Setautocommit fails for an existing connection, close the
The configuration process in Linux is the same as that in Windows:1. Copy the jar package of oracle JDBC to the relevant directory of MATLAB (../Matlab/Java/JAR/toolbox.
The JDBC à lib (for example,/APP/Administrator/product/11.1.0/client_1/jdbc/LIB) in the Oracle 11g installation directory contains four files: ojdbc5.jar, ojdbc5_g.jar, ojdbc6.jar, and ojdbc6_g.j
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.