Roles Schemas and 2000

  • Hi Im trying to understand a Database design for a 3rd party app.

    So apart from creating non-clusterd unique indexes on all there primary keys.. which from what i gather is pretty wierd...

    Let me start by saying the new documentation i got from them yesterday asks to run the database in 2000 compatibility mode, and im code ive seen has dates of 2000/2001 on them so im guessing it was orginally built on sql server 2000

    My questions are.. If you have a role that has insert, update, delete select and references (Not sure youd need that one) on all tables and execute on all stored procedures

    Why would they then say that all users need to be db_owner. Surely this is counter productive as db_owner can do all of those things and drop any table view sp they like..

    Were things different in SQL 2000?

    They also have a schema named the same as each role. But if i do a select * from sys.objects everything is going to dbo and sys

    Is there another/better way to see what the schemas do? Or again is there something related to SQL 2000?

    Thanks for any advice..

  • n00bDBA (10/9/2012)


    So apart from creating non-clusterd unique indexes on all there primary keys.. which from what i gather is pretty wierd...

    No, clustering all your PKs is actually what's usually weird if you like performance... 🙂

    My questions are.. If you have a role that has insert, update, delete select and references (Not sure youd need that one) on all tables and execute on all stored procedures

    Why would they then say that all users need to be db_owner. Surely this is counter productive as db_owner can do all of those things and drop any table view sp they like..

    Were things different in SQL 2000?

    Not overly. Do they allow schema customization from the front end? It sounds like they setup some kind of tables to be customizable from the interface.

    Is there another/better way to see what the schemas do? Or again is there something related to SQL 2000?

    Not really. 2k schemas were more organizational (other than table redirection) than anything else. They also created by default and it sounds like they should have simply been removed. Most of the security and stuff didn't really come into play/get used until 2k5.

    It sounds like it's an antique built by medium level folks and you're just stuck with an unupdated version as they learned more. *shrugs* Not utterly uncommon.


    - Craig Farrell

    Never stop learning, even if it hurts. Ego bruises are practically mandatory as you learn unless you've never risked enough to make a mistake.

    For better assistance in answering your questions[/url] | Forum Netiquette
    For index/tuning help, follow these directions.[/url] |Tally Tables[/url]

    Twitter: @AnyWayDBA

  • Hi Evil 😀

    So having no cluster Indexs on any tables and a few non-cluster is normal? i have a really small set of dbs to look at so just trying to learn from what i can look at?

    Schema customization from the front end (not sure what you mean)? the only thing i can think of like that (which is really not like it at all im sure) is that they don't use temp tables for anything and have normal tables instead (really not sure how normal that is..or would work with high lvls of users) I was thinking at best they started trying to build things around roles but something didn't work so went and added db_owner to make things work (we have to give local admin rights to all clients or the app doesn't work, but they cant explain why)

    I think your right though about the antique build im just trying to understand whats going on (learn from it) and if i clean it up for us.

    Thanks for the reply its greatly appreciated!

  • n00bDBA (10/9/2012)


    So having no cluster Indexs on any tables and a few non-cluster is normal? i have a really small set of dbs to look at so just trying to learn from what i can look at?

    Oooooooh, no clustered indexes at all? That's a whole different ballgame. No, that's not common, and is not really great design except in specific circumstances where a heap will give you better performance. Those are generally rather rare, particularly in SQL Server where most of its optimization relies on the clustered indexing.

    It sounds like it's a generic build that happens to currently reside on SQL Server. I've heard rumors of other particular systems handling heaps with nc indexes behaving much cleaner (like MySQL) but I can't speak to that directly.

    Schema customization from the front end (not sure what you mean)? the only thing i can think of like that (which is really not like it at all im sure) is that they don't use temp tables for anything and have normal tables instead (really not sure how normal that is..or would work with high lvls of users)

    Sorry, forgot how new you were, apologies for the short form of that comment. A number of vendors, in their attempts to make things as easy as possible for their users, will allow for customization from the front end. Usually there's a table in the database somewhere like "ProductCustom" that they'll create/alter columns for the front end.

    It's not great design but it does keep the users out of the database for customization.


    - Craig Farrell

    Never stop learning, even if it hurts. Ego bruises are practically mandatory as you learn unless you've never risked enough to make a mistake.

    For better assistance in answering your questions[/url] | Forum Netiquette
    For index/tuning help, follow these directions.[/url] |Tally Tables[/url]

    Twitter: @AnyWayDBA

  • Thanks Evil..

    makes sense!

Viewing 5 posts - 1 through 4 (of 4 total)

You must be logged in to reply to this topic. Login to reply