Discover how to connect to oracle cloud database, include the articles, news, trends, analysis and practical advice about how to connect to oracle cloud database on alibabacloud.com
)
1234567891011121314151617
using Oracle.ManagedDataAccess.Client;public static string ConnectOracle(){try{string connString = "Data Source=(DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=130.147.246.144)(PORT=1521))(CONNECT_DATA=(SERVICE_NAME=ECMS)));Persist Security Info=True;User ID=system;Password=Service01;";OracleConnection con = new OracleConnection(connString);con.Open(); return string.Empty;}catch (Exception ex){return ex.ToString();}}
It is so simpl
This article describes in detail the Oracle 11G failure to connect to the database instance troubleshooting
ORACLE 11G If the report--enterprise Manager is unable to connect to the database instance, you can troubleshoot the prob
1. Grant scott user connection permissions: Grant connect to scott;
2. Create a java project in Myeclipse to import the jdbc package (classes12.jar ):
Right-click the project bulid path-> add external archives and select classes12.jar.
3. Create a java file, lianxi01.java
ImportJava. SQL. Connection;
ImportJava. SQL. ResultSet;
ImportJava. SQL. SQLException;
ImportJava. SQL. Statement;
ImportOracle. jdbc.*;
ImportOracle. jdbc. driver.*;
PublicclassLi
Tags: EDR EFI prefix Oracle database jsp XML file root localhost1. In idea, the JSTL library is imported into web-inf/lib and can be directly on the JSP page via thetaglib uri= "http://java.sun.com/jsp/jstl/core" prefix= "c"% >taglib uri= "http://java.sun.com/jsp/jstl/sql" prefix= "sql"% >Import, you do not need to set parameters in Web. Xml. In the idea Web. XML, it seems that the path to the file in the
This article mainly introduces how to connect to and operate Oracle database instances in JavaScript. This article describes a series of complete steps such as the running environment, code instance, and running result. For more information, see
Preface
In the development of B/s and c/s, javascript is basically not used to operate the
This section briefly introduces how to use ODBC to connect to the Oracle database,
To be honest, use oracleclient, oledb, and ODBC to access the Oracle database,
It is relatively simple. It is nothing more than a note that the database
Excuse me, how to connect the Oracle database with the PDO in the framework under the Kohana framework, thank you
With the original ecological TNS can
Reply to discussion (solution)
Get; Extension=php_pdo_oci.dll; Extension=php_pdo_oci8.dllAll 2 of these services have to be opened.Example of a PDO_OCI connection code with the Kohana framework:' Test ' =
Excuse me, how can I connect to the oracle database under the kohana framework? thank you! how can I use the pdo in the kohana framework to connect to the oracle database? thank you!
Use the original tns.
Reply to discussio
)
1234567891011121314151617
usingOracle.ManagedDataAccess.Client;publicstatic stringConnectOracle(){try{stringconnString ="Data Source=(DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=130.147.246.144)(PORT=1521))(CONNECT_DATA=(SERVICE_NAME=ECMS)));Persist Security Info=True;User ID=system;Password=Service01;";OracleConnection con =newOracleConnection(connString);con.Open();returnstring.Empty;}catch(Exception ex){returnex.ToString();}}
It is so simple!!!
Addit
)
1234567891011121314151617
using Oracle.ManagedDataAccess.Client;publicstaticstringConnectOracle(){try{stringconnString ="Data Source=(DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=130.147.246.144)(PORT=1521))(CONNECT_DATA=(SERVICE_NAME=ECMS)));Persist Security Info=True;User ID=system;Password=Service01;";OracleConnection con =newOracleConnection(connString);con.Open();returnstring.Empty;}catch(Exception ex){returnex.ToString();}}
It is so simple!!!
Addit
Using the JDBC-ODBC bridge to connect to the Oracle database and JDBC driver is almost the same, so we don't have to set the environment variable. There are two key statements for connecting to the database in JDBC:
Class. forname ("oracle. JDBC. Driver. oracledriver ");Co
1. First install the local Oracle, here I use is xe10g, the specific installation will not demonstrate, all the way fool no brains, user name password custom set to Root/root;2. Install Plsql, not accustomed to English can be installed immediately after a noon plug-in, do not repeat;3. Connect the local database, user name: root; password (i.e. password): root;
First, the problem descriptionThe oracle-client side is not installed locally, and because of limited machine resources, you want to connect to the remote database via PL/SQL developer. Simple installation PL/SQL developer cannot connect to the database remotely.Second, the
PL/SQL Developer does not install a client to connect to a remote oracle database (for example, developeroracle)Labels ):Http://www.oracle.com/technetwork/cn/database/features/instant-client/index-092699-zhs.html2. Download and install PLSQL (around 16 Mb ):Http://www.onlinedown.net/soft/4902.htm3. Unzip the instantcli
Oracle client: 11.0.2 (64-bit, official website)Plsql:plsqldev1104.zip is a Baidu looking for the installation packageReference Tutorial:A:http://jingyan.baidu.com/article/fb48e8be4c7c206e622e1491.htmlB:https://jingyan.baidu.com/album/49ad8bce4f934e5834d8faa8.html?picindex=71. Install the client, configure TNS under D:\app\Administrator\product\11.2.0\client_1\network\admin after installation is complete2. Test, from the Start menu, locate the sqlplus
Label:1. Enter "Sqlplus/nolog" on the command line to start the tool.2. Connect to Oracle Server conn username/password @ server connection string as connection identityThe client tool connects to the server based on the server connection string, and after the connection string, the client can operate the remote database as if it were native, so the configuration
During previous Oracle use, when the client was connected to the server, the Tnsnames.ora file in the client was configured as follows:= = = = = = 192.168 . 1.150 = 1521 )))) ()))) But today I accidentally learned from colleagues that a way to directly access a database without configuring this content is to use the following command when Sqlplus a connection:C:\Users\Administrator>S
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.