Yahoo Poland Wyszukiwanie w Internecie

Search results

  1. 28 cze 2009 · Connect using the Oracle JDBC driver (oracle.jdbc.pool.OracleDataSource): String url = "jdbc:oracle:thin:@tcp://my-host:1522/my-service"; OracleDataSource ods = new OracleDataSource(); ods.setUser(userName); ods.setPassword(password); ods.setURL(url); Connection con = ods.getConnection();

  2. jdbc:oracle:thin:scott/tiger@//myhost:1521/myservicename. So I would try: jdbc:oracle:thin:@//oracle.hostserver2.mydomain.ca:1522/ABCD. Also, per Robert Greathouse's answer, you can also specify the TNS name in the JDBC URL as below:

  3. We can also include tnsnames.ora entries in the JDBC URL to connect to Oracle databases: jdbc:oracle:thin:@(DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=<host>)(PORT=<port>))(CONNECT_DATA=(SERVICE_NAME=<service>))) Let’s see how to connect to our “my_servicename” service using entries from the tnsnames.ora file:

  4. 11 mar 2020 · With JDBC, we can establish a database connection by calling the method getConnection () of the DriverManager class. There are three versions of this method: So we can have three ways for making a connection as follows: Using only database URL for everything. In this method, we specify all connection properties in a single URL string, for example:

  5. Data sources are standard, general-use objects for specifying databases or other resources to use. The JDBC 2.0 extension application programming interface (API) introduced the concept of data sources. For convenience and portability, data sources can be bound to Java Naming and Directory Interface (JNDI) entities, so that you can access databases by logical names.

  6. 2 mar 2022 · For reference, this article provides a summary of JDBC’s database connection URLs for the most common databases including MySQL, SQL Server, Oracle, PostgreSQL, Apache Derby (Java DB), SQLite and H2. jdbc:mysql:// [host] [,failoverhost...] [:port]/ [database] [?propertyName1] [=propertyValue1] [&propertyName2] [=propertyValue2]...

  7. Following code snippet shows how to connect to the Oracle Database using oracle.jdbc.pool.OracleDataSource String url = "jdbc:oracle:thin:@tcp://my-host:1522/my-service"; OracleDataSource ods = new OracleDataSource(); ods.setUser(userName); ods.setPassword(password); ods.setURL(url); Connection con = ods.getConnection();

  1. Ludzie szukają również