Accessing Microsoft SQL Server from Oracle

Once we had a need of accessing a table on an Microsoft SQL Server database from an Oracle database. Thus we had to install Oracle Transparent Server on the computer hosting SQL Server. Oracle Transparent Services is a kind of adapter for non-Oracle servers and allows access to it through database link. During the instalation of Oracle Transparent Server you have to choose modules dedicated to particular databases. The modules can translate calls to some functions and allows to call a T-SQL stored procedure from Oracle.

Oracle Transparent Server can be downloaded from 

http://www.oracle.com/technology/software/products/database/oracle10g/htdocs/10201winsoft.html  Description of its solution can be found here: http://oracle-apps-dba.blogspot.com/2008/04/oracle-transparent-gateways-general.html Instalation instructions are here… : http://oracle-apps-dba.blogspot.com/2008/04/oracle-transparent-gateway-for-ms-sql_16.html and here: http://forums.oracle.com/forums/thread.jspa?messageID=2720049&#2720049 However, most of the configurations files were located in the directory network\admin and not in tg4msql\admin as described I found that access to the data is slow – the simplest queries last for 4 seconds. However, increasing the efficiency is another topic.

You May Also Like

Simple HBase ORM

When dealing with data stored in HBase, you are quick to come to a conclusion, that it is extremaly inconvenient to reach to it via HBase native API. It is very verbose and you always need to convert between bytes and simple types - a pain. While I wa...When dealing with data stored in HBase, you are quick to come to a conclusion, that it is extremaly inconvenient to reach to it via HBase native API. It is very verbose and you always need to convert between bytes and simple types - a pain. While I wa...

Grails render as JSON catch

One of a reasons your controller doesn't render a proper response in JSON format might be wrong package name that you use. It is easy to overlook. Import are on top of a file, you look at your code and everything seems to be fine. Except response is still not in JSON format.

Consider this simple controller:

class RestJsonCatchController {
def grailsJson() {
render([first: 'foo', second: 5] as grails.converters.JSON)
}

def netSfJson() {
render([first: 'foo', second: 5] as net.sf.json.JSON)
}
}

And now, with finger crossed... We have a winner!

$ curl localhost:8080/example/restJsonCatch/grailsJson
{"first":"foo","second":5}
$ curl localhost:8080/example/restJsonCatch/netSfJson
{first=foo, second=5}

As you can see only grails.converters.JSON converts your response to JSON format. There is no such converter for net.sf.json.JSON, so Grails has no converter to apply and it renders Map normally.

Conclusion: always carefully look at your imports if you're working with JSON in Grails!

Edit: Burt suggested that this is a bug. I've submitted JIRA issue here: GRAILS-9622 render as class that is not a codec should throw exception