I think of direct query as digressing to a two-tiered architecture; you have
all this embedded SQL in all these reports... so if a schema change has to
be made (rename an attribute, snowflake a dimension, etc...) then you just
don't know what reports it is going to break. Also you have to open up a lot
of your database for query especially if you want to take advantage of
caching and snapshots since they have to use stored credentials and you are
not securing data per user like you might with Windows security (but Windows
security is not ideal in many situations). Finally, things can get a little
tricky with dynamic query and situational result-sets if you have to handle
it all in a direct query.
But if you are using stored procedures you essentially have a middle tier to
your reporting applications, where someone that is not a Reporting Services
specialist can contribute (write stored procs) or troubleshoot, and schema
changes can be made while the stored procs are updated to still pass through
the same dataset with the same column name. Also you can only grant execute
rights to report stored procedures for the credentials you are storing for
cached and snapshot reports. And finally, you can just handle a lot more in
a stored proc, I like having the flexibility to load everything into a table
variable or similar.
If you do use stored procs, I recommend standardized naming of all report
procs so they sort together separate from other procs ("csp_rpt_xxxxx").
--
Douglas McDowell douglas@nospam.solidqualitylearning.com
[quoted text, click to view] "RayAll" <RayAll@microsft.com> wrote in message
news:uSrmc%23pJFHA.3356@TK2MSFTNGP12.phx.gbl...
>I just wondered What's the disadvantegs of using direct queries for my
>datasets in comparison with sotred procedures?
>
> Thanks
> Ray
>