Connecting to Oracle lite via VB6
Hello
is there a better way to connect to Oracle 10g when using VB6?
this is what I have:
Under references I am using Microsoft DAO 3.6 Object library
I do have a module where I defined the following public variables:
Public wsOracle As DAO.Workspace
Public cnOracle As DAO.Connection
Public strConn As String
and a function to alllow me to connect to the database:
Function ConnectDB()
On Error GoTo Error_DataBaseError
strConn = "ODBC;DSN=MY_DATABASE;UID=user;PWD=passr"
Set wsOracle = DBEngine.CreateWorkspace("", "admin", "admin", dbUseODBC)
wsOracle.DefaultCursorDriver = dbUseClientBatchCursor
Set cnOracle = wsOracle.OpenConnection("", dbDriverNoPrompt, False, strConn)
Error_DataBaseError:
If Err <> 0 Then
Call ErrorCatching("ConnectDB ()")
End If
End Function
It seems to work but I am having issues, two apps are connected to the same Database one is in power builder y the other in VB6 after a certain time of inactivity I get timed out from the VB app and this gets also into the power builder app.
but if one app is open for a long time it seems to work just fine. any ideas why?
I read that I can use the Oracle Lite 40 ODBC Driver
but I can't seem to find a way to do the call from VB6
any ideas?
any enlightenment will be appreciated
Unfortunately, in 2.0 beta, the Infobus Data Form wizard
connection editor only supported the Oracle Thin, OCI7 and OCI8
drivers. For 2.0 production, Oracle Lite and the JDBC-ODBC bridge
will also be supported.
Regards,
JDeveloper Team
Poorna Byri (guest) wrote:
: Hi,
: Can we can connect to Oracle Lite 3.5 from Oracle JDeveloper2.0
: Beta using Infobus Data Form. When I tried to create a file
based
: on "Infobus Based Data Form" wizard it is not displaying Oracle
: Lite 3.5 driver. Can I create a TNS name for Oracle Lite 3.5
: database.
: Any help.
: Thanks.
: Poorna Byri
null
Similar Messages
-
Connecting to Oracle Lite on iPaq
Hi all,
sorry to bother you, but I have quite a problem. I am running an application on the Creme VM on my iPaq, and trying to connect to Oracle Lite. Unfortunately, I get this classic error:
UnSatisfiedLinkError: No oljdbc40 in shared library path.
I have put the oljdbc40.dll in several places (\windows, \windows\creme\bin, \) but nothing works. Also, I have tried running my app with the commandline option: -Djava.library.path=\windows\creme\bin
Ofcourse, no solution there. If anyone could give me a hint on this, I would be very grateful.
Regards, Jean-Pierre Dessart.Don't know if you're using J9 as your VM, but if so I had similar problems with other DLLs and the only way to make it see them (even if using java.library.path) was to place them in the bin directory under the path where you installed the VM in the device.
Hope this helps.
Regards -
Odbc connectivity for oracle lite
Can Oracle lite be connected through ODBC for a windows front end application developed (other than developer 2000)
Hi
Can anyone please give the connect string to connect to Oracle Lite through ODBC driver from a VB.NET windows front end application?
Regards
Sangeetha -
Can we connect to oracle 9i using vb6.0 in 64 bit machine.
Can we connect to oracle 9i using vb6.0 in 64 bit machine.
Code i have written is
dim conn as new ADODB.Connection
conn.open("Provider=MSDAORA.1;password=pw;user id=usname;data source=dbname;Persist Security info=false")
but it is throwing an error saying
"Connection not open"
But the same code is working in vb.net.
Do we need to install any providers for 64 bit machine?I have had no luck doing this in the 64-bit ODAC or otherwise. If anybody succeeds I would love to hear about it. My experience follows for those interested:
I am trying to migrate some working VB6 code from Windows 2000 Server to 64-bit Windows Server 2003 but can't get the OLEDB connection to Oracle to work.
In the working code (x86 environment), I am using ADO 2.8 and Microsoft OLEDB Provider for Oracle (MSDAORA). Since the Microsoft OLEDB provider for Oracle is no longer supported or available on Windows Server 2003 x64, I tried to use the 32-bit Oracle OLEDB provider in ODAC 10.2 but may have run into the parsing bug posted on MSDN (http://forums.microsoft.com/MSDN/ShowPost.aspx?PostID=159581). Next, I successfully installed the beta 64-bit version of ODAC 10.2, but when I try to open the connection I receive "Error 3706 Provider cannot be found. It may not be properly installed." However, I can successfully TNSPing the data source.
Windows Server 2003 x64 (not Itanium)
Oracle Enterprise 9.2
Microsoft Visual Basic 6
Microsoft ADO 2.8 (Objects & Recordset references)
Oracle OLEDB Provider (ODAC 10.2, 64-bit)
Code Snippet:
Set m_dbConn = New ADODB.Connection
With m_dbConn
.ConnectionString = "Provider=OraOLEDB.Oracle;Data Source=oplprod; User ID=myid; Password=mypwd;"
.ConnectionTimeout = 10
.CursorLocation = adUseClient
.Open
End With -
Making connection to Oracle 9i via SQL Plus - Mark
Hi,
I am unable to connect to oracle 9i via dos prompt or SQL Plus.
I installed the satabase on windows.
The SID is obiwan. Please help, already browsed similar topics and its not happening.
Thanks in advance.The Listener is the process that is listening for incoming remote connections to the DB(s).
Database and Listener have Windows services, and services have to be started. Also, from DOS prompt you can do :
C:\> lsnrctl stat
to see if the Listener is active : the result should be the list of active DB(s).
To connect locally to the DB do the following :
C:\> set ORACLE_SID=obiwan
C:\> sqlplus "/ as sysdba"
The result should be something like SQL*Plus: Release 9.2.0.4.0 - Production on Dom Apr 10 16:58:32 2005
Copyright (c) 1982, 2002, Oracle Corporation. All rights reserved.
Connected to:
Oracle9i Enterprise Edition Release 9.2.0.4.0 - Production
With the Partitioning, OLAP and Oracle Data Mining options
JServer Release 9.2.0.4.0 - Production
SQL>If the result is something like : SQL*Plus: Release 9.2.0.4.0 - Production on Dom Apr 10 17:01:29 2005
Copyright (c) 1982, 2002, Oracle Corporation. All rights reserved.
Connected to an idle instance.
SQL> then it means that the DB is not up. In this case try :
SQL> startup
That way you are connected as sysdba, you can startup and shutdown the DB, create users, and so on. Do not use this connection to create objects (tables, indexes and so on) :
create an user, using the command "create user" (See [url http://download-west.oracle.com/docs/cd/B10501_01/server.920/a96540/toc.htm]Sql documentation), and connect as that user, for example
SQL> conn scott/tiger
or, at DOS prompt
C:\> sqlplus scott/tiger
If you create a TNS alias, as I said before, you can use that as connection string from DOS prompt
C:\> sqlplus scott/tiger@<TNS alias>
or using SqlPlus in the Oracle menu. -
How connect to oracle RAC via the RSG using port forwarding
Hi all,
I got a problem trying to connect to oracle RAC via the RSG using port forwarding .
on command line i sue to connect :
sqlplus 'username/password@(DESCRIPTION=(ADDRESS_LIST=(ADDRESS=(PROTOCOL=tcp)(HOST=firstRACnode)(PORT=1521))(ADDRESS=(PROTOCOL=tcp)(HOST=secondRACnode)(PORT=1521)))(CONNECT_DATA=(SERVICE_NAME=MSDP)))'
but when using port forwarding i forward the port 1521 to a local port and make ssh to the DB node ( as normal with other nodes but not RAC) but it never work with me for this situation
can any one give me a help ifthere is any changes should be done on the server side , or if any one faced such a problem and found a solution
Thanks,
Prathap.782011 wrote:
I got a problem trying to connect to oracle RAC via the RSG using port forwarding .
on command line i sue to connect :
sqlplus 'username/password@(DESCRIPTION=(ADDRESS_LIST=(ADDRESS=(PROTOCOL=tcp)(HOST=firstRACnode)(PORT=1521))(ADDRESS=(PROTOCOL=tcp)(HOST=secondRACnode)(PORT=1521)))(CONNECT_DATA=(SERVICE_NAME=MSDP)))'Not exactly sure what you are attempting, but if you doing port forwarding via ssh, the basic approach is as follows:
Step 1
Create a ssh tunnel from local machine to remote db server. Forward any local port (should not be a well known port or a port in the private/dynamic port range) to connect to the database server's listener port. If the ssh tunnel is into the db server itself, the connection (port forwarding) can be on localhost (as the Listener should be listening on it). Alternatively use a public IP of that db server.
Example (using OpenSSH on Ubuntu 9.4):
Local server port 1527 tunneled to port 1521 on database server 192.168.0.100 using o/s account johnd (we connect to port 1521 on db server via 127.0.0.1):
ssh -X -f -N -o ServerAliveInterval=3 -L 1527:127.0.0.1:1521 [email protected]
Step 2
Run sqlplus and connect to the local fowarded port on localhost, using the applicable connection settings (e.g SID/Service Name, etc).
sqlplus scott/tiger@"(DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=127.0.0.1)(PORT=1527)) (CONNECT_DATA=(SID=orcl) (SERVER=dedicated)))"Note that the Listener must not hand our connection off - as the case would be when using RAC for example and connecting via a Service Name and not a SID. We need the Listener that accepts our connection to immediately hand us over to the database instance (via either a dedicated server or a shared server dispatcher process). -
Trouble to connect to Oracle Lite with JDBC
Hi.
I have installed Oracle Lite 9i on my PC (Win 2000 Pro). Then I connected an HP Jornada 525 (WinCE 3.0) and with
ActiveSync I installed the Oracle Mobile Client. Using MSql, I created some tables and did some data inserts - Oracle
is working fine on the Pocket PC. The next step was to create an Java application that will run on the Jornada to
connect to this database and edit its data. Here is the initial source code:
import java.sql.*;
public class JDBCEX {
public void JDBCEX () {
public static void main(String args[]) {
Connection conn = null;
Statement stmt = null;
ResultSet retset = null;
try {
Class.forName("oracle.lite.poljdbc.POLJDBCDriver");
conn = DriverManager.getConnection("jdbc:Polite:Polite","system", "manager");
catch (Exception e) {
System.out.println(e);
System.exit(0);
This works fine on my PC, but in the Pocket PC it gave me: java.sql.SQLException: Internal Error. This after I expanded
the jar files, 'cause before it tells me that ther is no oljdbc40 on the shared library path. I adjusted the classpath on the
registry, but i does not have any impact ... There is no file with name oljdbc40, only JARs olite40 and olitejdbc40. I installed
olitejdbcpj40.jar, and setting this library leads to the same error above.
What could be wrong? Do you have any tutorial or can you list all steps necessary to bring this working?
ThanksIf you're attempting to use the ODBC API directly, have you downloaded the ODBC SDK from Microsoft? That will include some sample code, which is a great starting point. So far as I'm aware, you shouldn't need to configure anything in Borland C++ that you don't have to configure in any other C++ compiler to use ODBC.
Justin
Distributed Database Consulting, Inc.
http://www.ddbcinc.com/askDDBC -
Connexion à Oracle Lite via SQLplus?
Hello, I'd like to use BPEL to update a data base oracle lite and even if i can connect it with BPEL I have this error in the invoke when I try to run it with the BPEL consol, does some one know what is wrong?
“{http://schemas.oracle.com/bpel/extension}bindingFault” a été générée.
<bindingFault>
<part name= ‘code’>
<code> 0 </code>
</part>
<part name= ‘summary’>
<summary> file:/C:/OraBPELPrbl_1/integration/orabpel/domains/default/tmp/.bpel_BPEL
DB-03_1.0.jar/ECRITURE.wsdl [ ECRITURE_ptt::merge(BtestCollection) J - WSIF JCA Execute of operation ‘merqe’ failed due to: Exception : échec de l’exécution de DBWritelnteractionspec. unknown a échoué. Nom du descripteur: [unknown]. ; nested exception is: DRABPEL-11616 Exception: échec de l’exécution de DBWritelnteractionspec. unknown a échoué. Nom du descripteur: [unknown]. Cause: Exception [TOPLINK-4002] (DracleAS TopLink - 10g (9.0.4.5) (Build 040930)):
oracle.toplinlc.exceptions.DatabaseException Description de l’exception:
java.sql.SQLException: JDBC 2.0 feature is not yet implemented Exception interne:
java.sql.SQLException: JDBC 2.0 feature is not yet implemented Code d’erreur: 0.
</summary>
</part>
<part name=’detail’ >
<detail> Description de l’exception : java.sql.SQLException: JDBC 2.0 feature s not yet implemented Exception interne : java.sql.SQLException: JDBC 2.0 feature is not yet implemented Code d’erreur: 0</detail>
</part>
</bindingFaut>Hi,
Possible owing to problems in interpreting JDBC 2.0 related config-properties.
Try creating a simple Connector-factory entry as follows in (C:\Oracle\OracleSOA10.1.3.1\j2ee\home\application-deployments\default\DbAdapter\oc4j-ra.xml)
<connector-factory location="eis/DB/Olite" connector-name="Database Adapter">
<config-property name="xADataSourceName" value="jdbc/olite"/>
<config-property name="dataSourceName" value=""/>
<config-property name="platformClassName" value="oracle.toplink.platform.database.Oracle9Platform"/>
<config-property name="usesNativeSequencing" value="true"/>
<config-property name="sequencePreallocationSize" value="50"/>
<config-property name="defaultNChar" value="false"/>
<config-property name="usesBatchWriting" value="false"/>
<connection-pooling use="none">
</connection-pooling>
<security-config use="none">
</security-config>
</connector-factory>
And make sure you have a relevant entry in
C:\Oracle\OracleSOA10.1.3.1\j2ee\home\config\data-sources.xml
<managed-data-source name="OliteDataSource" connection-pool-name="OlitePool" jndi-name="jdbc/olite"/>
<connection-pool name="OlitePool">
<connection-factory factory-class="oracle.lite.poljdbc.POLJDBCDriver" url="jdbc:polite4@localhost:1521:orabpel" user="system" password="manager"/>
</connection-pool>
Once you have made the changes and bounced the SOA/BPEL instance, you should be able bind to the Olite DB through BPEL.
Let me know if you still have issues.
Rgds,
Lakshmi -
I am trying to make a connection from JDeveloper 2.0 to Oracle
Lite 8i 4.0.
I get a connection defined in the connection wizard but I have
to use the Sun Jdbc Odbc driver and it does not show up in the
connections dropdown when I go to use it.
Does anyone know how I can get a usable connection?
Stan McDaniel
nullLaura,
Can you tell me than what's the use of choosing an Oracle Lite
driver in the Connection wizzard? The problem discribed below is
not limited to applets: in applications I can't use my lite-
connection either.
And do you know of a way to use a thin driver to connect to an
Oracle Lite database?
Thanks a lot for the help so far,
Marko.
: Marko,
: Yes, you can only use the JDBC thin driver when creating an
: applet (this is generic, not specific to the Infobus). This
is
: because the OCI drivers require that the client of the app
have
: the OCIJDBC8.dll in their Oracle_Home, and that Oracle_Home be
in
: the client's PATH. Because an applet is self-contained, it
has
: no way of 'looking outside' itself for that client-side DLL.
: With the JDBC thin driver, everything is included in the
: classes111.zip file.
: Laura
: Marko (guest) wrote:
: : Laura,
: : Great, it works! Well, partly at least. I am now able to use
: the
: : driver in JDBC-applications. It is also possible to use the
: : driver when defining a new Connection with the connection-
: : wizzard.
: : The only remaining problem is the fact that the newly
defined
: : connection can't be chosen, when I start creating an infobus-
: : applet. Can it be that only thin and oci drivers can be used
: for
: : infobus-applets?
: : JDeveloper Team (guest) wrote:
: : : Marko,
: : : If I remember correctly, Oracle Lite 4.0 was not available
at
: : the
: : : time we released JDeveloper 2.0, so it is possible that
the
: : : drivers are not compatible.
: : : You say that JDeveloper needs the 35 jar. Are you getting
an
: : : error when you try to define a connection? Can you tell
me
: : what
: : : that error is? I will try to verify what is happening.
: : : A few things to try:
: : : 1. When you add the Oracle Lite library to your project
: : : properties, make sure it appears before/above any other
JDBC
: : or
: : : EJB libraries. If necessary, select the library in the
list
: : and
: : : drag it up.
: : : 2. When you edit the IDE Classpath, also make sure the
: : pointers
: : : to the Oracle Lite jars come before any of
: : the 'classes111.zip'
: : : files.
: : : Laura
: : : Marko (guest) wrote:
: : : : I have the same problem. Oracle Lite 8i is shipped with
: : : : olite35.jar and olite40.jar. JDeveloper can't use the
: driver
: : in
: : : : olite40.jar for some reason. I have tried the solution
: : : described
: : : : below, but JDeveloper needs oljdbc35.dll in the shared
: : library
: : : : path to use olite35.jar. Guess what: there is only
: : oljdbc40.dll
: : : : in Oracle Lite 8i 4.0.
: : : : JDev Team (guest) wrote:
: : : : : Stan,
: : : : : This is documented in the Release Notes as follows:
: : : : : 1. Install JDeveloper.
: : : : : 2. Install Oracle Lite 3.6 or higher.
: : : : : 3. Launch JDeveloper.
: : : : : 4. Add a library for Oracle Lite by following these
: steps:
: : : : : a.Choose the menu option Tools | Default Project
: : : : Properties.
: : : : : b.Click the Libraries button at the bottom of the
: : dialog.
: : : : : c.Click the New button on the lower right to add a
new
: : : : : library.
: : : : : d.Name the library Oracle Lite by typing in the
Name
: : : field.
: : : : : e.Add the path to the Oracle Lite driver by typing
in
: : the
: : : : : Class Path field. This should be a jar file called
: : : : : <oracle_home>\lite\classes\olite36.jar, but check
: the
: : : : : documentation for your version of Oracle Lite.
: : : : : f.Click OK to add the Library. JDeveloper analyses
the
: : : : : dependencies for the driver and returns to the
: : : : Default
: : : : : Project Properties dialog.
: : : : : g.Click Add to add Oracle Lite to the default
project
: : : : : properties for all future generated projects.
: : : : Alternatively,
: : : : : you may add the Oracle Lite driver on a
: : : : : project by project basis by selecting Project |
: : Project
: : : : : Properties and adding the newly created library
to
: : the
: : : : : current project.
: : : : : 5. Quit JDeveloper.
: : : : : 6. Add the Oracle Lite jar file to the IDE Classpath
by
: : : : following
: : : : : these steps:
: : : : : a.Open the file <jdev_home>\bin\jdeveloper.ini.
: : : : : b.Under the section [Java_Global], add the path of
the
: : : : Oracle
: : : : : Lite driver to the IDEClassPath. This should be a
: jar
: : : : file
: : : : : called
: : : : : <oracle_home>\lite\classes\olite36.jar, but check
: the
: : : : : documentation for your version of Oracle Lite.
: : : : : 7. Restart JDeveloper.
: : : : : Stan McDaniel (guest) wrote:
: : : : : : I am trying to make a connection from JDeveloper 2.0
to
: : : : Oracle
: : : : : : Lite 8i 4.0.
: : : : : : I get a connection defined in the connection wizard
but
: : I
: : : : have
: : : : : : to use the Sun Jdbc Odbc driver and it does not show
up
: : in
: : : : the
: : : : : : connections dropdown when I go to use it.
: : : : : : Does anyone know how I can get a usable connection?
: : : : : : Stan McDaniel
null -
JDeveloper 10G (BPEL Designer): how to create db connection to Oracle Lite
I want to create a JDeveloper database connection to the Oracle Lite database installed with JDeveloper 10G BPEL Designer, but haven't been able to find any info on the subject.
Can anyone point me to some info or walk me through it?
RegardsTo connect JDeveloper 10g to an Oracle Lite database, you will need to follow this setup.
1. Create an ODBC entry for the Oracle Lite database. If you have installed Oracle Lite 10g Mobile Development Kit, you should have a copy of POLITE.ODB pre-installed. Check your ODBC.ini, or run Administrative Tools > Data Sources (ODBC), and follow the polite entry pattern. If you create a new Oracle Lite database, you must create a matching enrty in the ODBC configuration file.
2. In JDeveloper, create a new connection for your Oracle Lite database.
The Connection Name should match your entry in ODBC for ease of reading.
The Connection Type should be Oracle Lite.
The Username is system.
The Password is xxx.
The Deploy Password box is checked.
The Datasource Name must match the ODBC entry exactly.
Leave the rest of the fields as is.
Test your new connection.
Enjoy. -
Connection to Oracle XE via IIS/ASP app was working then stopped
I am prototyping an application for my new management here so that I can recommend they use Oracle XE.
The connection to the Oracle XE database appears to have stopped working, via an IIS/ASP application I wrote. I can still connect through ODBC using native MS Access to Oracle XE, when logged into XP, its just when I try to log in using the app via IIS I get the following error:
Unable to establish connection to database.
Error information:
Microsoft OLE DB Provider for ODBC Drivers (0x80040E4D)
[Oracle][ODBC][Ora]ORA-12154: TNS:could not resolve the connect identifier specified
It was working for a while, like the whole first week. It might be related to the fact that that I finally rebooted, not sure.
I have tried many, many things. I made the IUSR account an admin on the box hoping that maybe it had just lost access to the local ODBC/TNSNAMES. Right now all the components are local to my development box, from the IIS server to the Oracle eXtended Edition database (XE, free). Like I said, it was working. I did have this same message I believe early on, which turned out due to the fact that my ODBC DSN was a local DSN, instead of a System DSN, which I overcame at that time. But it just started happening again, possibly after a reboot.
I also tried switching to a local MS Access database, and I got a similar message. I moved the Access db to c: root, and it appears to work, so it appears to be a file/directory access issue.
But I'm not sure how to resolve it because I would much prefer to use the Oracle database.
Thoughts?As far as the connect string goes, I'm not sure exactly what to specify to you.
I am using the default connect string that comes when you install XE.
I.e., "XE".
I suspect this might be a path issue for the virtual account that is used by IIS sessions. As you may know, when IIS runs, it logs the web user into the box using a dummy account, typically prefixed with the string "IUSR".
Although I made this account an admin to the box, I think I may need to add some of the Oracle Client directories to the path which is accessed by this IUSR account. The problem is, the acount, with its password, was set up by default and I don't know what its password is. But I think that I could try to adde Oracle's home path to the default system path, what do you think?
In other words, I don't think the XE connection libraries are available to this dummy IIS account. The strange thing is, it worked for a while, ostensibly till I rebooted.
Know also that I am not using the Oracle Client per se, although I did install it and try it with mixed results. I am just using the Oracle OLE DB ODBC that appeared when I installed the Oracle XE server itself. -
ASP SCRIPT CANT CONNECT TO ORACLE 9i via Oracle9i Client
Please help...i get an ORA-12154 when attempting to link access and oracle. what are some ways to correct this issue. i have researched as much as i understand..
error that occurrs is as follows:
[Microsoft][ODBC driver for Oracle][Oracle]ORA-12154: TNS:could not resolve service name(#12154...........
I HAVE installed and CONFIGURED ORACLE 9i ODBC DRIVER.
ODBC to Oracle works mit Excel or Access.
TNS works good with Developer 6i and SQL Plus.
Only my ASP VBSCRIPT on my IIS5 cant connect.
please can anyone help me !Microsoft OLE DB Provider for ODBC Drivers- Fehler '80004005'
Aufgrund des Systemfehlers 5 (Oracle in Oracle9i_Client) konnte der angegebene Treiber nicht geladen werden.
/apps/connection/uxprod.asp, line 4
hat folgenden Inhalt:
<%
' ************* DB-Connection ***************
Set conn = Server.CreateObject("ADODB.Connection")
conn.Open "DSN=UXPROD;UID=anwlist;Password=xxxx;"
%>
ODBC Driver with Excel works well; anly with ASP via
OLE DB ist doesnt work ! -
How to connect to Oracle RAC via SCAN
I just finished Oracle RAC install but I cannot connect via the SCAN name from a remote client - only via the VIP:
$ sqlplus system/[email protected]:1521/racdb.development.info
SQL*Plus: Release 11.2.0.3.0 Production on Fri May 25 15:14:13 2012
Copyright (c) 1982, 2011, Oracle. All rights reserved.
ERROR:
ORA-12545: Connect failed because target host or object does not exist
This is Oracle 11r2 on Unbreakable Linux 6.2. The sqlplus above is from Instant Client 11.2. Further info is:
$ ./srvctl status scan
SCAN VIP scan1 is enabled
SCAN VIP scan1 is running on node racnode1
SCAN VIP scan2 is enabled
SCAN VIP scan2 is running on node racnode2
SCAN VIP scan3 is enabled
SCAN VIP scan3 is running on node racnode2
./srvctl status scan_listener
SCAN Listener LISTENER_SCAN1 is enabled
SCAN listener LISTENER_SCAN1 is running on node racnode1
$ nslookup rac-scan
Server: 172.20.0.15
Address: 172.20.0.15#53
Name: rac-scan.xxx.local
Address: 172.20.0.213
Name: rac-scan.xxx.local
Address: 172.20.0.214
Name: rac-scan.xxx.local
Address: 172.20.0.210
on racnode1:
$ /sbin/ifconfig
eth0 Link encap:Ethernet HWaddr 00:1A:A0:96:A6:B2
inet addr:172.20.0.221 Bcast:172.20.0.255 Mask:255.255.255.0 <--- public ip
inet6 addr: fe80::21a:a0ff:fe96:a6b2/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:9458999 errors:0 dropped:0 overruns:0 frame:0
TX packets:14852588 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:4001261935 (3.7 GiB) TX bytes:1196090235 (1.1 GiB)
Interrupt:20 Memory:fdfc0000-fdfe0000
eth0:1 Link encap:Ethernet HWaddr 00:1A:A0:96:A6:B2
inet addr:172.20.0.212 Bcast:172.20.0.255 Mask:255.255.255.0 <---- VIP
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
Interrupt:20 Memory:fdfc0000-fdfe0000
eth0:2 Link encap:Ethernet HWaddr 00:1A:A0:96:A6:B2
inet addr:172.20.0.214 Bcast:172.20.0.255 Mask:255.255.255.0 <---- one of the SCAN ips
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
Interrupt:20 Memory:fdfc0000-fdfe0000
eth1 Link encap:Ethernet HWaddr 90:E2:BA:0F:F9:8F
inet addr:10.0.0.2 Bcast:10.0.0.255 Mask:255.255.255.0 <---- private interconnect
inet6 addr: fe80::92e2:baff:fe0f:f98f/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:26461881 errors:4 dropped:0 overruns:0 frame:2
TX packets:33628826 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:4053295644 (3.7 GiB) TX bytes:695537051 (663.3 MiB)
on racnode2
eth0 Link encap:Ethernet HWaddr 00:1A:A0:96:A4:5B
inet addr:172.20.0.174 Bcast:172.20.0.255 Mask:255.255.255.0 <--- public IP
inet6 addr: fe80::21a:a0ff:fe96:a45b/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:3233473 errors:0 dropped:0 overruns:0 frame:0
TX packets:1766459 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:41109717 (39.2 MiB) TX bytes:179509273 (171.1 MiB)
Interrupt:20 Memory:fdfc0000-fdfe0000
eth0:1 Link encap:Ethernet HWaddr 00:1A:A0:96:A4:5B
inet addr:172.20.0.211 Bcast:172.20.0.255 Mask:255.255.255.0 <--- VIP
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
Interrupt:20 Memory:fdfc0000-fdfe0000
eth0:2 Link encap:Ethernet HWaddr 00:1A:A0:96:A4:5B
inet addr:172.20.0.210 Bcast:172.20.0.255 Mask:255.255.255.0 <--- another SCAN IP
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
Interrupt:20 Memory:fdfc0000-fdfe0000
eth0:3 Link encap:Ethernet HWaddr 00:1A:A0:96:A4:5B
inet addr:172.20.0.213 Bcast:172.20.0.255 Mask:255.255.255.0 <--- another SCAN IP
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
Interrupt:20 Memory:fdfc0000-fdfe0000
$ ./lsnrctl status LISTENER_SCAN1
LSNRCTL for Linux: Version 11.2.0.1.0 - Production on 25-MAY-2012 15:12:35
Copyright (c) 1991, 2009, Oracle. All rights reserved.
Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=IPC)(KEY=LISTENER_SCAN1)))
STATUS of the LISTENER
Alias LISTENER_SCAN1
Version TNSLSNR for Linux: Version 11.2.0.1.0 - Production
Start Date 25-MAY-2012 14:28:11
Uptime 0 days 0 hr. 44 min. 23 sec
Trace Level off
Security ON: Local OS Authentication
SNMP OFF
Listener Parameter File /home/oracle/app/11.2.0/grid/network/admin/listener.ora
Listener Log File /home/oracle/app/oracle/diag/tnslsnr/racnode1/listener_scan1/alert/log.xml
Listening Endpoints Summary...
(DESCRIPTION=(ADDRESS=(PROTOCOL=ipc)(KEY=LISTENER_SCAN1)))
(DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=172.20.0.214)(PORT=1521)))
Services Summary...
Service "racdb.development.info" has 2 instance(s).
Instance "racdb1", status READY, has 1 handler(s) for this service...
Instance "racdb2", status READY, has 1 handler(s) for this service...
Service "racdbXDB.development.info" has 2 instance(s).
Instance "racdb1", status READY, has 1 handler(s) for this service...
Instance "racdb2", status READY, has 1 handler(s) for this service...
The command completed successfully
Any ideas?How does SCAN work?
“When a client submits a request, the SCAN listener listening on a SCAN IP address and the SCAN port is contracted on a client’s behalf. Because all services on the cluster are registered with the SCAN listener, the SCAN listener replies with the address of the local listener (Using SCAN the connection is initiated using the SCANIP, but is established using the VIP) on the least-loaded node (Each scan listener keeps updated cluster load statistics) where the service is currently being offered. Finally, the client establishes connection to the service through the listener using VIP on the node where service is offered.All of these actions take place transparently to the client without any explicit configuration required in the client.”
So, to SCAN Works you must aware:
Server (cluster)
-The service must be registered on Local/Scan ListenerI believe I've done this now but see below.
Database (rac)
-You must use remote_listener parameterThe remote listener parameter I have is:
SQL> show parameter remote listener
NAME TYPE VALUE
remote_dependencies_mode string TIMESTAMP
remote_listener string rac-scan:1521
remote_login_passwordfile string EXCLUSIVE
remote_os_authent boolean FALSE
remote_os_roles boolean FALSE
result_cache_remote_expiration integer 0
Cient
-Must resolve all SCAN Names and VIP Names (check with nslookup)I'd made a mistake there. My VIP names were not available from DNS.
-Must access port of Listener
Try it:
http://levipereira.wordpress.com/2011/05/03/configuring-client-to-use-scan-11-2-0/
Thanks, that document was useful however I don't think I've got it completely right as yet as I have no listener_scan2.
$ olsnodes -i -s -n
racnode1 1 racnode1-vip Active
racnode2 2 racnode2-vip Active
srvctl config vip -n racnode1
VIP exists.:racnode1
VIP exists.: /racnode1-vip/172.20.0.212/255.255.255.0/eth0
srvctl config vip -n racnode2
VIP exists.:racnode2
VIP exists.: /racnode2-vip/172.20.0.211/255.255.255.0/eth0
srvctl config scan
SCAN name: rac-scan.xxx.local, Network: 1/172.20.0.0/255.255.255.0/eth0
SCAN VIP name: scan1, IP: /172.20.0.214/172.20.0.214
SCAN VIP name: scan2, IP: /rac-scan.xxx.local/172.20.0.210
SCAN VIP name: scan3, IP: /172.20.0.213/172.20.0.213
SQL> select INST_ID, NAME, VALUE
2 from gv$parameter
3 where name like '%_listener%';
INST_ID
NAME
VALUE
1
local_listener
(address=(protocol=tcp)(port=1521)(host=racnode1-vip.xxx.local))
1
remote_listener
rac-scan:1521
INST_ID
NAME
VALUE
2
local_listener
(address=(protocol=tcp)(port=1521)(host=racnode1-vip.xxx.local))
2
remote_listener
INST_ID
NAME
VALUE
rac-scan:1521
racnode1
$ lsnrctl service listener_scan1
LSNRCTL for Linux: Version 11.2.0.1.0 - Production on 28-MAY-2012 13:36:10
Copyright (c) 1991, 2009, Oracle. All rights reserved.
Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=IPC)(KEY=LISTENER_SCAN1)))
Services Summary...
Service "racdb.development.info" has 2 instance(s).
Instance "racdb1", status READY, has 1 handler(s) for this service...
Handler(s):
"DEDICATED" established:0 refused:0 state:ready
REMOTE SERVER
(address=(protocol=tcp)(port=1521)(host=racnode1-vip.xxx.local))
Instance "racdb2", status READY, has 1 handler(s) for this service...
Handler(s):
"DEDICATED" established:0 refused:0 state:ready
REMOTE SERVER
(address=(protocol=tcp)(port=1521)(host=racnode2-vip.xxx.local))
Service "racdbXDB.development.info" has 2 instance(s).
Instance "racdb1", status READY, has 1 handler(s) for this service...
Handler(s):
"D000" established:0 refused:0 current:0 max:1022 state:ready
DISPATCHER <machine: racnode1.xxx.local, pid: 3651>
(ADDRESS=(PROTOCOL=tcp)(HOST=racnode1.xxx.local)(PORT=62553))
Instance "racdb2", status READY, has 1 handler(s) for this service...
Handler(s):
"D000" established:0 refused:0 current:0 max:1022 state:ready
DISPATCHER <machine: racnode2.xxx.local, pid: 6501>
(ADDRESS=(PROTOCOL=tcp)(HOST=racnode2.xxx.local)(PORT=10619))
The command completed successfully
$ lsnrctl service
LSNRCTL for Linux: Version 11.2.0.1.0 - Production on 28-MAY-2012 13:38:02
Copyright (c) 1991, 2009, Oracle. All rights reserved.
Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=IPC)(KEY=LISTENER)))
Services Summary...
Service "+ASM" has 1 instance(s).
Instance "+ASM1", status READY, has 1 handler(s) for this service...
Handler(s):
"DEDICATED" established:0 refused:0 state:ready
LOCAL SERVER
Service "racdb.development.info" has 1 instance(s).
Instance "racdb1", status READY, has 1 handler(s) for this service...
Handler(s):
"DEDICATED" established:0 refused:0 state:ready
LOCAL SERVER
Service "racdbXDB.development.info" has 1 instance(s).
Instance "racdb1", status READY, has 1 handler(s) for this service...
Handler(s):
"D000" established:0 refused:0 current:0 max:1022 state:ready
DISPATCHER <machine: racnode1.xxx.local, pid: 3651>
(ADDRESS=(PROTOCOL=tcp)(HOST=racnode1.xxx.local)(PORT=62553))
The command completed successfully
racnode2
lsnrctl service listener_scan2
none of listener_scan1, 2 or 3 say anything other than TNS-01101: Could not find service name listener_scanN
lsnrctl service
$ lsnrctl service
LSNRCTL for Linux: Version 11.2.0.1.0 - Production on 28-MAY-2012 13:19:50
Copyright (c) 1991, 2009, Oracle. All rights reserved.
Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=IPC)(KEY=LISTENER)))
Services Summary...
Service "+ASM" has 1 instance(s).
Instance "+ASM2", status READY, has 1 handler(s) for this service...
Handler(s):
"DEDICATED" established:0 refused:0 state:ready
LOCAL SERVER
Service "racdb.development.info" has 1 instance(s).
Instance "racdb2", status READY, has 1 handler(s) for this service...
Handler(s):
"DEDICATED" established:14 refused:0 state:ready
LOCAL SERVER
Service "racdbXDB.development.info" has 1 instance(s).
Instance "racdb2", status READY, has 1 handler(s) for this service...
Handler(s):
"D000" established:0 refused:0 current:0 max:1022 state:ready
DISPATCHER <machine: racnode2.xxx.local, pid: 6501>
(ADDRESS=(PROTOCOL=tcp)(HOST=racnode2.xxx.local)(PORT=10619))
The command completed successfully
UPDATE:
$ srvctl config scan_listener
SCAN Listener LISTENER_SCAN1 exists. Port: TCP:1521
There is a period of time when I shutdown one node where I cannot connect and get "ORA-12514: TNS:listener does not currently know of service requested in connect descriptor"
Edited by: MartinJEvans on May 28, 2012 2:02 PM -
Connecting to Oracle XE via regular 10g client - ORA-12514
I have had the 10g client installled on my computer for a while, for developing against our company Oracle databases. I have now installed the XE database locally on my computer so I can do some local development - according to the information I've been able to find the two should live side-by-side without problem.
I can still connect to our company databases just fine, but I can't get a connection to the local XE database at all.
I've added this line to tnsnames.ora:
XE = (DESCRIPTION = (ADDRESS = (PROTOCOL = TCP)(HOST = localhost)(PORT = 1521))(CONNECT_DATA = (SERVICE_NAME = XE)))
The error I'm getting connecting is:
ORA-12514: TNS:listener does not currently know of service requested in connect descriptor
Thanks for any help!Hi,
I did mean duplicates even between different tnsnames.ora files.
As I understand, if you XE works, you should not need do anything for that tnsnames.ora.
Just find how entry should be for client.
BTW, what tool you will use for XE? Do you need client?
E.g. if you use SQL Developer, you do not need client or set anything to tnsnames.ora
Regards,
Jari
Edited by: jarola on Jan 18, 2011 2:30 PM
BTW, it might good to search Instant Client forums if you find help there.
If you do not find answer, then it might good idea post question there.
At least for me this is more client question than XE.
Instant Client
But as I understand it should not be any problem use 10g client for XE.
I just have never done that =) -
ODBC connections to Oracle 9i Lite
i'm currently using oracle 9i Lite 5.0.2 database and Palm OS 5.1. can any body send me a sample code in JAVAwith which i can connect to Oracle Lite database in my palm from a PALM Application using ODBC.
I am running the OBIEE software on Windows XP Professional on a laptop. An Oracle 10.2.0.1 EE database also resides on this machine.
My TNSNAMES.ora file is located in one of my Oracle Homes but I have a system environment variable set for TNS_ADMIN. I am using the default listener installed with the preconfigured database, and I can connect to the database ok from the PC using SQL*Plus, TOAD etc. I have also tried connecting to the ODBC data source set up for this 10g db from within Excel with no problems.
The System DSN entry called ORCLSH uses the driver 'Oracle in OraDB 10g_home1'. I have tried the ODBC driver with both a username entered and not. The TNS entry alias ORCLSH is used, which matches my TNSNAMES.ora file entry in the location designated by TNS_ADMIN. My db service name is ORCL. The parameters in the data connections are left are their defaults, i.e., enable result sets, enable query timeout, enable thread safety - all checked.
The connection pool has been named ORCLSH too. I'm using Call interface ODBC 3.5, max connections 10, data source name ORCLSH. Shared login - checked, enable connection poolng - checked, use multithreaded connections - checked, execute queries asynchronously - checked, parameters supplied - checked (defaults).
The writeback tab has been left alone (prefix TT, bulk insert buffer size 32, trx boundary 10).
What other parameter details do you need to know, other that what details I have previously provided?
Cheers,
John
Maybe you are looking for
-
There is an FAQ, "On how many computers can I install Final Cut Pro X?", but the answer doesn't really say. Is it 5?, 10? I read various interpretations elsewhere and am trying to find the correct answer. Thanks
-
Change of a single line in a text file
Is there a option in CVI to change a single line in a text file (.txt), without reading the whole text file into the buffer and writing the whole buffer back after the editing from the one line?
-
How to stop the new Photos.app opening every time I put in a new device?
How to stop the new Photos.app opening every time I put in a new device? It's annoying as i use bridge to do all my photo organising.
-
My iphone 4 is saying "no service" and "searching" how can i correct this issue?
my iphone 4 is working but it says "searching" or "no service" but i put my number on to another phone and it is working just fine. How can i fix this? Please HELP!
-
After I upgraded to Firefox 5 my bookmarks disapeared, how do I get them back? Thank you
After I upgraded to Firefox 5 my bookmarks disapeared, how do I get them back? Thank you