Updated SQL for MSSQLBlogProvider

Topics: Business Logic Layer
Oct 25, 2007 at 6:11 AM
I have updated the SQL for generating tables for the MSSQLBlogProvider. I have included a DatabaseRole with appropriate permissions for the application to execute to make managing user rights a bit easier for DB administrators.

How do I submit this to you, this forum doesn't have any support for attaching files (or should I just paste it into a post)?


- SledgY
Oct 26, 2007 at 6:35 AM
Attached below is a patch for MSSQLSetup1.2.0.0.sql.
Note the requirement for the ALTER permission on be_PingService and be_Settings this is due to the TRUNCATE TABLE SQL statement being used within the provider as a means of clearing a table. For security reasons I would advise this be replaced with DELETE * as these are not performance critical operations and only the DELETE permission would be required.

Attached file MSSQLSetup1.2.0.0.sql.patch below

0a1,4
> /****** Object: DatabaseRole [be_WebApplication] Script Date: 10/25/2007 15:54:27 ******/
> CREATE ROLE [be_WebApplication] AUTHORIZATION [dbo]
> GO
>
19a24,26
> GRANT SELECT,INSERT,UPDATE,DELETE ON [dbo].[be_Categories] TO [be_WebApplication]
> GO
>
47a55,57
> GRANT SELECT,INSERT,UPDATE,DELETE ON [dbo].[be_Pages] TO [be_WebApplication]
> GO
>
66a77,79
> GRANT SELECT,INSERT,UPDATE,ALTER,DELETE ON [dbo].[be_PingService] TO [be_WebApplication]
> GO
>
81a95,97
> GRANT SELECT,INSERT,UPDATE,DELETE ON [dbo].[be_PostCategory] TO [be_WebApplication]
> GO
>
108a125,127
> GRANT SELECT,INSERT,UPDATE,DELETE ON [dbo].[be_PostComment] TO [be_WebApplication]
> GO
>
128a148,150
> GRANT SELECT,INSERT,UPDATE,DELETE ON [dbo].[be_PostNotify] TO [be_WebApplication]
> GO
>
157a180,182
> GRANT SELECT,INSERT,UPDATE,DELETE ON [dbo].[be_Posts] TO [be_WebApplication]
> GO
>
177a203,205
> GRANT SELECT,INSERT,UPDATE,DELETE ON [dbo].[be_PostTag] TO [be_WebApplication]
> GO
>
195a224,226
>
> GRANT SELECT,INSERT,UPDATE,ALTER,DELETE ON [dbo].[be_Settings] TO [be_WebApplication]
> GO