远程连接orcal
oracle远程连接服务器出现ORA-12170TNS:连接超时解决办法

这篇文章主要介绍了oracle中分组查询groupby用法规则详解文中通过示例代码介绍的非常详细对大家的学习或者工作具有一定的参考学习价值需要的朋友们下面随着小编来一起学习学习吧
oracle远程连接服务器出现 ORA-12170TNS:连接超时解 决办法
错误描述:oracle远程连接服务器出现 ORA-12170 TNS:连接超时 错误检查:有很多是oracle自身安装的问题,但是我这里服务器配置正常,监听正常,服务正常,远程可以ping通服务器。 这里主要是防火墙问题,解决办法: (1)关闭防火墙; (2)在防火墙中添加,orcale端口1521例外。
PHP远程连接oracle数据库操作实现方法图文详解

PHP远程连接oracle数据库操作实现⽅法图⽂详解本⽂实例讲述了PHP远程连接oracle数据库操作实现⽅法。
分享给⼤家供⼤家参考,具体如下:⼀.以下是基于 wampServer 的php 访问oracle数据库的操作步骤:1、第⼀步:让PHP⽀持OCI⾸先,安装PHP的集成运⾏环境,⽹上有很多集成,我安装的是WampServer的(具体的安装⽅法也可以参考之前写的另⼀篇⽂章),安装好后,从安装⽬录中找到php.ini⽂件,⽐如我本地的路径是D:\wamp\bin\php\php5.3.3,将php.ini中的php_oci8.dll的;去掉,也就是把注释去掉,相当于可以使⽤php_oci8了。
2、第⼆步:然后wampserver运⾏后,将php>php extentions中将php_oci8打上勾【其他的集成环境其实也是可以的,⽐如phpStudy,我们可以直接从php扩展的选项⾥打勾对应的】。
3、第三步:oracle 数据库⽂件配置对于安装有Oracle客户端的PC机,可以在Oracle安装配置⽂件,tnsnames.ora⽂件,此⽂件路径是安装oracle的路径,⽐如我本机的是F:\oracle\product\10.2.0\client_1\NETWORK\ADMIN ,所连的192.168.1.198数据库,其中的配置详情如下(如果显⽰127.0.0.1 默认为本机):(DESCRIPTION =(ADDRESS_LIST =(ADDRESS = (PROTOCOL = TCP)(HOST = 192.168.1.198)(PORT = 1521)))(CONNECT_DATA =(SERVICE_NAME = orcl)))4、第四步:检测oci8是否配置成功①.⼀般情况下,打开localhost即能显⽰ phpinfo.php界⾯,⾥⾯即为 php 信息。
可采⽤ “Ctrl+F”搜索“oci”,查看是否有对应的oci模块,当然有⼀点php基础的完全可以直接访问⾃⼰编写的⽂件,记得⾥⾯加⼊“echo phpinfo();”即可。
远程登录oracle方法

一、Oracle入门练习:远程登陆Oracle数据库2010-11-24 10:23 124人阅读评论(0) 收藏举报1. 对于仅仅安装了Oracle客户端的XP电脑,要连接到远程Oracle数据库,则要输入类似以下的命令:C:/> sqlplus /nologSQL> conn scott/tiger@192.168.0.88:1521/simen:dedicated/simen格式说明:用户名/密码@主机名:端口号/服务名:服务类型/实例名通常,端口号、服务类型、实例名可以省略,简化后如下:SQL> conn scott/tiger@192.168.0.88/simen这种写法属于轻松连接命名方法(easy connect naming method),这种连接方法不需要配置客户端的$ORACLE_HOME/network/admin/tnsnames.ora文件。
所以称之为easy方式2. 对于安装了NETCA或NET manager的客户机,则可以用本地命名方法(local naming method)来连接远程数据库。
命令类似如下:SQL> conn scott/tiger@vm这里的vm是我们自定义的网络服务名,为了让电脑能解析vm代表什么意思,我们必须配置客户端的$ORACLE_HOME/network/admin/tnsnames.ora文件。
该文件的内容大致如下:VM =(DESCRIPTION =(ADDRESS_LIST =(ADDRESS = (PROTOCOL = TCP)(HOST = 192.168.80.80)(PORT = 1521)) )(CONNECT_DATA =(SERVICE_NAME = simen)))可以通过客户端安装的netca或net manager工具来配置该文件。
3. 还有一种命名方法叫目录命名方法(Directory Naming Method),也就是将连接描述符(Connect Descriptors)预先保存在一台符合LDAP的目录服务器上,并由这台目录服务器来解析客户端发出的连接请求中的数据库服务、网络服务名或网络服务别名。
远程连接Oracle的四种方法

远程连接Oracle的四种方法Oracle数据库的远程连接可以通过多种方式来实现,本文我们主要介绍四种远程连接的方法和注意事项,并通过示例来说明,接下来我们就开始介绍。
第一种情况:若oracle服务器装在本机上,那就不多说了,连接只是用户名和密码的问题了。
不过要注意环境变量%ORACLE_HOME%/network/admin/是否设置。
第二种情况:本机未安装oracle服务器,也未安装oracle客户端。
但是安装了pl sql development、toad sql development、sql navigator等管理数据库的工具。
在虚拟机或者另一台电脑上安装了oracle服务器,也就是虚拟机或者另一台电脑此时作为服务器。
这种情况下,本人以pl sql development远程连接ORACLE服务端数据库为例:1、在安装oracle服务器的机器上搜索下列文件:oci.dllocijdbc10.dllociw32.dllorannzsbb10.dlloraocci10.dlloraociei10.dllsqlnet.oratnsnames.oraclasses12.jarojdbc14.jar把这些找到的文件复制放到一个文件夹,如 oraclient,将此文件夹复制到客户端机器上。
如放置路径为 D:oraclient。
2、配置tnsnames.ora,修改其中的数据库连接串。
oracledata = (DESCRIPTION = (ADDRESS_LIST = (ADDRESS = (PROTOCOL = TCP)(HOST = 192.168.0.58)(PORT = 1521)) (CONNECT_DATA = (SERVICE_NAME = oracledata) )其中,oracledata是要连接的服务名;HOST = 192.168.0.58,是服务器IP地址;PORT = 1521是端口号。
Oracle Cloud 与远程数据连接器(用于Oracle Business Intelligen

Oracle® CloudGetting Started with Remote Data Connector for Oracle® Business Intelligence Cloud ServiceE67875-02March 2016To enable access to remote data sources in an on-premises network from Oracle BICloud Service, you must deploy and configure Oracle BI Cloud Service Remote DataConnector (Remote Data Connector) in your on-premises network for secure access toyour data. This document introduces you to Remote Data Connector and providesinstructions for downloading, deploying, and configuring it to access on-premisesdata sources.•Audience•About Remote Data Connector•Prerequisites•Configure Secure Access to On-Premises DataAudienceThe intended audience for these instructions is administrators who want to set upOracle Business Intelligence Cloud Service Remote Data Connector to enable secureaccess from the cloud to on-premises relational data sources for analysis.About Oracle Business Intelligence Cloud Service Remote Data ConnectorOracle Business Intelligence Cloud Service Remote Data Connector (Remote DataConnector) enables secure connection to on-premises data sources for analysis in thecloud.Remote Data Connector works with the BI Server Data Gateway running in the OracleBI Cloud Service environment to provide secure access to on-premises data usingprivate/public key pairs and SSL communication.Supported DatasourcesRemote Data Connector supports querying on-premises data in Oracle databases.ArchitectureEach Oracle BI Cloud Service instance is provisioned with a unique private key. Apublic key is available for download from Oracle BI Cloud Service Console. Thispublic key when deployed on-premises in Remote Data Connector enables RemoteData Connector to verify the authenticity of a query received from a BI Server inOracle BI Cloud service. SSL configured on-premises at a Load Balancer or HTTP servers provides secure access to on-premises data.This diagram shows a typical on-premises network architecture. It is recommended that you contact your network administrator for additional details about your network configuration.PrerequisitesThe following requirements must be met in your environment with the assistance of your network administrator before setting up Oracle BI Cloud Service Remote Data Connector.•Download and install WebLogic from Oracle Technology Network (OTN). You must also deploy Node Manager.•Obtain the public IP and domain name.•Download the Oracle BI Cloud Service Remote Data Connector WAR file (obi-remotedataconnector.war) from OTN.•Configure SSL communication at load balancer or HTTP server.•Download and install Oracle Business Intelligence Developer Client Tool(12.2.1.0.0) from OTN.Configure Secure Access to On-Premises DataThis topic describes the steps required to configure secure access to on-premises data by deploying Remote Data Connector on an application server, setting up and testing connections to the data source you want to query for analysis, and updating the Oracle BI data model file to include the new connection information in the appropriate connection pool.To configure secure access to on-premises data:1.Deploy the Remote Data Connector WAR file.a.Login to WebLogic and, in the Change Center pane, click Lock & Edit.b.In the Domain Structure, select Deployments.c.In the Deployments list, click Install.d.In the Install Application Assistant, click the upload your file(s) link, click theChoose File button for the Deployment Archive, and select the obi-remotedataconnector.war file you downloaded.e.Click Next.f.Click Next.g.Confirm that the Install this deployment as an application radio button isselected and click Next.h.Select the appropriate server target.i.Click Next.j.Verify the deployment summary.k.Click Finish.You should now see a message indicating that "The deployment has beensuccessfully installed".l.On the left-hand side Change Center pane, click Activate Changes.m.On the right-hand content pane, select the radio button next to the EAR just deployed.n.Click Start to view the drop-down list and select Servicing all requests.o.In the content pane of the new page, click Yes.p.Disable temporarily Remote Data Connector's Metadata security: If Node Manager is installed, then in WebLogic Console, navigate toEnvironment (on the left pane) > Servers > and select the server to whichRemote Data Connector was deployed > "Server Start" tab. In the Arguments edit box, add:-Doracle.bics.rdc.disable_metadata_security=1Note: If this variable is not set to 1, the status URL (provided in the next step) will be blocked. After setting this property, you must restart WebLogic. When WebLogic is started subsequently, it has to be done using Node Manager.If Node Manager is not installed, then before starting WebLogic (in the same command prompt or script that starts WebLogic), execute one of the following commands to set this environment variable:On Linux:export DISABLE_RDC_METADATA_SECURITY=1On Windows:set DISABLE_RDC_METADATA_SECURITY=1q.Test the deployment by navigating to http(s)://<weblogic-server>:<weblogic-port>/obiee/javads?status.You should see an XML file. If you see an error "401—Unauthorized", then verify step p and retry.2.Add the JDBC data source.a.Log in to WebLogic and, in the Domain Structure, select Services.b.In the Summary of Services list, click Data Sources.c.In the Configuration tab, under Data Sources, click New and select the GenericData Source option.d.Enter the Name and JNDI Name fields and click Next. To avoid confusion, usethe same name. The JNDI Name forms a component of the URL used to access this data source after the setup is complete.Note: Make a note of the name you enter, which you will reuse later when you are setting the URL for the remote data connection. For example, you could use mysalesdatasource as a name for your sales database.e.In the next screen of the wizard, select Oracle's Driver (Thin) for Serviceconnections: Versions:Any in the Database Driver drop-down list and clickNext.f.Accept defaults in the next wizard screen and click Next.g.Enter your database connection details in the next wizard screen and click Next.h.In the next screen, click Test Configuration to test your database connection.i.Once you receive the Connection test succeeded message, click Next.j.In the Targets tab under the settings, select appropriate target server for the JDBC Data source.k.Verify that you can see the newly created JDBC Data source in the list of Data Sources.3.Download and deploy the public key.a.Log in to Oracle BI Cloud Service.b.Navigate to the Oracle BI Cloud Service Console.c.Click Connectionsd.Click the Get Public Key to download the public key.e.When downloading the public key, in the Save dialog box, make that sure thename is oracle_bics_rdc.pem and save it to your local machine.f.Copy oracle_bics_rdc.pem to the WebLogic server in theDOMAIN_HOME/rdc_keys/<deployment_name> folder (by default thedeployment name is “obi-remotedataconnector”). The folder “rdc_keys/<deployment_name>” is created by RDC the first time it is deployed. TheDOMAIN_HOME path is the directory in which WebLogic Domain is installed.4.Make Remote Data Connector available to Oracle BI Cloud Service with the help ofa network administrator.a.Configure the load balancer/reverse proxy for SSL communication and to routerequests to the HTTP Server.b.Configure the HTTP server to direct requests to the WebLogic server.c.Test Remote Data Connector with a public IP address/domain URL, forexample https://<Public IP or Domain Name>:<port>/obiee/javads?status.Note: If Remote Data Connector metadata security is not disabled, then thisURL fails with the message 401-Unauthorized. To disable Remote DataConnector metadata security, setoracle.bics.rdc.disable_metadata_security to 1 or set theDISABLE_RDC_METADATA_SECURITY environment variable to 1.5.Update the data model file connection pool.a.Open the Oracle Business Intelligence Developer Client Tool.b.In the File menu, select Load Java Datasources... to obtain the properties ofRemote Data Connector.c.In the Connect to Java Datasource Server dialog box, enter the public IP addressor domain name for the Hostname and the Port where Remote Data Connector is running. For Username, enter "rdcuser", and for Password, enter "rdcpwd".d.Click OK.e. A message is displayed indicating, “Successfully loaded javads metadata fromhttps://<Public IP or Domain Name>:<Port>”.Note: If Remote Data Connector metadata security is not disabled, then thisURL fails with the message 401-Unauthorized. To disable Remote DataConnector metadata security, setoracle.bics.rdc.disable_metadata_security to 1 or set theDISABLE_RDC_METADATA_SECURITY environment variable to 1.f.Open the data model file (.rpd) in Offline mode.g.In the Physical layer, edit the connection pool.h.In the Connection Pool dialog box, change the call interface to JDBC (JNDI).i.Change the Data source name to the Remote Data Connector URL.This is the endpoint URL that was created earlier. It is of the form: https://<Public IP or Domain Name>:<port>/obiee/javads/<JNDIconnectionname>. Note that myjdbcdatasource was specified above whenadding the JDBC data source.j.Switch to the Miscellaneous tab.This step is mandatory because the RPD will not be updated correctly unless the Use SQL over HTTP variable is set to “true”. This is only saved on switching to this tab.k.Click OK.l.Save the data model file.6.Upload the data model file to Oracle BI Cloud Service. For information aboutuploading the data model, see “About Uploading Data Models to the Cloud” in the Using Oracle Business Intelligence Cloud Service guide.You have now configured secure access to relational data sources.Oracle® Cloud Getting Started with Remote Data Connector for Oracle® Business Intelligence Cloud Service,E67875-02Copyright © 2015, 2016, Oracle and/or its affiliatesThis software and related documentation are provided under a license agreement containing restrictions on use and disclosure and are protected by intellectual property laws. Except as expressly permitted in your license agreement or allowed by law, you may not use, copy, reproduce, translate, broadcast, modify, license, transmit, distribute, exhibit, perform, publish, or display any part, in any form, or by any means. Reverse engineering, disassembly, or decompilation of this software, unless required by law for interoperability, is prohibited.The information contained herein is subject to change without notice and is not warranted to be error-free. If you find any errors, please report them to us in writing.If this is software or related documentation that is delivered to the U.S. Government or anyone licensing it on behalf of the U.S. Government, the following notice is applicable: U.S. GOVERNMENT END USERS: Oracle programs, including any operating system, integrated software, any programs installed on the hardware, and/or documentation, delivered to U.S. Government end users are "commercial computer software" pursuant to the applicable Federal Acquisition Regulation and agency-specific supplemental regulations. As such, use, duplication, disclosure, modification, and adaptation of the programs, including any operating system, integrated software, any programs installed on the hardware, and/or documentation, shall be subject to license terms and license restrictions applicable to the programs. No other rights are granted to the U.S. Government.This software or hardware is developed for general use in a variety of information management applications. It is not developed or intended for use in any inherently dangerous applications, including applications that may create a risk of personal injury. If you use this software or hardware in dangerous applications, then you shall be responsible to take all appropriate fail-safe, backup, redundancy, and other measures to ensure its safe use. Oracle Corporation and its affiliates disclaim any liability for any damages caused by use of this software or hardware in dangerous applications.Oracle and Java are registered trademarks of Oracle and/or its affiliates. Other names may be trademarks of their respective owners.Intel and Intel Xeon are trademarks or registered trademarks of Intel Corporation. All SPARC trademarks are used under license and are trademarks or registered trademarks of SPARC International, Inc. AMD, Opteron, the AMD logo, and the AMD Opteron logo are trademarks or registered trademarks of Advanced Micro Devices. UNIX is a registered trademark of The Open Group.This software or hardware and documentation may provide access to or information about content, products, and services from third parties. Oracle Corporation and its affiliates are not responsible for and expressly disclaim all warranties of any kind with respect to third-party content, products, and services unless otherwise set forth in an applicable agreement between you and Oracle. Oracle Corporation and its affiliates will not be responsible for any loss, costs, or damages incurred due to your access to or use of third-party content, products, or services, except as set forth in an applicable agreement between you and Oracle.This documentation is in preproduction status and is intended for demonstration and preliminary use only. It may not be specific to the hardware on which you are using the software. Oracle Corporation and its affiliates are not responsible for and expressly disclaim all warranties of any kind with respect to this documentation and will not be responsible for any loss, costs, or damages incurred due to the use of this documentation.The information contained in this document is for informational sharing purposes only and should be considered in your capacity as a customer advisory board member or pursuant to your beta trial agreement only. It is not a commitment to deliver any material, code, or functionality, and should not be relied upon in making purchasing decisions. The development, release, and timing of any features or functionality described in this document remains at the sole discretion of Oracle.This document in any form, software or printed matter, contains proprietary information that is the exclusive property of Oracle. Your access to and use of this confidential material is subject to the terms and conditions of your Oracle Master Agreement, Oracle License and Services Agreement, Oracle PartnerNetwork Agreement, Oracle distribution agreement, or other license agreement which has been executed by you and Oracle and with which you agree to comply. This document and information contained herein may not be disclosed, copied, reproduced, or distributed to anyone outside Oracle without prior written consent of Oracle. This document is not part of your license agreement nor can it be incorporated into any contractual agreement with Oracle or its subsidiaries or affiliates.。
Oracle客户端的安装与远程连接配置及连接超时解决办法

在继续Oracle客户端的安装之前,需要分析一下Oracle客户端与数据库服务器之间的连接机制。
一、Oracle客户端与服务器端的通讯机制1、Oracle Net协议如下图所示,Oracle通过Oracle Net协议实现客户端与服务器端的连接以及数据传递。
Oracle Net是同时驻留在Oracle数据库服务器端和客户端上的一个软件层,它封装了TCP/IP协议,负责建立与维护客户端应用程序到数据库服务器的连接。
如下图所示,客户端发出的请求首先通过Oracle Net协议转换,转换成可以通过网络传输的信息,通过TCP/IP网络将请求传输到数据库服务器端;服务器端接受到客户请求后要通过Oracle Net协议转换,将请求转换成数据库可以解释执行的本地指令,并在服务器端执行(主要是一些输入输出操作),并将结果通过TCP/IP协议和Oracle Net协议传输给客户端显示。
2、客户端与服务器端的连接过程在分析客户端与服务器端的连接机制之前,先要定义两个概念,一个是Oracle监听器,一个是Oracle网络服务名。
Oracle数据库服务器通过一个名为“Oracle Net监听器”的组件接收来自客户端的连接请求。
监听器是位于服务器端的一个后台进程,发送给数据库的客户端连接请求,首先被服务器端的监听器所侦听,并将请求所转交给对应的数据库实例,从而建立起客户端与服务器的连接。
连接建立后,客户端与服务器端就可以直接进行通讯,不再需要监听器参与。
要实现监听器对客户请求的监听,需要对监听器进行配置,包括监听端口、监听器所在数据库的全局数据库名称、数据库实例等信息。
Oracle网络服务名是一个标识符,它代表着客户端连接服务器的配置信息(实际上就是连接请求的内容),包括数据库主机地址、监听端口、全局数据库名称等内容((有关全局数据库、数据库实例等,请参考Oracle数据库安装部分)。
如图所示,客户端与服务端的连接过程为:(1)首先在服务器端有一个常驻的监听器(监听服务要打开)监听客户端发出的连接请求。
跟我学Oracle从入门到精通培训教程——如何远程连接其他主机中的Oracle数据库系统

杨教授工作室 精心创作的优秀程序员 职业提升必读系列资料
(7)再继续点击“下一步”按钮
(8)点击“完成”按钮后,将出现下面的结果
杨教授工作室,版权所有,盗版必究, 4/14 页
杨教授工作室 精心创作的优秀程序员 职业提升必读系列资料
5、测试目标服务是否正确 (1)选择“命令”菜单中的“测试服务”子菜单
杨教授工作室,版权所有,盗版必究, 8/14 页
杨教授工作室 精心创作的优秀程序员 职业提升必读系列资料
操作超时”的错误,出现这个问题的原因很多,但主要跟网络有关。解决这个问题,首先检 查客户端与服务端的网络是否畅通,如果网络连通,则检查两端的防火墙是否阻挡了连接。 (3)在 SQL*Plus 中登录连接远程 Oracle 服务器
杨教授工作室 精心创作的优秀程序员 职业提升必读系列资料
1.1
跟我学 Oracle 从入门到精通培训教程——如何远程连接其他主机中的
Oracle 数据库系统
1.1.1 利用 Oracle 系统中的“Net Manager”配置远程服务名 —— 连接其他 Oracle 数据库服务 1、为什么要应用 Oracle 的客户端程序 在进行团队开发的时候,一般团队的每一个人只需要安装一个客户端即可,没有必要安 装一个 Oracle 数据库服务器, 而数据库服务器是属于共享的, 此时, 我们就需要配置客户端。 而客户端的配置可以有以下两种方式: (1)使用 Net Configuration Assistant(基于向导式)
杨教授工作室,版权所有,盗版必究, 9/14 页
杨教授工作室 精心创作的优秀程序员 职业提升必读系列资料
3、点击下一步,在对话框当中选择“添加” 当已经存在 Net 服务名时,可以选择重新配置,如果没有时,可以选择添加来添加一个 Net 服务名。
在本机用Toad远程连接Oracle数据库(详细步骤图解)

2) 选择【本地Net服务名配置】->【下一步】,进入添加界面。
3) 【添加】->【下一步】,进入Net服务名配置界面。
此时,服务名要填写远程数据库的全局数据库名,也就是数据库在设计的时候就已经指定的全局名称。
4) 服务名配置完成之后,需要制定网络连接协议。
选择TCP协议,进入下一步。
5) 前面制定了协议:TCP/IP协议,为了能和远程数据库通信,还需要指定远程数据库的主机名:IP地址。
也就是需要访问的数据库所在的主机IP。
端口号默认为1521,
不需要更改。
6) 配置完成之后(实际上还差一步:更改登录),测试连接是否成功。
7) 测试当然不会成功,此时需要更改登录。
8) 更改登录:用户名和密码就是远程数据库在创建的时候所指定的。
此时测试成功:
9) 最后一步:为之前配置的NET服务名指定一个名称。
当然它有默认名称:之前指定的远程数据库的全局数据库名称。
在这里指定名称之后,用Toad连接的时
候,database的下拉列表中,就是你现在指定的名称。
PLSQLDeveloper远程连接Oracle数据库(可以使用)

PLSQLDeveloper远程连接Oracle数据库(可以使用)第一次用PL/SQL Developer这个非官方的软件,遇到了种种困难,幸好通过万能的Google已经全部解决,记录下来备察.前提是保证你的远程oracle服务器一切正常.微软客户端设置使用oracle免费发放的instant client来代替oracle client,免去了安装的麻烦,下载instantclient-basiclite-nt-11.2.0.2.0.zip解压到你想要放到的任何目录,如:D:\oracle\instantclient_11_2,创建一个名叫tnsnames.ora的文件,放到该目录下,可以先创建成txt文档,保存完下面的内容再把扩展名.txt去掉:myDB =(DESCRIPTION =(ADDRESS_LIST =(ADDRESS = (PROTOCOL = TCP)(HOST = 192.168.7.23)(PORT = 1521))) (CONNECT_DATA =(SERVER = DEDICATED)(SERVICE_NAME = testdb)))注:myDB为连接数据库别名HOST = 192.168.7.23为你连接的数据库ipPORT = 1521 为你数据的端口SERVICE_NAME = testdb 为你数据库实例名右击我的电脑选”属性”->“高级”->“环境变量”->”系统变量”新增下面两个变量TNS_ADMIN D:\oracle\instantclient_11_2NLS_LANG SIMPLIFIEDCHINESE_CHINA.ZHS16GBK软件上的设置(版本为8.0)在PLSQL Developer选择Tools > Preferences > connection,在右侧的 "Oracle Home" and "OCI Library"中填入以下内容:D:\oracle\instantclient_11_2D:\oracle\instantclient_11_2\oci.dll完成以上的设置应该就能正常登录数据库了,如果还有别的问题,只能再次Google.如何为一个instance配置多个监听,并且实现Client Load Balancing和Client Load Balancing。
oracle10g如何连接远程数据库

oracle10g如何连接远程数据库
正常安装就好了,先安装oracle10G,再安装oracle8i,然后配置一下客户端,就能连接上oracle10g服务器了。
客户端配置方法:
1、打开cmd输入netca。
2、选择【本地net服务名配置】→下一步。
3、选择【添加】→下一步。
4、在【服务名】中输入你想要连接的服务器上的oracle服务的名字→下一步。
5、选择【tcp】→下一步。
6、在【主机名】中输入你想要连接的服务器ip,端口号不变→下一步。
7、选择【进行测试】→下一步。
(当然你也可以选择不测试)
※1测试如果不通过,点击【更改登录】输入一个肯定能登入的【用户名】和【口令】→确定,出现【正在连接...测试成功。
】表明测试成功。
※2测试不通过的话,点【上一步】确认你写的【服务名】和【主机名】,确认无误的情况下,确认你要连接的服务器oracle监听服务已经打开。
8、在【net服务名中】输入你想要使用的本地的服务名→下一步。
※就是【sqlplus user/passwd @本地服务名】。
9、选择【否】→下一步。
10、出现【net服务配置完毕】字样→下一步。
11、点击【完成】完成服务配置。
12、在上面服务配置完成以后,在cmd中输入如下命令即可远程登录oracle服务器:
sqlplus user_name/password@本地服务名
一定记住,上面的本地服务名是你第8步写的服务名。
oracle配置远程登录

oracle配置远程登录
oracle配置远程登录
关于oracle远程登录时的一些配置修改,其实很简单,如果能确保plsql能在本机上正常登录oracle服务的话,那说明oracle是没有多大问题的,只需要修改一下oracle中的两个配置文件的信息就ok 了。
下面是店铺收集整理的oracle配置远程登录,希望对大家有帮助~~
oracle配置远程登录
工具/原料
oracle plsql 电脑
方法/步骤
一般大家安装orcle数据库都是断了网才安装的所以,位于oracle 下的network文件里的admin文件里的那个listener.ora大致和我的这个是一样的(
(SID_DESC =
(GLOBAL_DBNAME = ORCL)
(ORACLE_HOME = oracle的安装路径)
(SID_NAME = ORCL)
)
这个是后加上的,是为了解决ora-12514异常而太添加的)
查看一下这些个配置,然后就可以停oracle的服务的,建议将oracle的所有服务都停掉。
然后为了让oracle能够被远程访问,那么就需要将host改为oracle所在的ip,不止这一个,还有一个文件是tnsnames.ora文件,也是在admin文件夹下面。
接下来就重新启动oracle的监听和数据库服务了,重新试一下,用plsql远程登陆oracle,然后就登录成功了。
5这就是我的经验,大家可以借鉴参考一下,有说的不对的地方请大家多多提出指正。
远程连接Oracle的四种方法

远程连接Oracle的四种方法
1. 使用Oracle客户端工具:
Oracle提供了针对不同操作系统的客户端工具,例如SQL*Plus、Oracle SQL Developer等。
这些工具可以在本地机器上安装,并通过配置连接参数,远程连接到Oracle数据库。
需要提供服务器的IP地址、端口号、数据库名、用户名和密码等信息来进行连接。
使用Oracle客户端工具的优点是简单易用,不需要复杂的配置和安装,可以快速实现远程连接。
但是它的限制是需要在本地机器上安装相应的客户端工具,并且只能连接单个数据库,不适合连接多个数据库或者通过脚本批量连接。
2. 使用Oracle Net:
Oracle Net是Oracle提供的一种网络协议,可以用于实现Oracle 数据库服务器和客户端之间的通信。
通过配置Oracle Net参数,可以在本地机器上直接使用SQL*Plus等工具远程连接Oracle数据库。
使用Oracle Net的优点是可以直接在本地机器上使用已有的Oracle 客户端工具连接远程数据库,并且支持通过配置文件灵活设置连接参数。
缺点是需要在本地机器上进行一定的配置,需要了解Oracle Net的相关知识。
远程登录并启动oracle数据库(ORA-01031:insufficient privileges的解决方法)

远程登录并启动oracle数据库ORA-01031: insufficient privileges的解决方法by o8xv0123@在oracle数据库中远程连接的认证方式有两种:分别是操作系统认证和密码认证,在安装完oracle软件并创建数据库之后,默认方式为操作系统认证,远程连接(非加密的连接)必须使用密码认证。
如果要使用密码认证的方式远程连接到一个关闭状态的数据库,需要满足以下条件:1、目标oracle服务器打开listener2、目标oracle服务器的目标数据库(将要连接的数据库)已经静态注册到listener。
3、客户端配置好了tnsnames.ora(tnsping可以ping到远程服务器)4、目标oracle服务器已经开启了密码认证方式。
5、目标oracle服务器创建了密码认证文件,并且已经被数据库启用。
本文主要对4、5两个条件进行说明,如果4和5两步没有进行正确的配置,在连接远程目标数据库时将出现以下错误。
ORA-01031: insufficient privileges[oracle@localhost ~]$ sqlplus sys/password@ORCL as sysdbaSQL*Plus: Release 11.2.0.1.0 Production on Tue Mar 13 18:43:01 2012Copyright (c) 1982, 2009, Oracle. All rights reserved.ERROR:ORA-01031: insufficient privilegesEnter user-name: sysEnter password:ERROR:ORA-01034: ORACLE not availableORA-27101: shared memory realm does not existLinux Error: 2: No such file or directoryProcess ID: 0Session ID: 0 Serial number: 0解决方法:1、创建密码文件unix/linux(shell)下:orapwd file=$ORACLE_HOME/dbs/orapw password=password_for_syswindows(命令行模式)orapwd file=%ORACLE_HOME%\database\PWDsid_name.ora password=password_for_sys 2、开启密码方式的用户认证将以下内容添加到unix/linux中的init service_name.ora或者windows中的init.ora中去REMOTE_LOGIN_PASSWORDFILE=EXCLUSIVE注:Oracle 11g中的orapwd命令略有不同,先指定文件,再指定密码orapwd file=$ORACLE_HOME/dbs/orapw entries=30Enter password: change_on_install至此,客户端应该可以连接到远程关闭状态的数据库并启动数据库了。
C#远程连接Oracle数据库(通过System.Data.OracleClient)

在.NET中使用System.Data.OracleClient库连接Oracle数据库的步骤1.下载并安装Instant ClientInstant Client可以在Oracle官方网站下载到对于Windows,Instant Client有三种版本:1)适用于Microsoft Windows(32位)的Instant Client2)适用于Microsoft Windows(64位)Itanium的Instant Client 3)适用于Microsoft Windows(x64)的Instant Client可以通过在我的电脑上单击右键菜单中的属性中查看到自己电脑的处理器信息由于我的电脑是Win7 64位系统,因此我下载了第三个包下载完毕后,解压缩并将里面的bin目录的地址添加到环境变量path中。
再在环境变量中添加以下属性:(我把解压缩的路径放到了D盘,解压缩后的文件夹名为instantclient_1 2_1)NLS_LANG=SIMPLIFIED CHINESE_CHINA.ZHS16GBKTNS_ADMIN=D:\instantclient_12_1LD_LIBRARY_PATH=D:\instantclient_12_12.使用Xshell4远程连接安装有Oracle的RedHat系统需要输入以下项:1)Name:自己起个名字2)Protocol:选择SSH3)Host:目标主机IP4)Port Number :端口号(22)5)登录的用户名/密码附:Linux 中登录数据库的命令为sqlplus 用户名/口令@数据库名3.获取连接字符串查找ORACLE 安装地址Linux 命令:echo $ORACLE_HOMEtnsnames.ora 位于目录$ORACLE_HOME\network\admin\用vim 打开tnsnames.ora 后,发现Oracle 数据库的配置如下:?1 2 3 4 5 6 7 8 xtcsjk =(DESCRIPTION =(ADDRESS = (PROTOCOL = TCP)(HOST = 171.0.0.132)(PORT = 1521) (CONNECT_DATA =(SERVER = DEDICATED)(SERVICE_NAME = testdb)))根据这个文件,就可以写出连接这个Oracle 数据库的连接字符串了?1 2 3 4 5 6 7 8 9 10 Data Source=(DESCRIPTION=(ADDRESS_LIST=(ADDRESS=(PROTOCOL=TCP)(HOST=171.0.0.132)(PORT=1521)))(CONNECT_DATA=1112131415 16 (SERVICE_NAME=TESTDB) ) ); Persist Security Info=True; User Id=用户名; Password=密码4.程序代码注:运行下面这段代码,需要1)手动添加对库System.Data.OracleClient 的引用2)在程序集→右键→属性→生成中,把目标平台由AnyCPU 改为x64 否则会报异常BadImageFormatException (兼容性问题)3)如果没有完成Instant Client 的安装或环境变量的配置,运行时会报异常信息:System.Data.OracleClient 需要 Oracle 客户端软件 version 8.1.7 或更高版本?1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 using System;using System.Collections.Generic;using System.Linq;using System.Text;using System.Threading.Tasks;//Method1函数调用的库,需要手动添加引用using System.Data.OracleClient;namespace OracleTest{class Program{//从Oracle 数据库中读取时间信息static void ReadFromOracleTest(){string conn = string.Concat(@"Data Source=",1920212223242526272829303132333435363738394041424344454647484950515253545556575859606162@" (DESCRIPTION=",@" (ADDRESS_LIST=",@" (ADDRESS=",@" (PROTOCOL=TCP)",@" (HOST=171.0.0.132@" (PORT=1521)",@" )",@" )",@" (CONNECT_DATA=",@" (SERVICE_NAME=TESTDB)",@" )",@" );",@"Persist Security Info=True;",@"User Id=用户名;",@"Password=密码");//OracleConnection 被标注为已过时OracleConnection oc = new OracleConnection(conn);try{oc.Open();//OracleCommand 被标注为已过时OracleCommand cmd = oc.CreateCommand();mandText = "select sysdate from dual";OracleDataReader odr = cmd.ExecuteReader();while (odr.Read()){Console.WriteLine(odr.GetOracleDateTime(0).}}catch (Exception ex){Console.WriteLine(ex.Message);}finally{oc.Close();}}static void Main(string[] args){6364656667ReadFromOracleTest();Console.ReadLine();}}}5.运行示例END。
ADOOLEDB的方式远程连接oracle[管理资料]
![ADOOLEDB的方式远程连接oracle[管理资料]](https://img.taocdn.com/s3/m/8ac2afc748649b6648d7c1c708a1284ac850050f.png)
ADO OLEDB的方式远程连接oracle<%set conn=server.createobject("adodb.connection"dns="Provider=OraOLEDB.Oracle;Persist SecurityInfo=True;User ID=user;Password=pwd;Data Source=dbname" conn.Open dnsfunction closedatabaseconn.closeset conn = nothingend function%>用Microsoft OLE DB Provider for Oracle连接Oracle 2007-05-29 16:54:32| 分类: Oracle | 标签: |字号大中小订阅 .天气:心情:用Microsoft OLE DB Provider for Oracle连接Oracle时,报"发生了一个Oracle错误,但无法从Oracle中检索错误信息"的解决办法:1、打开注册表到:HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\MSDTC\MTxOCIFor Oracle 10g, the correct settings areOracleOciLib = oci.dllOracleSqlLib = orasql10.dllOracleXaLib = oraclient10.dllFor Oracle 9i, the correct settings areOracleOciLib = oci.dllOracleSqlLib = orasql9.dll连接Oracle数据库:OLEDB连接方式(一)'OLEDB的字符连接方式,OLE DB 提供程序为"Microsoft OLE DB Provicer for Oracle"'**********创建连接对象***************Set con=createobject("adodb.connection")'连接设置。
通过plsql连接远程Oracle

通过plsql连接远程Oracle⽅法⼀:通过 plsql ⼯具和 oracle client(不是即时客户端 instantclient) 的⽅式来连接 Oracle⼀、安装 oracle client,(本教程已经下载并解压)⼆、选择管理员安装 ,如图:三、剩下的就是⼀路下⼀步就 OK,安装完成后在 doc 窗⼝执⾏,sqlplus 如果出现如下输⼊⽤户名,就表⽰安装成功四、安装 plsql(本教程 Oracle 为 11gr2,所以 plsql 也安装了版本 11,其余版本相同),并安装语⾔包,安装说明省略。
五、安装完成后现在开始配置连接,安装 Oracle client 后已经⾃动将安装⽬录添加到环境变量中,如图:六、下⾯配置 plsql ,点击软件先不登陆然后弹出全局界⾯然后找到⼯具 – ⾸选项 – 如图:七、配置完 plsql 之后现在配置连接 Oracle 数据库的信息,进⼊ oracle dlient 安装⽬录找到 network 下的 admin 下的 tnsnames.ora ⽂件,如图:打开此⽂件加⼊如下内容:⼋、本地需要配置的已经完成,接下来检查服务器上的相关⽂件,⾸先查看 Oracle 服务器安装⽬录下的 tnsnames.ora ⽂件和listener.ora ⽂件,如下:如果配置⽂件中的 host 后⾯的值和本机名不⼀样那么启动监听会报错或者⽆法连接,window 也是⼀样要和本机名⼀样,如果是 Linux 系统还要如果修改了本机名字还要保证 /etc/hosts 下有添加记录,如图, ( 本机 IP 为 192.168.240.139)九、此处修改完剩下的就是查看端⼝ 1521 是否开启,window 可以在防⽕墙中开放端⼝ ,linux 也可以通过命令 firewall-cmd –zone=public –add-port=1521/tcp –permanent 来开启,并重启防⽕墙,然后可以查看 1521 端⼝信息,使⽤命令 netstat –n –a⼗、前⾯如果是 127.0.0.1 那只能本地连接,不可以远程连接端⼝,前⾯只有都是 0 的时候才可以使⽤远程连接,可以使⽤ telnet 来测试1521 端⼝是否开启, window 也是⼀样上述都搞定之后打开 plsql⼗⼀、输⼊⽤户名密码进⾏连接,如图:⽅法⼆:通过 plsql 和 oracle 即时客户端(instantclient)来连接 oracle 数据库下载即时客户端 ( 基本版即可 )免安装,解压就可以⽤,但是需要配置环境变量⼀、解压后在⽬录下创建 network ⽬录,在 network ⽬录下创建 admin ⽬录,然后创建 tnsnames.ora ⽂件,并加⼊内容(上⾯有⽰例),然后配置 plsql,配置⽅法和⽅法⼀相同接下来需要配置环境变量,安装版的环境变量已经配置好了,但是此免安装版的需要配置下环境变量,将这个⽬录添加到环境变量 path 中,如图:⼆、将 tnsname.ora 所在位置加⼊环境变量中,如下:三、如果出现乱码则可以在在环境变量中添加如下内容:四、本地 plsql 和环境变量以及 tnsname.ora 都配置完毕,接下来还是和⽅法⼀的步骤⼀样检查 oracle 所在服务器的信息,包括端⼝是否开启,监听是否开启,oracle 实例是否启动以及配置⽂件 listener.ora 以及 tnsname.ora 配置是否正确(host 和本机名要⼀样) 所有的检查没问题后可以使⽤ plsql 进⾏链接,⽅法和上⾯⼀样注:查看监听是否启动要⾸先进⼊ oracle ⽤户下,su – oracle 然后执⾏命令 lsnrctl status 可以查看,如果为启动则执⾏命令 lsnrctl start 启动监听,然后执⾏ sqlplus /as sysdba 登录(已 dba 的权限登录) 然后执⾏ startup 来开启数据库实例,如果关闭数据库实例可以执⾏ shutdown immediate(也要 dba 权限才可以其余不⾏),windows ⽅法⼀样,window 也可以去服务⾥开启监听。
IntelliJDataGripOracle11g远程连接的方法步骤

IntelliJDataGripOracle11g远程连接的⽅法步骤⽬录1.修改Orcl监听⽂件2.查看服务名称,并记录下来3.进⾏数据库设置4.根据序号来进⾏。
5.点击第4步中的6号,点击图中位置加⼊6.右键连接即可加⼊table在Orcle服务在服务器本机上正常运⾏的情况下,并且Orcl服务器端⼝开启和防⽕墙允许的情况下,进⾏以下操作:1.修改Orcl监听⽂件(路径不分⼤⼩写D:\Oracle\product\11.2.0\dbhome_1\network\admin\listener.ora)SID_LIST_LISTENER =(SID_LIST =(SID_DESC =(SID_NAME = CLRExtProc)(ORACLE_HOME = D:\Oracle\product\11.2.0\dbhome_1)(PROGRAM = extproc)(ENVS = "EXTPROC_DLLS=ONLY:D:\Oracle\product\11.2.0\dbhome_1\bin\oraclr11.dll")))LISTENER =(DESCRIPTION_LIST =(DESCRIPTION =**(ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC1521)) //加⼊这部分**(ADDRESS = (PROTOCOL = TCP)(HOST = localhost)(PORT = 1521))))ADR_BASE_LISTENER = D:\Oracle2.查看服务名称,并记录下来路径不分⼤⼩写D:\Oracle\product\11.2.0\dbhome_1\network\admin\tnsnames.ora)LISTENER_ORCL =(ADDRESS = (PROTOCOL = TCP)(HOST = localhost)(PORT = 1521))ORACLR_CONNECTION_DATA =(DESCRIPTION =(ADDRESS_LIST =(ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC1521)))(CONNECT_DATA =(SID = CLRExtProc)(PRESENTATION = RO)))ORCL =(DESCRIPTION =(ADDRESS = (PROTOCOL = TCP)(HOST = localhost)(PORT = 1521))(CONNECT_DATA =(SERVER = DEDICATED)**(SERVICE_NAME = orcl) //记下这部分**))3.进⾏数据库设置4.根据序号来进⾏。
转贴:远程登录oracle服务器的方法集锦(精华)

全部功能 转贴:远程登录oracle 服务器的⽅法集锦(精华)远程登录oracle 服务器的⽅法集锦(精华)这⼏天摸索了⼏天,怎样对远程Oracle 服务器进⾏登录进⾏相关操作,以前只是在⾃⼰的机⼦上玩Oracle ,这⼏天有同学说⽤那功能,我才想着去能⼀下这⽅⾯,⽹上的资源很多但是写的似是⽽⾮,所以今天我想把这个详细讲⼀下我的感受!⼀. 通过服务器的主机名或者IP 地址在线⽹页登录如服务器的主机名叫pc-200901222010,这时你可以⽤主机名进⾏登录,也可以⽤IP 地址号进⾏登录http://219.246.229.210:1158/em/ 这个1158是你装Oracle 时你要记住的,他会给你⼀个⽹址的,对了这时针对Oracle10g ⽽⾔的。
这种⽅法最简单,但对于⽤些⼈员来说显得不太⽅便。
可以试试下⾯的⽅法。
⼆.通过安装Oracle 客户端来完成对服务器的访问及操作。
我的同学安装的是服务器是Oracle10g,我下载的是相应的Oracle10g-client ,对应⽹址为/otn/nt/oracle10g/10201/10201_client_win32.zip ;然后进⾏安装;安装完了后:在客户端配置net configuration Asistence 。
这个⼯具可以对远程的连接进⾏设置和测试。
⾸先选择“本地Net 服务名配置”,“添加”。
出现“服务名”选项要填(服务名其实就是你⾃⼰对远程数据库的⼀个标⽰,你可以和远程数据库的名字⼀样,也可以⾃⼰随意取⼀个,只要你知道他对应的是那个远程数据库就⾏了。
)。
假⼊我填上“orcl”,选择“TCP”,填写“主机名”,就是远程数据库所在的主机的IP(或主机号),然后可以选择测试,也可以暂时不进⾏测试,但是强烈建议测试。
在Net Manager 这个⼯具中,在左边的树状结构中,可以看到刚才配置的那个服务了,以及他的⼀些信息。
也可以在这个⼯具中进⾏配置服务,也可以测试。
- 1、下载文档前请自行甄别文档内容的完整性,平台不提供额外的编辑、内容补充、找答案等附加服务。
- 2、"仅部分预览"的文档,不可在线预览部分如存在完整性等问题,可反馈申请退款(可完整预览的文档不适用该条件!)。
- 3、如文档侵犯您的权益,请联系客服反馈,我们会尽快为您处理(人工客服工作时间:9:00-18:30)。
1 设置远程服务器端的Oracle,即你同事电脑上的Oracle,需要设置
2 个地方:
(1)设置"Database Configuration Assistant",在进行第6步:连接模式时选择:“共享服务器模式”。
并且下面的“共享服务器”选择 3 以上。
然后点击“确定”或“是”。
(2)服务器端还要设置net manager:添加监听程序LISTENER1 ,主机地址填服务端电脑的ip,端口是:1522
(3)数据库服务,全局数据库名:orcl,主目录可以不填,sid:orcl
(4)设置完成之后,重启服务。
2 设置本机客户端,即你电脑上的Oracle
(1)设置"Net Configuration Assistant"
"Net Configuration Assistant" 工具-> "本地NET服务名配置" -> "添加" -> 选择ORACLE数据库或服务-> 输入服务名(远程服务器端的Oracle的全局数据库名) -> TCP -> 主机名中输入服务端IP地址,端口输入服务端监听程序所监听的端口-> 是,进行测试-> 首次测试可能会失败,因为默认的用户名口令不一定和服务端的匹配,点击更改登录输入服务端的用户名和口令,确定后如出现"测试成功",说明连接成功
(2)设置完成之后,停止服务,然后启动服务。
(3)运行cmd ,进入dos界面,输入sqlplus /nolog 回车。
(4)输入conn scott/234@//192.168.1.106:1521/orcdb
就可以连接到服务器端的Oracle了。
(注:scott/234 是服务器端的Oracle的用户,192.168.1.106 是服务器端的ip ,orcdb 是服务器端的Oracle的全局数据库名)。