Simon Hax wrote:
> for clearification:
>
> the roots of the question:
> business needs; our client has a big Oracle infrastructure.
> Now they want, in relation to their infrastructure a litte App based on 
> SQlite.
>
> as I mentioned earlier:
> to copy data from an Oracle DB to another Oracle DB there is just one single 
> line necessary:
>
> import into mytable select a,b,c from remotetable remoteOracleDB
>
> somewhere in my local OracleDB I have to define a bit earlier a database link 
> with IP-adress, Port, SID UserID and passwort concerning the remote OracleDB.
> That's it.
>
> Are am I to lazy to implement by my self ? :  Yes and No
>
> I have implemented it within C# and ADO.net.
> Then it's not only one line of code, which is easy to read an easy to 
> maintain.
>   
Moving outside of the Oracle environment increases complexity (work).
> It's a lot more:
> The basic concept is a loop, suprise suprise !
> But you have to take into account that you have to convert every single 
> datatype,
> (e.g. DATE, there is a different representation Sqlite versus Oracle)
> you have to look for character-set and so on and so on.
>
> My wish:
> If someone else already has done this work ....
> Thatfore I think an ODBC driver has to be implemented (there I am not an 
> expert) ...
>
> and a database Link to Oracle should be defineable by ATTACH (IP-Adress:Port, 
> OracleSID, UserId, Password)
>
> that would be heaven on earth.
>   
Hi Simon,

"I have implemented it within C# and ADO.net.
Then it's not only one line of code, which is easy to read an easy to maintain."

It is not clear does this refer to the Oracle installation or to SQLite? 
- If it refers to SQLite why is it not sufficient?

There's an SQLite ODBC driver that is proven and Googling has shown that 
it has been applied in Oracle installations in the past:

Christian Werner: SQLite ODBC Driver 
<http://www.ch-werner.de/sqliteodbc/>. http://www.ch-werner.de/sqliteodbc/

Using the ODBC driver
- Query the SQLite app table for the data and put it into a temporary 
table. Use a temporary table or memory db to make the management and 
querying easier. Install the ODBC driver and you can query the SQLite 
database over the ODBC connection. Christian Werner's instructions are 
sufficient. Past Googling informs of satisfactory Oracle ODBC support. 
Query the SQLite db using ODBC as it is then an Oracle resource.
- You might want to start formating the data in this table during this 
session.
- Use the ODBC connection with the local Oracle(local) db and pass the 
data in the temp table to Oracle(local)
- The IP link between the local and remote Oracle dbs should be 
transparent and enable passing the (SQLite) data which has now become 
native. Between the Oracle(remote) and Oracle(local); it is an Oracle task.

Working a bit more conceptually use the SQLite C .csv extension.
- After compiling the extension; load it.
- Query the SQLite app table for the data and put it into a table 
generated by the extension. This extension reads and writes from a .csv 
formatted file.
- Writing the data to this (extension) table after creating the table 
puts the table data into the .csv file. Oracle(local) reads the .csv 
table as it would a spreadsheet.

To do it programmatically requires bindings for SQLite and Oracle, as 
Pavel pointed out.

Alternatively write the data in the temp table to a file and import the 
file data into Oracle(local)

- Gary Gabriel
_______________________________________________
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

Reply via email to