Showing posts with label users. Show all posts
Showing posts with label users. Show all posts

Thursday, March 29, 2012

Advice on security model for XML Web Services for many users in Active Directory role

I am working on the security model for an application that will be used by 100s of users with a dedicated SQL 2005 database for this application and access via SQL XML Web Services.

The client has asked to make it "open" during alpha testing such that anyone can access the web services without having to set them up first. Is there a way to do this? The best I can figure is to use mixed mode security and hard code a login and password. Any method using Windows authentication would require that I add every user at a minimum to the database.

In production, all users will have an active directory role specified that determines if they should have access to the web services or not. However, it is my understanding that to use Windows authentication, I would still need to add each individual user at a minimum as a Login to the SQL Server, and under best practices also as database users with permissions granted to the endpoint.

Am I correct in the above, or is there a more efficient way to achieve these results?

Thanks

-L

Your post seems to have been moved to this forum, as I have not seen it before. Could you please let me know where you posted this originally?

If the individual users are all belonging to a Windows group, you could just grant connection permissions to that group. But I am not familiar with XML Web Services, so I cannot say whether this is the best course of action.

Have you checked the following link?

http://msdn2.microsoft.com/en-us/library/ms191274.aspx

I'd suggest to also post in the XML forum: SQL Server XML

Thanks
Laurentiu

sql

Tuesday, March 27, 2012

Advice on Database structure

I am thinking of doing a fake PC company site for my ASP project. sowhat they will have is a chat, products with reviews, and users canhave "Buddies".

So my DB so far (Tables):

ProductPC - ID, Processor, RAM, HDD, Graphics, LCD ...ProductHardware- ID, Title (Like "Intel C2D E6600"), Description, Price, Rating (0-5stars, so integer), Category (CPU, HDD, Graphics)ProductSoftware - ID, Title (eg. "Adobe CS3"), Description, Price, Rating, Category (eg. Design, Programming)Reviews - ID, ProductID, Title, Content, DateChat - ID, TopicID, Title, Content, DateUsers - ID, Username, Password,
The problem, how do i connect Reviews to the products since they are from diff tables.
How do i get the "buddy" system working
Chat i think its not as simple as that

But i just need a simple ASP project, so no need to get too complex, but i still hope to learn as much.

Concerning

ProductPC - ID, Processor, RAM, HDD, Graphics, LCD ...ProductHardware - ID, Title (Like "Intel C2D E6600"), Description, Price, Rating (0-5 stars, so integer), Category (CPU, HDD, Graphics)ProductSoftware - ID, Title (eg. "Adobe CS3"), Description, Price, Rating, Category (eg. Design, Programming)Reviews - ID, ProductID, Title, Content, Date
you have a problem since Review.ProductId can refere to 1 of 3 tables. To overcome this, I suggest you create a ProductTable thus:
Product - Id, Cost, Title, IsPC, IsHardware, IsSoftware
Change the Id column on ProductPc, ProductHardware and ProductSoftware tables to be non-identity. When a Product entry is created, one and only of the Is must be true. The appropriate record of ProductPc, ProductHardware or ProductSoftware can be created using the the New Product.Id and the Id value. This will allow your review table to work.|||

sorry... but what do u mean? taking off my IDs? then when i add to DB how should i add?

|||ProductPC - ID, Processor, RAM, HDD, Graphics, LCD ...ProductHardware - ID, Title (Like "Intel C2D E6600"), Description, Price, Rating (0-5 stars, so integer), Category (CPU, HDD, Graphics)ProductSoftware - ID, Title (eg. "Adobe CS3"), Description, Price, Rating, Category (eg. Design, Programming)Reviews - ID, ProductID, Title, Content, Date|||

Thanks. i am getting you. but the problem id how do i acheive the part of having the ID to be unique, do i need to code that? because now i have set those IDs to identity and auto increment. if they are not identity, then how do they be unique (automatically)? and to have product ID to be unique across 3 tables?

|||

The sequence for creating a new record is:

Create the new product reference

|||

mmm... Scope_Identity() is something unfamiliar to me right now i will search abt it later. for now i am going off to school.

|||

is it ok if i have 1 Reviews Table with the ProductID linking to 3 Tables? PC, Hardware & Software Table

So,

PK : Reviews.ProdID - FK: ProdPC.PCID
PK : Reviews.ProdID - FK: ProdHW.HWID
PK : Reviews.ProdID - FK: ProdSW.SWID

|||

No the link is:

PK : Reviews.ProdID - FK: Product.Id
PK : Reviews.ProdID - FK: Product.Id
PK : Reviews.ProdID - FK: Product.Id

This is because
PK: ProdPC.PCID - FK Product.Id
PK: ProdHW.HWI - FK Product.Id
PK: ProdSW.SWID- FK Product.Id

|||

i think u say that because u think i used Scope_Identity()? for now i dunno how to use that. so what i done is 1 Reviews Table linking to 3 Products Table (1 for PC, HW & SW) so Reviews.ProdID to ProdXX.ID. is that also ok?

|||

Here is a SQL2005 script with some of the tables and a stored procedure for inserting a record showing how to use Scope_Identity()
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
IF NOT EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[ProductSoftware]') AND type in (N'U'))
BEGIN
CREATE TABLE [dbo].[ProductSoftware](
[Id] [int] NOT NULL,
[Category] [nvarchar](50) NOT NULL,
[Description] [nvarchar](250) NOT NULL,
[Rating] [nvarchar](50) NOT NULL,
CONSTRAINT [PK_ProductSoftware] PRIMARY KEY CLUSTERED
([Id] ASC)WITH (IGNORE_DUP_KEY = OFF) ON [PRIMARY]) ON [PRIMARY]
END
GO
EXEC sys.sp_addextendedproperty @.name=N'MS_Description', @.value=N'Non-identity primary key from Product.Id' ,@.level0type=N'SCHEMA', @.level0name=N'dbo', @.level1type=N'TABLE', @.level1name=N'ProductSoftware', @.level2type=N'COLUMN', @.level2name=N'Id'
GO
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
IF NOT EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[Product]') AND type in (N'U'))
BEGIN
CREATE TABLE [dbo].[Product](
[Id] [int] IDENTITY(1,1) NOT NULL,
[Name] [nvarchar](250) NOT NULL,
[Price] [money] NOT NULL,
CONSTRAINT [PK_Product] PRIMARY KEY CLUSTERED
([Id] ASC)WITH (IGNORE_DUP_KEY = OFF) ON [PRIMARY]) ON [PRIMARY]
END
GO
EXEC sys.sp_addextendedproperty @.name=N'MS_Description', @.value=N'a.k.a. Title' ,@.level0type=N'SCHEMA', @.level0name=N'dbo', @.level1type=N'TABLE', @.level1name=N'Product', @.level2type=N'COLUMN', @.level2name=N'Name'
GO
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
IF NOT EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[ProductHardware]') AND type in (N'U'))
BEGIN
CREATE TABLE [dbo].[ProductHardware](
[Id] [int] NOT NULL,
[Description] [varchar](max) NOT NULL,
CONSTRAINT [PK_ProductHardware] PRIMARY KEY CLUSTERED
([Id] ASC)WITH (IGNORE_DUP_KEY = OFF) ON [PRIMARY]) ON [PRIMARY]
END
GO
EXEC sys.sp_addextendedproperty @.name=N'MS_Description', @.value=N'Non-identity product key from Product.Id' ,@.level0type=N'SCHEMA', @.level0name=N'dbo', @.level1type=N'TABLE', @.level1name=N'ProductHardware', @.level2type=N'COLUMN', @.level2name=N'Id'
GO
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
IF NOT EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[ProductPc]') AND type in (N'U'))
BEGIN
CREATE TABLE [dbo].[ProductPc](
[Id] [int] NOT NULL,
[Graphics] [nvarchar](50) NOT NULL,
[HDD] [nvarchar](50) NOT NULL,
[LCD] [nvarchar](50) NOT NULL,
[Processor] [nvarchar](50) NOT NULL,
[RAM] [nvarchar](50) NOT NULL,
CONSTRAINT [PK_ProductPc] PRIMARY KEY CLUSTERED
([Id] ASC)WITH (IGNORE_DUP_KEY = OFF) ON [PRIMARY]) ON [PRIMARY]
END
GO
EXEC sys.sp_addextendedproperty @.name=N'MS_Description', @.value=N'Non-identity primary key from Product.Id' ,@.level0type=N'SCHEMA', @.level0name=N'dbo', @.level1type=N'TABLE', @.level1name=N'ProductPc', @.level2type=N'COLUMN', @.level2name=N'Id'
GO
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
IF NOT EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[Review]') AND type in (N'U'))
BEGIN
CREATE TABLE [dbo].[Review](
[Id] [int] NOT NULL,
[ProductId] [int] NOT NULL,
[ContentText] [nvarchar](max) NULL,
[Title] [nvarchar](50) NOT NULL,
[DateAdded] [datetime] NOT NULL CONSTRAINT [DF_Review_DateAdded] DEFAULT (getdate()),
CONSTRAINT [PK_Review] PRIMARY KEY CLUSTERED
([Id] ASC) WITH (IGNORE_DUP_KEY = OFF) ON [PRIMARY]) ON [PRIMARY]
END
GO
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
IF NOT EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[usp_ProductHardware_Insert]')
AND type in (N'P', N'PC'))
BEGIN
EXEC dbo.sp_executesql @.statement = N'CREATE PROCEDURE [dbo].[usp_ProductHardware_Insert]
(
@.Description varchar (MAX),
@.Name nvarchar (250),
@.Price money,
@.RETURN INT OUTPUT,
@.IDENTITY INT OUTPUT
) AS
-- Purpose:
-- Insert record into Product and ProductHardware table
-- History:
-- 11Jun2007 CVC Original coding
SET NOCOUNT ON
INSERT INTO Product(Name, Price) VALUES (@.Name, @.Price)
SELECT @.IDENTITY = SCOPE_IDENTITY()
INSERT INTO ProductHardware(Id, Description)
VALUES ( @.IDENTITY, @.Description)
SELECT @.RETURN = @.@.error
RETURN
----- this is the end ------
'
END|||

i think i will need more knowledge about Stored Procedures and Scope Identity. any tutorials about that?

|||

There are some good stored procedure tutorials at

http://www.codeproject.com/database/hkstoredproc.asp (Everything you wanted to know about Stored Procedures)

Sunday, March 25, 2012

Advice about database deployment

Hello All,
I am writing a database application that will serve multiple companies,
each company contains users that will store/retrieve data from the database.
I am in the process of deciding whether I should have one big database
that stores data for all users of all companies or have a separate
database for each company.
What would be the advantage/disadvantage of selecting one over the other
with the following considerations?
Considerations:
1. failover support
2. performance
3. load balancing via adding multiple database servers
4. clustering
5. backup (full and incremental)
6. database upgrade (eg. adding more tables and relationships, modifying
tables and relationships)
7. special equipment considerations
Any advised would be greatly appreciated.
Thanks in advanced
Hi
Both methods have their advantages and disadvantages so you will have to
weigh up the pros and cons to make a discission. Having a single database may
be ruled out because of security reasons (in fact having databases on the
same instance may be ruled out!) , but it will ease the management and
upgrades. Having single databases will allow you to tailor the databases to
specific requirements and (say) adjust intensive tasks so they don't overload
the system e.g. spread out the backups and other maintenance tasks. Having
separate databases would potentially limit the scope of any mistake (e.g. if
someone managed to take an exclusive lock on a table the impact would be
within a single company not other possibly unrelated companies who could sue
you!).
Hardware clustering should not be affected by either configuration, although
if you are using SQL 2005 and database mirroring you could fail over one
different databases separately and mix the primary instances in similar way
to having multiple instance on a clustered server.
HTH
John
"buzlite@.sympatico.ca" wrote:

> Hello All,
> I am writing a database application that will serve multiple companies,
> each company contains users that will store/retrieve data from the database.
> I am in the process of deciding whether I should have one big database
> that stores data for all users of all companies or have a separate
> database for each company.
> What would be the advantage/disadvantage of selecting one over the other
> with the following considerations?
> Considerations:
> --
> 1. failover support
> 2. performance
> 3. load balancing via adding multiple database servers
> 4. clustering
> 5. backup (full and incremental)
> 6. database upgrade (eg. adding more tables and relationships, modifying
> tables and relationships)
> 7. special equipment considerations
> Any advised would be greatly appreciated.
> Thanks in advanced
>
|||Hi
In addition to John's reply ,I'd ask you ,how big will be databases? Have
you considered to install SQL Server 2005 Express Edition on the company's
site?
It depends on your business requirement , thus there is no common scenario
<buzlite@.sympatico.ca> wrote in message
news:%23Atf%236kCHHA.3916@.TK2MSFTNGP06.phx.gbl...
> Hello All,
> I am writing a database application that will serve multiple companies,
> each company contains users that will store/retrieve data from the
> database.
> I am in the process of deciding whether I should have one big database
> that stores data for all users of all companies or have a separate
> database for each company.
> What would be the advantage/disadvantage of selecting one over the other
> with the following considerations?
> Considerations:
> --
> 1. failover support
> 2. performance
> 3. load balancing via adding multiple database servers
> 4. clustering
> 5. backup (full and incremental)
> 6. database upgrade (eg. adding more tables and relationships, modifying
> tables and relationships)
> 7. special equipment considerations
> Any advised would be greatly appreciated.
> Thanks in advanced
|||On Fri, 17 Nov 2006 08:46:13 -0500, "buzlite@.sympatico.ca"
<buzlite@.sympatico.ca> wrote:

>Hello All,
>I am writing a database application that will serve multiple companies,
>each company contains users that will store/retrieve data from the database.
>I am in the process of deciding whether I should have one big database
>that stores data for all users of all companies or have a separate
>database for each company.
>What would be the advantage/disadvantage of selecting one over the other
>with the following considerations?
>Considerations:
>--
>1. failover support
>2. performance
>3. load balancing via adding multiple database servers
>4. clustering
>5. backup (full and incremental)
>6. database upgrade (eg. adding more tables and relationships, modifying
>tables and relationships)
>7. special equipment considerations
>Any advised would be greatly appreciated.
>Thanks in advanced
* Impact of company-X on the performance of company-Y's operations.
Given a choice like this, perhaps the answer is: both.
Write it for one database for better sharing, it's probably easier to
un-share later, than to add the sharing. Easier to do any
consolidations, when they're on one database, of course.
Then you can deploy it all on one system/instance or on N
systems/instances, if one of the big companies decides they want their
own servers after all.
J.
|||I would say that the data and amount of data from one company could be
pretty large. Given that images can be uploaded to the database in
addition to text.
Given a previous reply to this posting and the fact that large amounts
of data can be produce by any or all given companies, the performance
degradation related factor is indeed a point that needs to be considered.
Thanks
Uri Dimant wrote:
> Hi
> In addition to John's reply ,I'd ask you ,how big will be databases? Have
> you considered to install SQL Server 2005 Express Edition on the company's
> site?
> It depends on your business requirement , thus there is no common scenario
>
>
> <buzlite@.sympatico.ca> wrote in message
> news:%23Atf%236kCHHA.3916@.TK2MSFTNGP06.phx.gbl...
>
|||To Add to the original post, what would the impact of using one database
for all companies and one database instance for each company as it
relates to the following:
Full backups
Transaction log backups
Rebuilding indexes
Integrity Check
buzlite@.sympatico.ca wrote:
> Hello All,
> I am writing a database application that will serve multiple companies,
> each company contains users that will store/retrieve data from the
> database.
> I am in the process of deciding whether I should have one big database
> that stores data for all users of all companies or have a separate
> database for each company.
> What would be the advantage/disadvantage of selecting one over the other
> with the following considerations?
> Considerations:
> --
> 1. failover support
> 2. performance
> 3. load balancing via adding multiple database servers
> 4. clustering
> 5. backup (full and incremental)
> 6. database upgrade (eg. adding more tables and relationships, modifying
> tables and relationships)
> 7. special equipment considerations
> Any advised would be greatly appreciated.
> Thanks in advanced

Advice about database deployment

Hello All,
I am writing a database application that will serve multiple companies,
each company contains users that will store/retrieve data from the database.
I am in the process of deciding whether I should have one big database
that stores data for all users of all companies or have a separate
database for each company.
What would be the advantage/disadvantage of selecting one over the other
with the following considerations?
Considerations:
--
1. failover support
2. performance
3. load balancing via adding multiple database servers
4. clustering
5. backup (full and incremental)
6. database upgrade (eg. adding more tables and relationships, modifying
tables and relationships)
7. special equipment considerations
Any advised would be greatly appreciated.
Thanks in advancedHi
Both methods have their advantages and disadvantages so you will have to
weigh up the pros and cons to make a discission. Having a single database ma
y
be ruled out because of security reasons (in fact having databases on the
same instance may be ruled out!) , but it will ease the management and
upgrades. Having single databases will allow you to tailor the databases to
specific requirements and (say) adjust intensive tasks so they don't overloa
d
the system e.g. spread out the backups and other maintenance tasks. Having
separate databases would potentially limit the scope of any mistake (e.g. if
someone managed to take an exclusive lock on a table the impact would be
within a single company not other possibly unrelated companies who could sue
you!).
Hardware clustering should not be affected by either configuration, although
if you are using SQL 2005 and database mirroring you could fail over one
different databases separately and mix the primary instances in similar way
to having multiple instance on a clustered server.
HTH
John
"buzlite@.sympatico.ca" wrote:

> Hello All,
> I am writing a database application that will serve multiple companies,
> each company contains users that will store/retrieve data from the databas
e.
> I am in the process of deciding whether I should have one big database
> that stores data for all users of all companies or have a separate
> database for each company.
> What would be the advantage/disadvantage of selecting one over the other
> with the following considerations?
> Considerations:
> --
> 1. failover support
> 2. performance
> 3. load balancing via adding multiple database servers
> 4. clustering
> 5. backup (full and incremental)
> 6. database upgrade (eg. adding more tables and relationships, modifying
> tables and relationships)
> 7. special equipment considerations
> Any advised would be greatly appreciated.
> Thanks in advanced
>|||Hi
In addition to John's reply ,I'd ask you ,how big will be databases? Have
you considered to install SQL Server 2005 Express Edition on the company's
site?
It depends on your business requirement , thus there is no common scenario
<buzlite@.sympatico.ca> wrote in message
news:%23Atf%236kCHHA.3916@.TK2MSFTNGP06.phx.gbl...
> Hello All,
> I am writing a database application that will serve multiple companies,
> each company contains users that will store/retrieve data from the
> database.
> I am in the process of deciding whether I should have one big database
> that stores data for all users of all companies or have a separate
> database for each company.
> What would be the advantage/disadvantage of selecting one over the other
> with the following considerations?
> Considerations:
> --
> 1. failover support
> 2. performance
> 3. load balancing via adding multiple database servers
> 4. clustering
> 5. backup (full and incremental)
> 6. database upgrade (eg. adding more tables and relationships, modifying
> tables and relationships)
> 7. special equipment considerations
> Any advised would be greatly appreciated.
> Thanks in advanced|||On Fri, 17 Nov 2006 08:46:13 -0500, "buzlite@.sympatico.ca"
<buzlite@.sympatico.ca> wrote:

>Hello All,
>I am writing a database application that will serve multiple companies,
>each company contains users that will store/retrieve data from the database
.
>I am in the process of deciding whether I should have one big database
>that stores data for all users of all companies or have a separate
>database for each company.
>What would be the advantage/disadvantage of selecting one over the other
>with the following considerations?
>Considerations:
>--
>1. failover support
>2. performance
>3. load balancing via adding multiple database servers
>4. clustering
>5. backup (full and incremental)
>6. database upgrade (eg. adding more tables and relationships, modifying
>tables and relationships)
>7. special equipment considerations
>Any advised would be greatly appreciated.
>Thanks in advanced
* Impact of company-X on the performance of company-Y's operations.
Given a choice like this, perhaps the answer is: both.
Write it for one database for better sharing, it's probably easier to
un-share later, than to add the sharing. Easier to do any
consolidations, when they're on one database, of course.
Then you can deploy it all on one system/instance or on N
systems/instances, if one of the big companies decides they want their
own servers after all.
J.|||I would say that the data and amount of data from one company could be
pretty large. Given that images can be uploaded to the database in
addition to text.
Given a previous reply to this posting and the fact that large amounts
of data can be produce by any or all given companies, the performance
degradation related factor is indeed a point that needs to be considered.
Thanks
Uri Dimant wrote:
> Hi
> In addition to John's reply ,I'd ask you ,how big will be databases? Have
> you considered to install SQL Server 2005 Express Edition on the company's
> site?
> It depends on your business requirement , thus there is no common scenari
o
>
>
> <buzlite@.sympatico.ca> wrote in message
> news:%23Atf%236kCHHA.3916@.TK2MSFTNGP06.phx.gbl...
>|||To Add to the original post, what would the impact of using one database
for all companies and one database instance for each company as it
relates to the following:
Full backups
Transaction log backups
Rebuilding indexes
Integrity Check
buzlite@.sympatico.ca wrote:
> Hello All,
> I am writing a database application that will serve multiple companies,
> each company contains users that will store/retrieve data from the
> database.
> I am in the process of deciding whether I should have one big database
> that stores data for all users of all companies or have a separate
> database for each company.
> What would be the advantage/disadvantage of selecting one over the other
> with the following considerations?
> Considerations:
> --
> 1. failover support
> 2. performance
> 3. load balancing via adding multiple database servers
> 4. clustering
> 5. backup (full and incremental)
> 6. database upgrade (eg. adding more tables and relationships, modifying
> tables and relationships)
> 7. special equipment considerations
> Any advised would be greatly appreciated.
> Thanks in advanced

Advice about database deployment

Hello All,
I am writing a database application that will serve multiple companies,
each company contains users that will store/retrieve data from the database.
I am in the process of deciding whether I should have one big database
that stores data for all users of all companies or have a separate
database for each company.
What would be the advantage/disadvantage of selecting one over the other
with the following considerations?
Considerations:
--
1. failover support
2. performance
3. load balancing via adding multiple database servers
4. clustering
5. backup (full and incremental)
6. database upgrade (eg. adding more tables and relationships, modifying
tables and relationships)
7. special equipment considerations
Any advised would be greatly appreciated.
Thanks in advancedHi
Both methods have their advantages and disadvantages so you will have to
weigh up the pros and cons to make a discission. Having a single database may
be ruled out because of security reasons (in fact having databases on the
same instance may be ruled out!) , but it will ease the management and
upgrades. Having single databases will allow you to tailor the databases to
specific requirements and (say) adjust intensive tasks so they don't overload
the system e.g. spread out the backups and other maintenance tasks. Having
separate databases would potentially limit the scope of any mistake (e.g. if
someone managed to take an exclusive lock on a table the impact would be
within a single company not other possibly unrelated companies who could sue
you!).
Hardware clustering should not be affected by either configuration, although
if you are using SQL 2005 and database mirroring you could fail over one
different databases separately and mix the primary instances in similar way
to having multiple instance on a clustered server.
HTH
John
"buzlite@.sympatico.ca" wrote:
> Hello All,
> I am writing a database application that will serve multiple companies,
> each company contains users that will store/retrieve data from the database.
> I am in the process of deciding whether I should have one big database
> that stores data for all users of all companies or have a separate
> database for each company.
> What would be the advantage/disadvantage of selecting one over the other
> with the following considerations?
> Considerations:
> --
> 1. failover support
> 2. performance
> 3. load balancing via adding multiple database servers
> 4. clustering
> 5. backup (full and incremental)
> 6. database upgrade (eg. adding more tables and relationships, modifying
> tables and relationships)
> 7. special equipment considerations
> Any advised would be greatly appreciated.
> Thanks in advanced
>|||Hi
In addition to John's reply ,I'd ask you ,how big will be databases? Have
you considered to install SQL Server 2005 Express Edition on the company's
site?
It depends on your business requirement , thus there is no common scenario
<buzlite@.sympatico.ca> wrote in message
news:%23Atf%236kCHHA.3916@.TK2MSFTNGP06.phx.gbl...
> Hello All,
> I am writing a database application that will serve multiple companies,
> each company contains users that will store/retrieve data from the
> database.
> I am in the process of deciding whether I should have one big database
> that stores data for all users of all companies or have a separate
> database for each company.
> What would be the advantage/disadvantage of selecting one over the other
> with the following considerations?
> Considerations:
> --
> 1. failover support
> 2. performance
> 3. load balancing via adding multiple database servers
> 4. clustering
> 5. backup (full and incremental)
> 6. database upgrade (eg. adding more tables and relationships, modifying
> tables and relationships)
> 7. special equipment considerations
> Any advised would be greatly appreciated.
> Thanks in advanced|||On Fri, 17 Nov 2006 08:46:13 -0500, "buzlite@.sympatico.ca"
<buzlite@.sympatico.ca> wrote:
>Hello All,
>I am writing a database application that will serve multiple companies,
>each company contains users that will store/retrieve data from the database.
>I am in the process of deciding whether I should have one big database
>that stores data for all users of all companies or have a separate
>database for each company.
>What would be the advantage/disadvantage of selecting one over the other
>with the following considerations?
>Considerations:
>--
>1. failover support
>2. performance
>3. load balancing via adding multiple database servers
>4. clustering
>5. backup (full and incremental)
>6. database upgrade (eg. adding more tables and relationships, modifying
>tables and relationships)
>7. special equipment considerations
>Any advised would be greatly appreciated.
>Thanks in advanced
* Impact of company-X on the performance of company-Y's operations.
Given a choice like this, perhaps the answer is: both.
Write it for one database for better sharing, it's probably easier to
un-share later, than to add the sharing. Easier to do any
consolidations, when they're on one database, of course.
Then you can deploy it all on one system/instance or on N
systems/instances, if one of the big companies decides they want their
own servers after all.
J.|||I would say that the data and amount of data from one company could be
pretty large. Given that images can be uploaded to the database in
addition to text.
Given a previous reply to this posting and the fact that large amounts
of data can be produce by any or all given companies, the performance
degradation related factor is indeed a point that needs to be considered.
Thanks
Uri Dimant wrote:
> Hi
> In addition to John's reply ,I'd ask you ,how big will be databases? Have
> you considered to install SQL Server 2005 Express Edition on the company's
> site?
> It depends on your business requirement , thus there is no common scenario
>
>
> <buzlite@.sympatico.ca> wrote in message
> news:%23Atf%236kCHHA.3916@.TK2MSFTNGP06.phx.gbl...
>> Hello All,
>> I am writing a database application that will serve multiple companies,
>> each company contains users that will store/retrieve data from the
>> database.
>> I am in the process of deciding whether I should have one big database
>> that stores data for all users of all companies or have a separate
>> database for each company.
>> What would be the advantage/disadvantage of selecting one over the other
>> with the following considerations?
>> Considerations:
>> --
>> 1. failover support
>> 2. performance
>> 3. load balancing via adding multiple database servers
>> 4. clustering
>> 5. backup (full and incremental)
>> 6. database upgrade (eg. adding more tables and relationships, modifying
>> tables and relationships)
>> 7. special equipment considerations
>> Any advised would be greatly appreciated.
>> Thanks in advanced
>|||To Add to the original post, what would the impact of using one database
for all companies and one database instance for each company as it
relates to the following:
Full backups
Transaction log backups
Rebuilding indexes
Integrity Check
buzlite@.sympatico.ca wrote:
> Hello All,
> I am writing a database application that will serve multiple companies,
> each company contains users that will store/retrieve data from the
> database.
> I am in the process of deciding whether I should have one big database
> that stores data for all users of all companies or have a separate
> database for each company.
> What would be the advantage/disadvantage of selecting one over the other
> with the following considerations?
> Considerations:
> --
> 1. failover support
> 2. performance
> 3. load balancing via adding multiple database servers
> 4. clustering
> 5. backup (full and incremental)
> 6. database upgrade (eg. adding more tables and relationships, modifying
> tables and relationships)
> 7. special equipment considerations
> Any advised would be greatly appreciated.
> Thanks in advanced

Sunday, March 11, 2012

advanced editor

I am used to DTS packages in sql server 2000 and now I want to use Integrated
services to create 'DTS' packages. Going to a .net users group meeting, I was
told to use the 'Advanced editor' since it would help me alot. However, I
can not find
the 'advanced editor' in sql server 2005. Thus can you tell me where the
'advanced editor'is and what are some good uses of the advanced editor?
Thanks!
Wendy Elizabeth (WendyElizabeth@.discussions.microsoft.com) writes:
> I am used to DTS packages in sql server 2000 and now I want to use
> Integrated services to create 'DTS' packages. Going to a .net users
> group meeting, I was told to use the 'Advanced editor' since it would
> help me alot. However, I can not find the 'advanced editor' in sql
> server 2005. Thus can you tell me where the 'advanced editor'is and what
> are some good uses of the advanced editor?
Are you looking in SQL Server Mangement Studio? You find precious little
support for Integration Services there. You should have a look at
Business Intelligence Development Studio (BIDS), which really is Visual
Studio under a custom name.
Erland Sommarskog, SQL Server MVP, esquel@.sommarskog.se
Books Online for SQL Server 2005 at
http://www.microsoft.com/technet/prodtechnol/sql/2005/downloads/books.mspx
Books Online for SQL Server 2000 at
http://www.microsoft.com/sql/prodinfo/previousversions/books.mspx
|||I did find it was in Business Intelligence part of Visual studio.net. But
once you are in BIS, where do you find the advanced editor?
Thanks!
Diane Stein
"Erland Sommarskog" wrote:

> Wendy Elizabeth (WendyElizabeth@.discussions.microsoft.com) writes:
> Are you looking in SQL Server Mangement Studio? You find precious little
> support for Integration Services there. You should have a look at
> Business Intelligence Development Studio (BIDS), which really is Visual
> Studio under a custom name.
>
> --
> Erland Sommarskog, SQL Server MVP, esquel@.sommarskog.se
> Books Online for SQL Server 2005 at
> http://www.microsoft.com/technet/prodtechnol/sql/2005/downloads/books.mspx
> Books Online for SQL Server 2000 at
> http://www.microsoft.com/sql/prodinfo/previousversions/books.mspx
>
|||Wendy Elizabeth (WendyElizabeth@.discussions.microsoft.com) writes:
> I did find it was in Business Intelligence part of Visual studio.net. But
> once you are in BIS, where do you find the advanced editor?
Now you asking me questions that goes over my head. :-) I don't use SSIS
much, or rather not at all. I just wanted to save you from looking in
SSMS. But isn't this "Advanced Editor" simply the Package Designer you
get when you create an Integration Services project?
Erland Sommarskog, SQL Server MVP, esquel@.sommarskog.se
Books Online for SQL Server 2005 at
http://www.microsoft.com/technet/prodtechnol/sql/2005/downloads/books.mspx
Books Online for SQL Server 2000 at
http://www.microsoft.com/sql/prodinfo/previousversions/books.mspx
|||The "Advanced Editor' most likely refers to a property dialog for SSIS
components that allows you to set any property available on that component
and configure a lot of settings beyond what's typically available on the
regular Properties dialog for the same component.
In general, to use new SSIS designer, you start BIDS application, and create
a new SSIS project (click New -> Project, and pick SSIS project from the
list). This will create a new SSIS package within a project and open it up.
From there you will see the package's design surface, where you can drop
control flow components from a toolbox window, connect them into a flow and
configure. If you right click on any component, you will see an 'Advanced
Editor' option. If you have more questions, there is a separate SSIS forum
where you will find more experts ready to answer those.
Regards,
Maciek Sarnowicz
"Erland Sommarskog" <esquel@.sommarskog.se> wrote in message
news:Xns99E4C3B06E16BYazorman@.127.0.0.1...
> Wendy Elizabeth (WendyElizabeth@.discussions.microsoft.com) writes:
> Now you asking me questions that goes over my head. :-) I don't use SSIS
> much, or rather not at all. I just wanted to save you from looking in
> SSMS. But isn't this "Advanced Editor" simply the Package Designer you
> get when you create an Integration Services project?
>
> --
> Erland Sommarskog, SQL Server MVP, esquel@.sommarskog.se
> Books Online for SQL Server 2005 at
> http://www.microsoft.com/technet/prodtechnol/sql/2005/downloads/books.mspx
> Books Online for SQL Server 2000 at
> http://www.microsoft.com/sql/prodinfo/previousversions/books.mspx

Friday, February 24, 2012

ADO write not commiting to database

This seems about the best place for my query however it does cross over a bit ... dont shoot me.

SQL 2000 sp4 on server 2003

dev env VB6

users XP Sp2

Mdac 2.8

I have a legacy app that required some simple ammendment, insert a single row of data into a simple table (Not rocket Science) Sample : insert into maintcon_mach (maintcon_id, mach_id, date) values (123, 456, getdate())

PK on maintcon_id, mach_id so that single relationship exists between maintcon_id and mach_id in the table.

The procedure above is followed by a verification procedure that checks to see if table maintcon_mach has a mach_id 456 against maintcon_id 123, this procedure returns true. So far so good, however if you step through the procedure till disconnecting from the database and then reconnect and do only the verification again, the data is missing.

The following steps to resolve have resulted in no improvement.

1. Verify MDAC in entire project and on users computers all 2.8

2 Remove transactions (just in case) and still the same.

3 Replace SQL insert with ADO (As below) and still the same.. tried this with and without transactions.

4 Tried referecing older MDACs

5 Installed SQLredist on sample machines and still the same.

rs.Open "maintcon_mach", conMach, adOpenForwardOnly, adLockOptimistic
With rs
.AddNew
!maintcon_id = lngmaint
!mach_id = lngMachID
!Date = Format(Now(), "yyyy-mm-dd")
.Update
End With

Is the problem in SQL or MDAC?

Perhaps I've missed something (Obviously have) but have run out of places to look... Any idea's

In advance ...thanx

I have thought that perhaps there may be pending uncommitted transaction on the table, a server stop and restart was done and the results are still the same.?

Still confused...

|||Put the insert into a stored proc and OK?

Sunday, February 19, 2012

ADO Integrated Security Pass Through

I am working on making my application inherit the workstation login user
information so that users aren't presented with multiple logins.
Is it safe enough to use Integrated Security via the connection string. If
that succeeds, read the windows user name and check that against an internal
username?
Does anyone have any experience linking internal application user management
(ie: USERS table) with windows authentication?
Any comments or suggestions would be great.First key point: By using Windows authentication, you do NOT have to have a
USERS table. In SQL Server, you assign all permissions to the Windows login
or the Windows network group. (It makes life so much easier for the DBA.)
Windows Integrated Security (for SQL 2000) is far superior to SQL
authentication, and far better than trying to keep a USERS table up to date.
In SQL Server, use the SYSTEM_USER system function to retrieve the users
login name (in the form of [domain\username].)
Example:
SELECT SYSTEM_USER
--
Arnie Rowland, Ph.D.
Westwood Consulting, Inc
Most good judgment comes from experience.
Most experience comes from bad judgment.
- Anonymous
"Isaac Alexander" <isaacNOSPAM@.goNOSPAMprocura.com> wrote in message
news:uJVfx3ntGHA.2392@.TK2MSFTNGP05.phx.gbl...
>I am working on making my application inherit the workstation login user
>information so that users aren't presented with multiple logins.
> Is it safe enough to use Integrated Security via the connection string. If
> that succeeds, read the windows user name and check that against an
> internal username?
> Does anyone have any experience linking internal application user
> management (ie: USERS table) with windows authentication?
> Any comments or suggestions would be great.
>|||"Arnie Rowland" <arnie@.1568.com> wrote in message
news:%23Mmz2potGHA.324@.TK2MSFTNGP06.phx.gbl...
> First key point: By using Windows authentication, you do NOT have to have
> a USERS table. In SQL Server, you assign all permissions to the Windows
> login or the Windows network group. (It makes life so much easier for the
> DBA.)
> Windows Integrated Security (for SQL 2000) is far superior to SQL
> authentication, and far better than trying to keep a USERS table up to
> date.
> In SQL Server, use the SYSTEM_USER system function to retrieve the users
> login name (in the form of [domain\username].)
> Example:
> SELECT SYSTEM_USER
> --
Thanks Arnie. That call is very helpful.
However, I have access rights that a specific to my application such as menu
options, reports, specific actions, etc. The application was developed 8
years ago and supported multiple database platforms. We have moved to only
supporting MS SQL Server 7, 2000 and 2005.
What's the best way to link these together since DBAs wouldn't be able to
assign my application specific access rights via MS SQL Server Management
Studio/Enterprise Manager?

ADO Integrated Security Pass Through

I am working on making my application inherit the workstation login user
information so that users aren't presented with multiple logins.
Is it safe enough to use Integrated Security via the connection string. If
that succeeds, read the windows user name and check that against an internal
username?
Does anyone have any experience linking internal application user management
(ie: USERS table) with windows authentication?
Any comments or suggestions would be great.First key point: By using Windows authentication, you do NOT have to have a
USERS table. In SQL Server, you assign all permissions to the Windows login
or the Windows network group. (It makes life so much easier for the DBA.)
Windows Integrated Security (for SQL 2000) is far superior to SQL
authentication, and far better than trying to keep a USERS table up to date.
In SQL Server, use the SYSTEM_USER system function to retrieve the users
login name (in the form of [domain\username].)
Example:
SELECT SYSTEM_USER
Arnie Rowland, Ph.D.
Westwood Consulting, Inc
Most good judgment comes from experience.
Most experience comes from bad judgment.
- Anonymous
"Isaac Alexander" <isaacNOSPAM@.goNOSPAMprocura.com> wrote in message
news:uJVfx3ntGHA.2392@.TK2MSFTNGP05.phx.gbl...
>I am working on making my application inherit the workstation login user
>information so that users aren't presented with multiple logins.
> Is it safe enough to use Integrated Security via the connection string. If
> that succeeds, read the windows user name and check that against an
> internal username?
> Does anyone have any experience linking internal application user
> management (ie: USERS table) with windows authentication?
> Any comments or suggestions would be great.
>|||"Arnie Rowland" <arnie@.1568.com> wrote in message
news:%23Mmz2potGHA.324@.TK2MSFTNGP06.phx.gbl...
> First key point: By using Windows authentication, you do NOT have to have
> a USERS table. In SQL Server, you assign all permissions to the Windows
> login or the Windows network group. (It makes life so much easier for the
> DBA.)
> Windows Integrated Security (for SQL 2000) is far superior to SQL
> authentication, and far better than trying to keep a USERS table up to
> date.
> In SQL Server, use the SYSTEM_USER system function to retrieve the users
> login name (in the form of [domain\username].)
> Example:
> SELECT SYSTEM_USER
> --
Thanks Arnie. That call is very helpful.
However, I have access rights that a specific to my application such as menu
options, reports, specific actions, etc. The application was developed 8
years ago and supported multiple database platforms. We have moved to only
supporting MS SQL Server 7, 2000 and 2005.
What's the best way to link these together since DBAs wouldn't be able to
assign my application specific access rights via MS SQL Server Management
Studio/Enterprise Manager?

Monday, February 13, 2012

ADO connection

In VB6 I use more Forms where users can Add, Edit, Delete Records from more tables.

WHICH IS THE BEST METHOD

1. To open a connection when user start the application and I close the connection when user leave the application.

In Login form (Public cn As ADODB.Connection)

SirConectare_SQL = "Provider=SQLOLEDB.1" & _
";Password='" & Pass & "'" & _
";Persist Security Info=False" & _
";User ID='" & UserName & "'" & _
";Initial Catalog='" & DataBaseName & "'" & _
";Data Source='" & ServerName & "'"

Set cn = New ADODB.Connection

With cn
.ConnectionString = SirConectare_SQL
.Open
End With

OR

2. To Open a connection in each Form and close the connection when Form is UnLoadetThe first case is not possible because

Set cn = New ADODB.Connection (this is in Form Login)
In other form it is necesary to set the connection again.|||The rule is that you only keep the connection open as long as needed - and no longer. What are your concerns ?|||How many clients will use this application ?|||5-8 users|||Will the security credentials be different for each user ? What is the purpose for the application and the multiple forms ? Are you thinking about opening 1 connection object that will be used for multiple recordset/command objects ?|||How I can open a connection when user start the application and kepp open until user leave the application ?

In module:
Public cn As ADODB.Connection

In first form when is load:
SirConectare_SQL = "Provider=SQLOLEDB.1" & _
";Password='" & Pass & "'" & _
";Persist Security Info=False" & _
";User ID='" & UserName & "'" & _
";Initial Catalog='" & DataBaseName & "'" & _
";Data Source='" & ServerName & "'"

Set cn = New ADODB.Connection

With cn
.ConnectionString = SirConectare_SQL
.Open
End With

If I want to use "cn" in other forms is not possible (is not open)|||Are you destroying/closing the connection before the 2nd form is loaded ?|||I don`t close the connection, but I close (Unload) the first form.
The connection is closed ?|||Where are you declaring - Public cn As ADODB.Connection ?|||This declaration is made on a Module

Public cn As ADODB.Connection

In the Startup Form (where user input UserName and Password)

Set cn = New ADODB.Connection

With cn
.ConnectionString = SirConectare_SQL
.Open
End With

If I want to use this connection on other forms I can't because is Closed.
I want to open the connection only one time(when application startup), and if it possible to use the connection in all form.|||Open the connection in a module or class when login in form successfull. Close it when application main form is closed.|||This Looks Like VB code If it is Do not forget to set the DBconnection ( and all all objects associated to it) = nothing

set cn = nothing

I personnally like to use 1 public DB connection instead of multiple connections per app.

Hope this helps.
LJ|||Hello Gurus out there!

I want to know what would be the best method in opening a connection to server:

1. a connection (declared globally) that is open once during Login and access thru all forms and be closed only when application is terminated
What is the advantage/disadvantage of this method in my SQL Server 2k resources or in any RDBMS?

2. a connection is opened only when needed but everytime i execute a query against the database i have to open also that connection and terminate when it is not used...What is the advantage/disadvantage of this method in my SQL Server 2k resources or in any RDBMS?

Secondly, how can we know the resources used by the users that are connected to my SQL SERVER in terms of memory usage and CPU?

Im using VB/FOxPro and I want to know the best practice in terms of opening a connection to the database coz Im expecting to have 20 or more users online simultanously and hook to my server as soon as we are finished with our system.

I hope you can light up our minds with these concerns.

Thanks,

Bernie|||Bernie - What driver are you using ?

Sunday, February 12, 2012

ADO - Resync datasets

I want my users to see each others committed changes immediately.
Is there a way automatically resync Client Datasets?
Can i make a trigger (or something similar) to send a signal to my application telling a record has been updated?

I'm using SQL Server 2000 and Borland Delphi 7 with ADO 2.7.Yes you can esely create a trigger that can send you an allert to your application.
I'm not working with Delphi for a long time but i think that it's possible.
Send more details in order to give you some usefull help.

Paulo

Originally posted by Olivier_Peter
I want my users to see each others committed changes immediately.
Is there a way automatically resync Client Datasets?
Can i make a trigger (or something similar) to send a signal to my application telling a record has been updated?

I'm using SQL Server 2000 and Borland Delphi 7 with ADO 2.7.|||My question is:
- how should the trigger look like in SQL Server.
- how do i catch it in delphi

I've done this before with interbase:

CREATE TRIGGER "T_ORDER_AI" FOR "T_ORDER"
ACTIVE AFTER INSERT POSITION 0
AS
BEGIN
POST_EVENT 'ORDER_UPDATE';
END

When IBEvents Triggers

procedure TFrmRestaurantMain.IBEventsEventAlert(Sender: TObject;
EventName: String; EventCount: Integer; var CancelAlerts: Boolean);
begin
if EventName = 'ORDER_UPDATE' then begin
...
end;
end;
end;

administrator

Do user need to be administrators to create Data Driven Subscriptions?
If i log into my machine as one of my users the create data driven
subscription button is not there, but if i log in as myself or
administrator(both in the admin group) I can see it. also noticed that
non-admin users cannot see the datasources even though the credentials are
stored on reportserver.
thanks
--
---
Yes, I searched first :)Ok, the user can see the create data driven subscription now, but when i am
on the step where i pick the data source non are available?|||ok i figured out all my problems
"Kmistic" wrote:
> Do user need to be administrators to create Data Driven Subscriptions?
> If i log into my machine as one of my users the create data driven
> subscription button is not there, but if i log in as myself or
> administrator(both in the admin group) I can see it. also noticed that
> non-admin users cannot see the datasources even though the credentials are
> stored on reportserver.
> thanks
> --
> ---
> Yes, I searched first :)

Administration

Hi All
In Oracle Administration we will be having the users with normal and administrative privileges.
These privileges will be maintained in pre or user defined roles. Dba grants These roles to the users.

My doubt is in Sqlserver how to maintain the security . Plz help me
I know that in sqlserver also we will be having users,roles and schemas. How to apply these things
Waiting for reply
Sri

Login Name

Login identifiers (Ids) are associated with users when they connect to Microsoft? SQL Server? 2000. Login IDs are the accounts that control access to the SQL Server system. A user cannot connect to SQL Server without first specifying a valid login ID. Members of the sysadmin fixed server role define login IDs.

Purpose : It is used to connect the SQL server.

sp_addlogin (sql server authentication)

sp_grantlogin (NT authentication)

User Name

A user identifier (ID) identifies a user within a database. All permissions and ownership of objects in the database are controlled by the user account. User accounts are specific to a database; the xyz user account in the sales database is different from the xyz user account in the inventory database, even though both accounts have the same ID. User IDs are defined by members of the db_owner fixed database role.

A login ID by itself does not give a user permissions to access objects in any databases. A login ID must be associated with a user ID in each database before anyone connecting with that login ID can access objects in the databases. If a login ID has not been explicitly associated with any user ID in a database, it is associated with the guest user ID. If a database has no guest user account, a login cannot access the database unless it has been associated with a valid user account.

When a user ID is defined, it is associated with a login ID. For example, a member of the db_owner role can associate the Microsoft? Windows? 2000 login NETDOMAIN\Joe with user ID abc in the sales database and user ID def in the employee database. The default is for the login ID and user ID to be the same.

Purpose : If specific login wants to access on specific database they should be added into the database.

sp_grantdbaccess

Schema Name

It is inside the database; specific to Table and View permission aginst to the User(not login). It will describe the permission(s) on the Table and View. In otherword it is inline permission statement while creating Tables and Views.

Purpose: You can grant permission while creating (or just before creating) the Table or View. Here there is no specific order where the grant statement should appear(ie, you can first give the permission before creating table or view).

CREATE SCHEMA AUTHORIZATION

So, the Top level is Login name, to connect the SQL Server, User Name is the access permission to the Database, Schema Names are inline access permissions while creating the database. Database objects are named using UserName.ObjectName. UserName and LoginName may not be identical. ie., you can change the UserName for any login name. By default the Username and LoginName are same. (ex. DBO is username of SA loginname)

|||Thank u for u r valuable reply
Baba