Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
atifaziz opened this issue Aug 25, 2015 · 6 comments
Open

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

atifaziz opened this issue Aug 25, 2015 · 6 comments

Comments

@atifaziz
Copy link
Member

Originally reported on Google Code with ID 123

> 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

Reported by smaglio81 on 2009-06-24 17:57:23


- _Attachment: [ELMAH_SqlErrorLog_Schema_SprocPrefix.patch](https://storage.googleapis.com/google-code-attachments/elmah/issue-123/comment-0/ELMAH_SqlErrorLog_Schema_SprocPrefix.patch)_
@atifaziz
Copy link
Member Author

The blog post link seems incomplete. Corrected is:
http://stevenmaglio.blogspot.com/2009/06/adding-schema-sproc-prefix-to-elmah.html

Reported by azizatif on 2009-06-25 09:09:24

@atifaziz
Copy link
Member Author

Reported by azizatif on 2009-06-25 09:09:38

  • Labels added: Component-Persistence

@atifaziz
Copy link
Member Author

> 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.

Reported by azizatif on 2009-06-25 09:31:28

@atifaziz
Copy link
Member Author

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_*].

Reported by smaglio81 on 2009-06-25 17:49:57


- _Attachment: [ELMAH_SqlErrorLog_Schema_SprocPrefix-2.patch](https://storage.googleapis.com/google-code-attachments/elmah/issue-123/comment-4/ELMAH_SqlErrorLog_Schema_SprocPrefix-2.patch)_

@atifaziz
Copy link
Member Author

How to use this patch file?

Reported by [email protected] on 2013-02-07 11:37:04

@atifaziz
Copy link
Member Author

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

Reported by smaglio81 on 2013-02-08 00:50:42

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant