SamehMohamedEl-Sayed / elmah

Automatically exported from code.google.com/p/elmah
Apache License 2.0
0 stars 0 forks source link

Add schema & stored procedure prefix for SQL Server configuration #123

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
> What new or enhanced feature are you proposing?

http://stevenmaglio.blogspot.com/2009/06/adding-schema-sproc-prefix-t...

The reasoning behind the change is somewhat buried in that post. Also,
this addition might not be right for the project trunk, because it
might be too focused on making things easier within our environment.

> What goal would this enhancement help you achieve?

Better integration and flexibility with SQL Server 2008.

HTH

Original issue reported on code.google.com by smagli...@gmail.com on 24 Jun 2009 at 5:57

Attachments:

GoogleCodeExporter commented 9 years ago
The blog post link seems incomplete. Corrected is:
http://stevenmaglio.blogspot.com/2009/06/adding-schema-sproc-prefix-to-elmah.htm
l

Original comment by azizatif on 25 Jun 2009 at 9:09

GoogleCodeExporter commented 9 years ago

Original comment by azizatif on 25 Jun 2009 at 9:09

GoogleCodeExporter commented 9 years ago
> Better integration and flexibility with SQL Server 2008.

Could you elaborate on how it provides better integration and flexibility? It 
seems
to be contradicting the bit, "might be too focused on making things easier 
within our
environment". It would help to evaluate whether this issue is too specific or 
general
enough for a wider audience.

Original comment by azizatif on 25 Jun 2009 at 9:31

GoogleCodeExporter commented 9 years ago
I guess I was kinda using "buzzwords" in that posting. But, I think I was using 
the
word 'integration' to mean support for schemas. After looking through the code a
little more, it seemed that you could overcome the 'dbo' problem by using 
schemas and
roles in the sql database to force the sql user account to first search for the
stored procedure in a particular schema. Which might make this patch 
superfluous.

And by 'flexible' I was writing about the sproc prefix addition. That way you 
can
have multiple ELMAH tables under the same schema by using different prefixes 
for the
sprocs.

Both of these changes have to do with the environment we have at work. A year 
or so
back a decision was made (not my decision) to start consolidating database's by
creating a few large database's with many schema's (kind of like the way Oracle 
does
it). One of the databases is setup in such a way that each department has their 
own
schema. But, all the websites in that department have to share the schema. So, I
needed a way to specify which schema to use and give a unique prefix for the
website's sprocs/table.

I tried to make the patch backwards compatible. If the 'schema' and 
'sprocPrefix'
attributes are not used in the configuration file, then the stored procedure 
which is
executed should have the name [dbo].[ELMAH_*]. Hmmm ... now that I think about 
it;
that might not be backwards compatible.

Here's an updated patch which will ensure that if the 'schema' and 
'sprocPrefix' are
not provided then the stored procedure name will be [ELMAH_*].

Original comment by smagli...@gmail.com on 25 Jun 2009 at 5:49

Attachments:

GoogleCodeExporter commented 9 years ago
How to use this patch file?

Original comment by nid...@live.com on 7 Feb 2013 at 11:37

GoogleCodeExporter commented 9 years ago
It might be best to ignore the patch. I wrote that before fully
understanding how ELMAH is intended to be used. It's setup that you only
need to setup one database with the standard tables/sprocs. You can have as
many websites as you want writing to it and ELMAH can keep them all
separated by application (and maybe server too).

So, access through each applications elmah.axd will provide filtered
information only for that application.

HTH

Original comment by smagli...@gmail.com on 8 Feb 2013 at 12:50