Dostęp do MS SQL Servera z poziomu Oracle-a

Ostatnio pojawiła się potrzeba odczytywania z bazy danych w Oracle’u pewnej tabeli z bazy na Microsoft SQL Serverze. Rozwiązaniem było zainstalowanie na maszynie z SQL Serverem tzw. Oracle Transparent Servera czyli programu, który stanowi swego rodzaju opakowanie na nie-Oracle’owy serwer umożliwiający dostęp do niego w bazie Oracle’a poprzez db link.

Poszczególne moduły Oracle Transparent Servera wybierane podczas instalacji są dedykowane do konkretnych baz danych. Potrafią one nawet przetłumaczyć odwołania do części funkcji w zapytaniach i umożliwiają np. wywoływanie z poziomu Oracle-a procedury składowanej w T-SQLu. Oracle Transparent Server można ściągnąć z http://www.oracle.com/technology/software/products/database/oracle10g/htdocs/10201winsoft.html

Opis działania znajduje się np. tutaj: http://oracle-apps-dba.blogspot.com/2008/04/oracle-transparent-gateways-general.html Instrukcje instalacji są na następnej stronie: http://oracle-apps-dba.blogspot.com/2008/04/oracle-transparent-gateway-for-ms-sql_16.html Instrukcje można znaleźć również na: http://forums.oracle.com/forums/thread.jspa?messageID=2720049&#2720049

Wystąpiła pewna różnice w stosunku do opisów: większość plików konfiguracyjnych znajdowała się w pliku network\admin a nie tg4msql\admin Dostęp do danych jest powolny – najprostsze zapytanie trwa 4 sekundy. Poprawa wydajności rozwiązania jest jednak osobnym tematem.

You May Also Like

Complex flows with Apache Camel

At work, we're mainly integrating services and systems, and since we're on a constant lookout for new, better technologies, ways to do things easier, make them more sustainable, we're trying to Usually we use Apache Camel for this task, which is a Swis...At work, we're mainly integrating services and systems, and since we're on a constant lookout for new, better technologies, ways to do things easier, make them more sustainable, we're trying to Usually we use Apache Camel for this task, which is a Swis...

New HTTP Logger Grails plugin

I've wrote a new Grails plugin - httplogger. It logs:

  • request information (url, headers, cookies, method, body),
  • grails dispatch information (controller, action, parameters),
  • response information (elapsed time and body).

It is mostly useful for logging your REST traffic. Full HTTP web pages can be huge to log and generally waste your space. I suggest to map all of your REST controllers with the same path in UrlMappings, e.g. /rest/ and configure this plugin with this path.

Here is some simple output just to give you a taste of it.

17:16:00,331 INFO  filters.LogRawRequestInfoFilter  - 17:16:00,340 INFO  filters.LogRawRequestInfoFilter  - 17:16:00,342 INFO  filters.LogGrailsUrlsInfoFilter  - 17:16:00,731 INFO  filters.LogOutputResponseFilter  - >> #1 returned 200, took 405 ms.
17:16:00,745 INFO filters.LogOutputResponseFilter - >> #1 responded with '{count:0}'
17:18:55,799 INFO  filters.LogRawRequestInfoFilter  - 17:18:55,799 INFO  filters.LogRawRequestInfoFilter  - 17:18:55,800 INFO  filters.LogRawRequestInfoFilter  - 17:18:55,801 INFO  filters.LogOutputResponseFilter  - >> #2 returned 404, took 3 ms.
17:18:55,802 INFO filters.LogOutputResponseFilter - >> #2 responded with ''

Official plugin information can be found on Grails plugins website here: http://grails.org/plugins/httplogger or you can browse code on github: TouK/grails-httplogger.