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

Sunday, March 25, 2012

Do I need to add users for window Authentication?

I am trying to wrap the Windows Authentication in my brain. If I use window
authentication, do I add user through enterprise manager under Security tab
and logins. I want my user on my asp.net to login and connect to sql server,
but I windows Authentication. I don't want to add every single user. I'm I
on the right track?
thanks
Nick
Nick wrote:
> I am trying to wrap the Windows Authentication in my brain. If I use
> window authentication, do I add user through enterprise manager under
> Security tab and logins. I want my user on my asp.net to login and
> connect to sql server, but I windows Authentication. I don't want
> to add every single user. I'm I on the right track?
> thanks
> Nick
You can add a Windows Group that contains all the users.
David Gugick
Quest Software
www.imceda.com
www.quest.com

Do I need to add users for window Authentication?

I am trying to wrap the Windows Authentication in my brain. If I use window
authentication, do I add user through enterprise manager under Security tab
and logins. I want my user on my asp.net to login and connect to sql server
,
but I windows Authentication. I don't want to add every single user. I'm
I
on the right track?
thanks
NickNick wrote:
> I am trying to wrap the Windows Authentication in my brain. If I use
> window authentication, do I add user through enterprise manager under
> Security tab and logins. I want my user on my asp.net to login and
> connect to sql server, but I windows Authentication. I don't want
> to add every single user. I'm I on the right track?
> thanks
> Nick
You can add a Windows Group that contains all the users.
David Gugick
Quest Software
www.imceda.com
www.quest.comsql

Do I need to add users for window Authentication?

I am trying to wrap the Windows Authentication in my brain. If I use window
authentication, do I add user through enterprise manager under Security tab
and logins. I want my user on my asp.net to login and connect to sql server,
but I windows Authentication. I don't want to add every single user. I'm I
on the right track?
thanks
NickNick wrote:
> I am trying to wrap the Windows Authentication in my brain. If I use
> window authentication, do I add user through enterprise manager under
> Security tab and logins. I want my user on my asp.net to login and
> connect to sql server, but I windows Authentication. I don't want
> to add every single user. I'm I on the right track?
> thanks
> Nick
You can add a Windows Group that contains all the users.
--
David Gugick
Quest Software
www.imceda.com
www.quest.com

Thursday, March 22, 2012

Do I need a cursor here

I have a web page where users can change information about themselves
and submitted to a database. The database holds these changes in the
table UserChanges. When the user completes the changes the database for
the website is updated and changes are reflected right away. The user
can then go in again and make further changes thus creating another
record in the UserChanges table. Once a day these changes are brought
down to our main database. I would like to bring down only the latest
record for each users instead of bring down all their records they
created that day. The problem is that one of the fields is a bit field
that indicates if the email address was changed or not. This could
cause problems if the user changed their email address on a previous
record they created but not on the last one.
Example
ID PersonID EmailAddress EmailChange Downloaded
1 200 test@.test.com False False
2 200 blank@.blank.com True False
3 200 blank@.blank.com False False
What I want to do is after the user submits the record
1.Check to see if they have any previous record that have not been
downloaded yet
2.If previous records exists check to see if any of the records email
change flag is set to True.
3.If it is, then update the email change flag to True in the last
record.
Is this possible to do with out using a cursor?A trigger should be able to do it:
create trigger tri_UserChanges on UserChanges after insert
as
if @.@.rowcount = 0
return
update u
set
EmailChange = 1
from
UserChanges u
join inserted i on i.ID = u.ID
where exists
(
select
*
from
UserChanges u2
where
u2.PersonID = i.PersonID
and u2.ID <> i.ID
and u2.EmailChange = 1
and u2.Doenloaded = 0
)
Tom
----
Thomas A. Moreau, BSc, PhD, MCSE, MCDBA
SQL Server MVP
Columnist, SQL Server Professional
Toronto, ON Canada
www.pinpub.com
"rocky20" <goldbond_8@.hotmail.com> wrote in message
news:1140289185.842651.4140@.o13g2000cwo.googlegroups.com...
I have a web page where users can change information about themselves
and submitted to a database. The database holds these changes in the
table UserChanges. When the user completes the changes the database for
the website is updated and changes are reflected right away. The user
can then go in again and make further changes thus creating another
record in the UserChanges table. Once a day these changes are brought
down to our main database. I would like to bring down only the latest
record for each users instead of bring down all their records they
created that day. The problem is that one of the fields is a bit field
that indicates if the email address was changed or not. This could
cause problems if the user changed their email address on a previous
record they created but not on the last one.
Example
ID PersonID EmailAddress EmailChange Downloaded
1 200 test@.test.com False False
2 200 blank@.blank.com True False
3 200 blank@.blank.com False False
What I want to do is after the user submits the record
1.Check to see if they have any previous record that have not been
downloaded yet
2.If previous records exists check to see if any of the records email
change flag is set to True.
3.If it is, then update the email change flag to True in the last
record.
Is this possible to do with out using a cursor?|||Just as a side note, you may want to reconsider your design. As you
can obviously see, a bit field doesn't really tell you much :) I'm
also assuming that "previous" has meaning to you, because a rows in a
table don't really have an order to them.
Here's a quick-and-dirty stab at it:
DECLARE @.s TABLE (ID int, PersonID int, EmailAddress varchar(20),
EmailChange bit, Downloaded bit)
INSERT INTO @.s
SELECT 1, 200, 'test@.test.com', 0, 0
UNION ALL
SELECT 2, 200, 'blank@.blank.com', 1, 0
UNION ALL
SELECT 3, 200, 'blank@.blank.com', 0, 0
UNION ALL
SELECT 4, 500, 'test@.test.com', 0, 0
UNION ALL
SELECT 5, 500, 'blank@.blank.com', 1, 0
UNION ALL
SELECT 6, 500, 'blank@.blank.com', 0, 1
SELECT *
FROM @.s
SELECT DISTINCT s.ID, s.PersonID, s.EmailAddress,
EmailChange = COALESCE(s2.EmailChange, s.EmailChange),
s.Downloaded
FROM @.s s LEFT JOIN @.s s2 ON s.PersonID = s2.PersonID
AND s.ID > s2.ID
AND s2.EmailChange = 1
AND s2.Downloaded = 0
WHERE s.ID IN (SELECT MAX(ID)
FROM @.s
WHERE Downloaded=0
GROUP BY PersonID)
HTH,
Stu|||rocky20 wrote:
> I have a web page where users can change information about themselves
> and submitted to a database. The database holds these changes in the
> table UserChanges. When the user completes the changes the database for
> the website is updated and changes are reflected right away. The user
> can then go in again and make further changes thus creating another
> record in the UserChanges table. Once a day these changes are brought
> down to our main database. I would like to bring down only the latest
> record for each users instead of bring down all their records they
> created that day. The problem is that one of the fields is a bit field
> that indicates if the email address was changed or not. This could
> cause problems if the user changed their email address on a previous
> record they created but not on the last one.
> Example
> ID PersonID EmailAddress EmailChange Downloaded
> 1 200 test@.test.com False False
> 2 200 blank@.blank.com True False
> 3 200 blank@.blank.com False False
>
> What I want to do is after the user submits the record
> 1.Check to see if they have any previous record that have not been
> downloaded yet
> 2.If previous records exists check to see if any of the records email
> change flag is set to True.
> 3.If it is, then update the email change flag to True in the last
> record.
> Is this possible to do with out using a cursor?
It doesn't seem like you'll need a cursor to do this. I'm not clear
about a few things though. Firstly what is/are the keys in this table?
Secondly how do we know which row is the latest? Don't use an IDENTITY
column to track the latest row. Add a DATETIME column to do that.
Finally, what's the point of the EmailChange column? It looks redundant
to me, given that you preserve the history of the email values anyway.
I think you should drop EmailChange.
Assuming you have a column to indicate the date and time of the change
you can retrieve the latest version like this:
/* Get the new email address only where the
latest version hasn't been downloaded */
SELECT emailaddress
FROM UserChanges AS U
WHERE changed_datetime =
(SELECT MAX(changed_datetime)
FROM UserChanges
WHERE personid = U.personid
HAVING MAX(changed_datetime) =
MAX(CASE WHEN downloaded = 'False' THEN changed_datetime END));
AND downloaded = 'False' /* should be 0? */
(untested)
David Portas, SQL Server MVP
Whenever possible please post enough code to reproduce your problem.
Including CREATE TABLE and INSERT statements usually helps.
State what version of SQL Server you are using and specify the content
of any error messages.
SQL Server Books Online:
http://msdn2.microsoft.com/library/ms130214(en-US,SQL.90).aspx
--|||Please post DDL, so that people do not have to guess what the keys,
constraints, Declarative Referential Integrity, data types, etc. in
your schema are. Sample data is also a good idea, along with clear
specifications. It is very hard to debug code when you do not let us
see it.
Doesn't that hit you as "a bit" redundant? (sorry, had to do the pun)
Just over-write the old email with the new one, based on a timestamp
One of your major problems is that you do not know that fields and
records are not part of SQL; columns and rows are different creatures.
When someone logs into the routine. check to see if they have data in
the working tables. If not, copy all the old data over to your working
table. Let the user UPDATE the working data on a column by column
basis in the working database. Or if you really need to keep every
change, then add that timestamp to get the last copy.
Then do your data scrubbing and replace the old data with the new. I
would guess that a VIEW with INSTEAD OF TRIGGERs would help.
No cursors needed.

Wednesday, March 21, 2012

Do a lot of linked tables cause block?

Hello, everyone:
There are a lot of Access and Excel tables linked to my SQL Server (SQL2K SP3 on W2K). The end users update those likned tables. I am wondering if there is the block problem. If yes, how to prevent that? Thanks.
ZYTNo, It should not cause any problems. How did you bring it into sql2k

Saturday, February 25, 2012

Distribution of MSDE to 5,000 end users - good idea or bad?

Our company has an application that we distribute to our agents for generating sales quotes and it currently runs against an Access database. There is some interest in changing to MSDE and we're just trying to solicit some feedback from people that either investigated this or have tried it.

Here is our application and end user profile:

The application is a relatively small VB application that is distributed to about 5,000 agents. The data is stored in two separate physical database files (with many tables in each). One database stores the user-created data like prospects and configured options, and the other database stores the configuration options and rating data. The configuration option and rating data changes quarterly which is handled today through a new download of the software which overwrites the Access database that contains just that data. The agents are independent and sell for many companies, not just ours, and they own and use their own computer equipment. I would say they are probably at or below average for technical experience for end users. The proposal is to convert the application to run against an MSDE database and to include and install a copy of MSDE as part of the application installation. We would probably distribute service packs along with the quarterly updates, but agents do not always install the updates or could stop selling for us at any time, so there is no guarantee that the updates will ever be applied.

Dramatic overhauls of the application are not being considered at this time, and the users frequently do quotes while on-site with clients and they do not always have access to the Internet. In effect, while a web-based model may seem ideal, we would definitely lose sales if the agents are not able to quote with an off-line source of data and application, and the project is only evaluating whether or not it is a good idea to convert the database from Access to MSDE.

Thanks in advance for your comments!
ChrisYou've already pointed out the biggest issues. Service pack updates are a must. Beyond that, I would think this kind of situation lends itself to Access. I would think unless you plan on upgrading all of these machines to .NET, that it would be best to stick with the most distributable option of Access and the VB App.|||Should you decide to move this to .NET then an option might also be to just use XML for your data storage. If the amount of data is not very large, then Access or MSDE might actually be overkill. Deployment of XML based data is pretty straightforward too.

Sunday, February 19, 2012

Distributing Reports automatically

Can reports be set up to run and print automatically to specific printers on a nightly basis. What I'm trying to accomplish is, I have 6 users who need to see specific transaction reports for thier department each day. Of course I don't want them to see the other departments reports.. What options do I have....

Thank You!!

Jim - try this link from the forum. I plan to try it this week and it may accomplish what you need.

http://forums.microsoft.com/MSDN/ShowPost.aspx?PostID=568015&SiteID=1