tags:

views:

21

answers:

1

Hi,

We have a requirement where a Grails application is required to connect to an external SQL Server 2005 (i.e. client's database server via a linked server). Our grails application will have its own SQL Server database instance for user authentication (so will mostly have only one domain class) and then it needs to connect to the external SQL Server database to fetch (only SELECT permission provided) data from 10 or 15 tables (out of 250 tables available) and show it the grails application.

I would like to know would be the best approach to take in this scenario.

Thank You. Jay Chandran.

A: 

You can use the http://grails.org/plugin/datasources plugin and configure the external server as a read-only datasource to ensure that only reads are performed. If you don't want to map domain classes on that server you can use groovy.sql.Sql to execute SQL queries.

Burt Beckwith
Thanks. I will give it a try.
Jay Chandran