You can also use xdmp:invoke (which invokes an XQuery module) or xdmp:spawn (which asynchronously spawns the evaluation of an xquery module on the task server). Both of them, like eval, take a database option (in the "xdmp:eval" namespace) which sets the context database.
-Danny -----Original Message----- From: general-boun...@developer.marklogic.com [mailto:general-boun...@developer.marklogic.com] On Behalf Of Geert Josten Sent: Friday, April 02, 2010 6:48 AM To: General Mark Logic Developer Discussion Subject: RE: [MarkLogic Dev General] changing database Hi Paul, Not sure what your intentions are, but you could create a second HTTP appserver, assign that to another database, but have in share the same modules. That way they have same functionality, but just run against different databases. It is a different story if you need to access two databases at the same time, for which xdmp:eval is pretty much the only option. Kind regards, Geert > drs. G.P.H. (Geert) Josten Consultant Daidalos BV Hoekeindsehof 1-4 2665 JZ Bleiswijk T +31 (0)10 850 1200 F +31 (0)10 850 1199 mailto:geert.jos...@daidalos.nl http://www.daidalos.nl/ KvK 27164984 P Please consider the environment before printing this mail. De informatie - verzonden in of met dit e-mailbericht - is afkomstig van Daidalos BV en is uitsluitend bestemd voor de geadresseerde. Indien u dit bericht onbedoeld hebt ontvangen, verzoeken wij u het te verwijderen. Aan dit bericht kunnen geen rechten worden ontleend. > From: general-boun...@developer.marklogic.com > [mailto:general-boun...@developer.marklogic.com] On Behalf Of Paul M > Sent: vrijdag 2 april 2010 15:41 > To: general@developer.marklogic.com > Subject: [MarkLogic Dev General] changing database > > Hi: > > I have an HTTP appserver APP on a port PPPP which points to a > database DOCS and modules from filesystem FS. > > I create xqy code that can now run against DOCS. However, I > want it to execute against a different database. Other than > xdmp:eval?, is there some other xdmp command to say, set > executing database? I scanned the 4.1 apis and nothing stood out. > I know with XCC I can specify a different database on the > connection string, but how when using HTTP? > > > > > _______________________________________________ General mailing list General@developer.marklogic.com http://xqzone.com/mailman/listinfo/general _______________________________________________ General mailing list General@developer.marklogic.com http://xqzone.com/mailman/listinfo/general