Re: [Arsperl-users] How to Connect to ARS Remedy Database
Brought to you by:
jeffmurphy
|
From: Andrew H. <an...@hi...> - 2005-03-17 21:22:16
|
Joseph:
I meant in that documentation that, under certain circumstances, one
should consider querying the underlying remedy database rather than
querying the remedy daemon. In situations where frequent or large
queries are required, this is almost certainly preferable. The reason
is that by directly querying the database, one does not utilize the
remedy daemons. On a busy system with many users, in a situation where
you need to do frequent or large queries, this is quite important.
In any case you can query remedy's database directly, though exactly
how is dependent on the type of database your are running. Under Sybase
and Oracle (the only two remedy databases with which I have experience
so far), there is an ARAdmin user and tablespace, under which views are
set up for each schema on the server. One can query these views
approximately like one would query the remedy schema itself (i.e. one
database record == one remedy ticket, SQL on the other hand is quite
different than QBE).
In the Remedy::ARSTools documentation I shamelessly recommended my own
DBI extension module DBIx::YAWM. Feel free to use it if you like. Most
of the goodness that was DBIx::YAWM (returning a record list as an
array of hash references) has long since been rolled into DBI proper
(and done much better, BTW).
Please keep in mind that my module, Remedy::ARSTools is merely a
wrapper for ARSperl, that provides a few convenience functions, and
field definition caching (a bit of a speed boost on frequent queries).
It's not been tested with any version > 1.74 of ARSperl, which (I
believe) is incompatible with certain later versions of ARS (i.e. 6.*).
So ... use at your own risk, and consider learning ARSperl before you
mess around too much with my module ... it'll probably just be
confusing, as it's not terribly well documented or tested on any
machines except for my own.
cheers,
-Andrew ;-)
On Mar 17, 2005, at 12:50 PM, Lamb Joseph wrote:
> Hello,
>
> How do I connect to a Remedy database and query the
> information in a form?
>
> In the Remedy::Arstools I found the following
> statement:
> You should get a read-only database account with
> select access on the aradmin views, and use something
> like DBIx::YAWM to query the database directly.
>
> Does even one have an example using DBIx::YAWM or some
> other common method?
>
>
>
> The following did not work:
> use strict;
> use DBI;
>
>
> my $dbh = DBI->connect('dbi:ODBC:Remedy',
> 'user','pass' ) or die "Cannot connect\n";
> my $statement = "SELECT
> Assigned_To_Group_
> FROM
> HelpDesk
> WHERE
> Assigned_To_Group_ LIKE 'NFS%'";
>
> my $sth = $dbh->prepare($statement) or die "Cannot
> prepare\n";
>
>
>
>
> Joseph Lamb
>
> __________________________________________________
> Do You Yahoo!?
> Tired of spam? Yahoo! Mail has the best spam protection around
> http://mail.yahoo.com
>
>
>
> -------------------------------------------------------
> SF email is sponsored by - The IT Product Guide
> Read honest & candid reviews on hundreds of IT Products from real
> users.
> Discover which products truly live up to the hype. Start reading now.
> http://ads.osdn.com/?ad_id=6595&alloc_id=14396&op=click
> _______________________________________________
> Arsperl-users mailing list
> Ars...@ar...
> https://lists.sourceforge.net/lists/listinfo/arsperl-users
>
>
###################################################
## Andrew N. Hicox
## Hicox Information Systems Development
## [voice]: 703-367-9085
## [email]: an...@hi...
## [web]: http://hicox.com
##
## Rome built daily.
###################################################
|