Solved

SQL Server Express login - Inappropriate to use sa user id with connection string in a VB.NET application??

Posted on 2006-10-25
3
250 Views
Last Modified: 2010-04-23
I don't know what is appropriate or inappropriate when it comes to using a connection string inside VB.NET when multiple users connect to SQL Server.

I have an application that I have working properly with multiple users, however they are connecting using a user id I manually created.  I have several issues because of my inexperience with using SQL Server & VB.NET together.

1)  Is it inappropriate to login ALL remote users with ONE user id?
2)  If so, is there a posting I can refer to that explains how to set up logins in my SQL database programmatically through .NET as I create a login within my application?
3)  If not, is it inappropriate to use the 'sa' user id?

All words of wisdom are greatly appreciated.

Sincerely,
Phil Tate
0
Comment
Question by:TSFLLC
  • 2
3 Comments
 
LVL 70

Accepted Solution

by:
Éric Moreau earned 500 total points
ID: 17805652
Hi TSFLLC,

1) Personally, I find it appropriate to use a single login to connect all the users of an application. I always create a login specific to an application so that I can manage the permissions required by this application. I wouldn't like to create login for each users and I don't want to trust domain users so that they could connect with just about any tools (like Access).

3) Never use sa in an application. sa has all the permissions to scrap your database.


Cheers!
0
 

Author Comment

by:TSFLLC
ID: 17805707
Eric,

I have searched, but not that dilligently I must admit, for some code that shows how I can programmatically create a login.  During my database setup routine I would login as sa to my instance just to attach my custom database and then create my single remote user login.

Can you post a link or code that shows how to do this appropriately with the necessary read/write rights?

Thanks much.
0
 

Author Comment

by:TSFLLC
ID: 17805778
Eric,

Ignore my request.  The explanations for CREATE LOGIN & CREATE USER inside SQL help appear to give me what I need.


Thank you for your promptness!

Phil Tate
0

Featured Post

Courses: Start Training Online With Pros, Today

Brush up on the basics or master the advanced techniques required to earn essential industry certifications, with Courses. Enroll in a course and start learning today. Training topics range from Android App Dev to the Xen Virtualization Platform.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Article by: Kraeven
Introduction Remote Share is a simple remote sharing tool, enabling you to see, add and remove remote or local shares. The application is written in VB.NET targeting the .NET framework 2.0. The source code and the compiled programs have been in…
Microsoft Reports are based on a report definition, which is an XML file that describes data and layout for the report, with a different extension. You can create a client-side report definition language (*.rdlc) file with Visual Studio, and build g…
Windows 10 is mostly good. However the one thing that annoys me is how many clicks you have to do to dial a VPN connection. You have to go to settings from the start menu, (2 clicks), Network and Internet (1 click), Click VPN (another click) then fi…
A short tutorial showing how to set up an email signature in Outlook on the Web (previously known as OWA). For free email signatures designs, visit https://www.mail-signatures.com/articles/signature-templates/?sts=6651 If you want to manage em…

776 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question