I am new to R and trying to connect to Oracle using the way told here.
I downloaded instant client but could not find anything apart from some .dll files there.
Request all to please guide me step by step as to how to connect to Oracle from R. I have had a look at some of the solutions but they couldnt work out.
Please tell me if at all there, the prerequisites to connecting to oracle from R.
BTW, I am using oracle sql developer.
If the client that you already use on your desktop uses JDBC, then it's probably simplest to use RJDBC package and use the same URLs that your desktop package used!
library(RJDBC)
drv <- JDBC("oracle.jdbc.OracleDriver",
"/home/sean/local/DbVisualizer/jdbc/oracle/ojdbc6.jar", "`")
conn <- dbConnect(drv, "jdbc:oracle:thin://localhost/test")
dbListTables(conn)
data(iris)
dbWriteTable(conn, "iris", iris)
dbGetQuery(conn, "select count(*) from iris")
d <- dbReadTable(conn, "iris")
You'll obviously have to change the path to the driver jar file and the connection string.
It might not be quite as fast as a native driver, but I found it easier to get working!
I advice best way is to install oracle R enterprise edition packages.
This will help to connect to oracle as well as it includes many other features.
You can download these packages for free from the below link.
http://www.oracle.com/technetwork/database/options/advanced-analytics/r-enterprise/ore-downloads-1502823.html
Download Client as well as Client Supporting packages and install these packages through either R console or R Studio.
Once installed use library(ore) to load the library.
you can use ore.connect() function to connect to oracle and ore.sync() function to sync the tables and views into r so that u can use that as r objects.
You can refer this document for the syntax for ore.connect() and also for other available functions.
http://www.oracle.com/technetwork/database/options/advanced-analytics/r-enterprise/ore-reference-manual-1882822.pdf
ore.ls() will help you to list the available ore objects.
to use it as an r data frame use the function:
data=ore.pull(table_name)
Related
I'm trying to create a new connection on the Oracle SQL Developer tool but I'm not able to. I just simply download the latest version of oracle SQL developer tool from the oracle site and unzip the folder and run. I haven't set any password or anything because there is nothing to do so.
Please guide how I can make a local connection on oracle Sql developer tool.
Well based on what you have described, you only installed SQL Developer, without having the Oracle Client installed on your device.
To be able to connec to to something in SQL Developer, you need to have a database to which you would like to connect. That basically means that either you need to install one, or you have one available in your System. But I will assume that you are new to this and have no database to connect to.
First things first, you will need to install the Oracle Client. A pretty good example can be found on here. You have a video tutorial which contains a step by step guide.
Once you finished installing the Oracle Client, you can proceed with unlocking the basic HR Schema, or create your own DB Schema. Again, a tutorial on how to achieve this step can be found here.
There are a few steps to follow, but in the end, if you follow them accordingly, you will be able to make a local connection on oracle using SQL Developer. Besides that, both the links will provide you with some explanation as well for each particular task.
I have a java program using a derby db in Eclipse. I want to use this derby db data with a new program I am about to create with the Lazarus ide. Can I connect direct to the derby db, if so how. Or do I need to export the derby db in some way to use with the Lazarus ide, if so how would I do this?
if you decide with export variant, then .csv (comma separated value) is probably the best inter database.
I have some experience with tdbf.
But from what I've read sqlite will be the best option.
I'm sorry for posting this as answer i have only 42 points reputation and can't post it as comment (need 50 for it)
Does derby support ODBC? Lazarus has a ODBC connection that can be used to connect databases that are not directly supported.
I searched quickly, but mostly saw references to older commercial Derby ODBC drivers. And it will probably depend on OS.
Sorry for being the question very naive but the same is true for my experience with the subject.
From the googling what i understood i just want to confirm that the understanding is correct. Everyone is welcome to pin point where i am wrong.
OCI is basically a set of APIs which the C/C++ programmers can use to write C/C++
applications to access Oracle Database.
a) Oracle instant client SDK is a (DLL/Shared library) which USES OCI (???). The C/C++
code written by C/C++ programmers links to the Oracle instant client libraries &
hence uses OCI as well.
b) The benefit of instant client is that it eases the programmers pain to write some
complex code(??).
c) Even if C/C++ programmer doesn't use Instant Client libraries, they can still use OCI
& get the work done (Is this correct??)
d) Is this true? C/C++ programmers just need OCI library to write an application which
connects to Remote Oracle database & does table operations? Do we need any ODBC
drivers also? If yes, why? Won't oci.lib be enough?
What is the difference between FULL Oracle Client & Instant Oracle Client? Is it true
that Instant Oracle client is just a subset of FULL Oracle client?
I am not able to obtain the interoperatibility matrix of Instant Client will various
Oracle databases. Searched alot on Oracle website. The only thing i could find is link
to Oracle support site which i can't access.
Please clarify my doubts. Many thanks in advance.
Briefly:
OCI is C API libary. There is also C++ library called OCCI, but I do not recommend it(you can have problems with C++ ABI changes/dialects on various compilers)
Both Instant and "thick" Oracle client contain OCI library (OCI.DLL or linclntsh.so). The one provided by Instant client is more-or-less self-contained. e.i. it does not depend on other libs provided with Oracle client (compare output from ldd on Linux or depwalk on Windows).
Both also contain necessary headers
The C API in both clients is practically identical. The only exception I recall is a set of supported database native characters sets. InstantClient supports only UTF8, ISO Latin1 and ASCII.
"thick" client also contains a library named "libxml.a" which is needed when you want to use datatype SYS.XMLTYPE. This library is not (for some unknown reason) bundled with InstantClient
"thick" client also contains some handy diagnostic tools like tnsping
InstantClient is very easy to "setup". Users simply unpack a single .zip file. Do not have to set ORACLE_HOME PATH LD_LIBRARY_PATH env. variables. You simply dlopen() one library file and that's all.
InstanctClient can work without tnsnames.ora (although it supports it) instead of that you can use jdbc-like EZCONNECT
Both types of clients may not be re-distributed, unless you're Oracle businesses partner. So you must not embed these driver's lib in your application. Each user must download then separately.
So far I have not found a C API way how to distinguish InstantClient OCI.DLL libary.
There is InstantClient specific section in Oracle Call Interface Programmer's Guide
I recall there might be some problems with InstantClient when you set ORACLE_HOME env. variable and it's values ends (?or does not end?) with slash '/'
Oracle instant client is a small subset of the full/"thick" client. It includes the OCI C-libraries, JDBC and ODBC which makes is possible for programs written in C, Perl, Python, Java, Scala and so on to connect to an Oracle database server. Instant client dont include familiar Oracle tools like sqlplus, sqlldr, exp, imp and more. However, sqlplus can be installed separately to work with instant client without needing a full client.
I have an MS-Access mdb file that I need to import data from into my mysql instance. I am on a mac, is there any free/OSS tools that allow me to do that? If not, is there a free/OSS JDBC driver that I can use to extract the data I need?
Thanks.
Have a look at Jackcess. Note that this doesn't support Access 97 databases, however, only 2000+.
For Access 97, the only thing I'm aware of is mdbtools, but that's a C library, so you'll have to write some JNI glue code if you want to use it from Java; also, it's not maintained anymore, to the best of my knowledge.
UCanAccess is a pure-Java JDBC driver that can read from and write to Access 2000 and newer databases. (Access 97 files are supported read-only.) It will work on any machine that runs Java.
For more details see
Manipulating an Access database from Java without ODBC
Is your Access MDB on mac?
Does the mac Access have the option of using linked tables?
If so, you can create a Linked Table from Access MDB to mySQL. Then, you could treat mysql tables as if it were part of MS-Access.
EDIT: See if this helps.
You could export the MDB file using something like this. This won't help you if you need to do it from within your app, but if you are ok exporting the data then using it, then this should help.
I do the following way to convert;
Download ACCDB MDB Explorer
http://accdb-mdb-explorer.en.softonic.com/mac
Open the MDB file
Export as SQL
Import in MySQL using MySQL Workbench.
Hope it helps..
What are the steps to connect to Oracle 9i with VB6? How can I use modules and stored procedures in VB6 and how can I call an SP?
What is the method to use ADO which is helpful to insert, update, search and delete the items from the front end?
You will need ADO to connect to Oracle (add reference to microsoft activex data objects library).
You need to know where is the Oracle Instance hosted alongwith username and password?
The connection string for Oracle can be found from www.connectionstrings.com
ADODB.Connection is the one that you will need to establish the connection.
Connection has Execute method - which you can use for any insert/update/delete statements.
Now, read some documentation on ADO object library from MSDN.
And, write the code by yourself.
You can choose between the Oracle OLEDB driver (which I think comes with the Oracle client install mentioned by YogoZuno) or one from Microsoft (can't remember if it was just a standard microsoft oledb driver or one released with a nod towards oracle): in any case, the Oracle OLEDB driver is far better.
You will also need to have the Oracle client installed on your PC, along with an appropriate TNS Names file. Also, be aware that there are some minor functional differences between various versions of the Oracle 9 client - I had some issues under v9.2.0.1, that did not occur under v9.2.0.7.