Discover oracle odbc connection string, include the articles, news, trends, analysis and practical advice about oracle odbc connection string on alibabacloud.com
Note, the Oracle site found that the method written in this article is no longer in favor of use, see: http://download.oracle.com/docs/cd/B12037_01/java.101/b10979/conncache.htm
A third-party application system uses the sqlserver database, which is managed in a unified manner in the existing system and replaced with the Oracle database as needed. We provide relevant support. The first step is to provide a s
that the sid_name is wrong. First, find the sid_name of the current INSTANCE: SELECT INSTANCE_NAME from v $ INSTANCE, and then enter the obtained sid_name in the connection string of the application.
ORA-12519:
After a ORA-12505 issue is resolved, the application can connect to Oracle, but reports a ORA-12519. It is found that this is because the processes param
Classes12.jar. My sample code is as follows:
Program Code 3:
class.forname ("Oracle.jdbc.driver.OracleDriver");//.newinstance (); String url= "Jdbc:oracle:thin:@10.0.1.1:1521:mydb";//mydb sid,10.0.1.1 for database server IP String User= "System"; String password= "abcd1001"; Connection conn= drivermanag
the mysql database. Generally, the database name installed by default is orcl. if you use multiple database listeners, you must set them according to the specific listening fields. For example, my local database is Orcl and listens to another Internet database. the listening string is Orcl2. if you need to connect to this internet database, you need to write the database name orcl2.
7. after the above configuration, you can connect to the
.jar.
First, see a class for database connection. In actual development, this class is used as a tool class, put it in the util package, and name it JdbcUtil.
Package util; import java. SQL. connection; import java. SQL. driverManager; import java. SQL. SQLException; public class JdbcUtil {public static Connection getConnection () {
/OracleOraHome92TNSListener item, and check whether the ImagePath string item exists. If not, set the value to D: \ oracle \ ora92 \ BIN \ TNSLSNR, change the installation path values accordingly. This method is also applicable to Oracle instance Services. Same as above, find items like HKEY_LOCAL_MACHINE/SYSTEM/Current ControlSet/Services/
Two Connection Methods for Oracle Database ServerOracle provides two Database Connection Methods: Private connection and shared connection. The difference is that the private connection mode is that a user corresponds to a databas
Label:Just to implement a function, so write only one method, for easy invocation, set as static method 1 Packagecom.jv;2
3 Importjava.sql.Connection;4 ImportJava.sql.DriverManager;5
6 Public classLianjie {7
8 //static method Gets the Connection object
9 Public StaticConnection Getlianj ()throwsExceptionTen {
One
AClass.forName ("Oracle.jdbc.driver.OracleDriver"); -
-String u
C # troubleshooting of Oracle Database Connection timeoutCreation Time: 2007/08/09Recently, I found a strange problem when using C # To operate Oracle databases. When there is a timeout limit for database sessions, even if the client reconnects to the database, it cannot continue database operations, in addition, no error occurs during
is another version, you need to modify it, for example, orannzsbb9.dll or orannzsbb11.dll) oraocci10.dll (10 indicates the version of the oracle server. If it is another version, you need to modify it, for example, oraocci9.dll or oraocci11.dll) oraociei10.dll (the server may not exist. If not, you do not need to find it) sqlnet. ora, tnsnames. ora, classes12.jar, and ojdbc14.jar copy these files to a folder, such as your lient. User Machine. For exa
, EZCONNECT)
Note:
1. the database connection descriptor added by Enterprise Manager Console and Net Configuration Assist is different. The former is... CONNECT_DATA = (SID = ...) (SERVER = ...)..., the latter is... (SERVICENAME = ...)....
2. after deleting a connection in the Enterprise Manager Console, tnsnames. the description string in ora is not automaticall
The Oracle database connection test is a database connection test class, which can be easily used after being saved. Www.2cto.com DBTest. java testing Java code import java. SQL. *; public class DBTest {/*** @ param args */public static void main (String [] args) {// TODO Auto-generated method stub try {OracleConn oc =
To use this class, use the jar package to connect to Oracle.
Steps:
1. Load the driver
2. Establish a connection
3. Obtain the SQL statement object (statement)
4. Execute SQL statements
5. release resources
Import Java. SQL. connection; import Java. SQL. drivermanager; import Java. SQL. resultset; import Java. SQL. sqlexception; import Java. SQL. statement;/*
The operation of the database is one of the necessary development parts of the current system development, especially in the large data age, the database is especially important. But you really know how Java and the database are connected.
Let's give you a simple example of a database connection:
Package com.java.dbtest;
Import java.sql.Connection;
Import Java.sql.DriverManager;
Import java.sql.PreparedStatement;
Import Java.sql.ResultSet;
Import j
The operation of the database is one of the necessary development parts of the current system development, especially in the large data age, the database is especially important. But do you really understand how Java and the database are connected?
Let's give you a simple example of a database connection:
Package com.java.dbtest;
Import java.sql.Connection;
Import Java.sql.DriverManager;
Import java.sql.PreparedStatement;
Import Java.sql.Res
packagecom.ist.common.util;importjava.sql.*;importjavax.naming.context;import Javax.naming.initialcontext;importjavax.naming.namingexception;publicclassjdbcoracletest NBSP;{NBSP;NBSP;NBSP;NBSP;//ORCL is the database name in the Oracle database, and localhost represents the Oracle database that connects to the native //1521 is the port number of the connection pr
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.