Log in
::
Register
::
Not logged in
Home
Tags
Articles
Editorials
Stairways
Forums
Scripts
Videos
Blogs
QotD
Books
Ask SSC
SQL Jobs
Training
Authors
About us
Contact us
Newsletters
Write for us
Recent Posts
Recent Posts
Popular Topics
Popular Topics
Home
Search
Members
Calendar
Who's On
Home
»
SQL Server 2005
»
Development
»
Create Table so that user is the owner
15 posts, Page 2 of 2
««
1
2
Create Table so that user is the owner
Rate Topic
Display Mode
Topic Options
Author
Message
RBarryYoung
RBarryYoung
Posted Thursday, November 27, 2008 11:03 AM
SSCrazy Eights
Group: General Forum Members
Last Login: Thursday, November 17, 2011 4:09 PM
Points: 9,359,
Visits: 8,864
J (11/27/2008)
Could you not just use a common table with an extra field like "OwnerID"to keep the data separate for each user and query with a
SELECT FROM dbo.CommonTable WHERE OwnerID =
...
What you are really talking about is "Row-level security", which as a way of securing what is called "multi-tenant" databases and applications. Multi-tenancy has some specific requirements including that all tenants have the same schema/design, which is not stated or implied by the OP's post.
-- RBarryYoung
,
(302)375-0451
blog:
MovingSQL.com
, Twitter:
@RBarryYoung
Proactive
Performance Solutions, Inc.
"Performance is our middle name."
Post #609927
Grant Fritchey
Grant Fritchey
Posted Friday, November 28, 2008 6:28 AM
SSChampion
Group: General Forum Members
Last Login: Today @ 11:14 AM
Points: 11,884,
Visits: 22,833
Yikes! I'd say so. Upgrades to the data model must be entertaining.
----------------------------------------------------
"The credit belongs to the man who is actually in the arena, whose face is marred by dust and sweat and blood..." Theodore Roosevelt
The Scary DBA
Author of:
SQL Server 2008 Query Performance Tuning Distilled
and
SQL Server Execution Plans
Product Evangelist for
Red Gate Software
Post #610311
RBarryYoung
RBarryYoung
Posted Friday, November 28, 2008 7:20 AM
SSCrazy Eights
Group: General Forum Members
Last Login: Thursday, November 17, 2011 4:09 PM
Points: 9,359,
Visits: 8,864
it's not too bad, Grant. The presumption is that all tenants are using the same software and schema, just that every data row is tagged with a Tenant ID and every access has to be filtered based on it. the filtering can easily be made bulletproof through the use of a universal layer of Views, and (owner)Schema security that forces all access to the tables through those views. (Hmm, maybe I should write an article on this ...) :)
Anyway, (design)schema upgrades are only
slightly
more complicated than a single-tenant environment.
-- RBarryYoung
,
(302)375-0451
blog:
MovingSQL.com
, Twitter:
@RBarryYoung
Proactive
Performance Solutions, Inc.
"Performance is our middle name."
Post #610335
Grant Fritchey
Grant Fritchey
Posted Friday, November 28, 2008 2:31 PM
SSChampion
Group: General Forum Members
Last Login: Today @ 11:14 AM
Points: 11,884,
Visits: 22,833
rbarryyoung (11/28/2008)
it's not too bad, Grant. The presumption is that all tenants are using the same software and schema, just that every data row is tagged with a Tenant ID and every access has to be filtered based on it. the filtering can easily be made bulletproof through the use of a universal layer of Views, and (owner)Schema security that forces all access to the tables through those views. (Hmm, maybe I should write an article on this ...) :)
Anyway, (design)schema upgrades are only
slightly
more complicated than a single-tenant environment.
[tapping foot] Waiting.
----------------------------------------------------
"The credit belongs to the man who is actually in the arena, whose face is marred by dust and sweat and blood..." Theodore Roosevelt
The Scary DBA
Author of:
SQL Server 2008 Query Performance Tuning Distilled
and
SQL Server Execution Plans
Product Evangelist for
Red Gate Software
Post #610584
Jeff Moden
Jeff Moden
Posted Saturday, November 29, 2008 7:14 AM
One Orange Chip
Group: General Forum Members
Last Login: Today @ 11:09 AM
Points: 28,370,
Visits: 22,161
rbarryyoung (11/28/2008)
(Hmm, maybe I should write an article on this ...) :)
{insert Jeapordy theme song here} :)
--Jeff Moden
"
RBAR
is pronounced "ree-bar" and is a "Modenism" for "
R
ow-
B
y-
A
gonizing-
R
ow".
First step towards the paradigm shift of writing Set Based code:
Stop thinking about what you want to do to a row... think, instead, of what you want to do to a column."
For better, quicker answers on T-SQL questions, click on the following...
http://www.sqlservercentral.com/articles/Best+Practices/61537/
For better answers on performance questions, click on the following...
http://www.sqlservercentral.com/articles/SQLServerCentral/66909/
Post #610695
« Prev Topic
|
Next Topic »
15 posts, Page 2 of 2
««
1
2
Permissions
You
cannot
post new topics.
You
cannot
post topic replies.
You
cannot
post new polls.
You
cannot
post replies to polls.
You
cannot
edit your own topics.
You
cannot
delete your own topics.
You
cannot
edit other topics.
You
cannot
delete other topics.
You
cannot
edit your own posts.
You
cannot
edit other posts.
You
cannot
delete your own posts.
You
cannot
delete other posts.
You
cannot
post events.
You
cannot
edit your own events.
You
cannot
edit other events.
You
cannot
delete your own events.
You
cannot
delete other events.
You
cannot
send private messages.
You
cannot
send emails.
You
may
read topics.
You
cannot
rate topics.
You
cannot
vote within polls.
You
cannot
upload attachments.
You
may
download attachments.
You
cannot
post HTML code.
You
cannot
edit HTML code.
You
cannot
post IFCode.
You
cannot
post JavaScript.
You
cannot
post EmotIcons.
You
cannot
post or upload images.
Copyright © 2002-2012 Simple Talk Publishing. All Rights Reserved.
Privacy Policy.
Terms of Use.
Report Abuse.