Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 3997880
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 20, 20262026-05-20T07:27:22+00:00 2026-05-20T07:27:22+00:00

i have a single sql database in sql server express. i have a login

  • 0

i have a single sql database in sql server express.

i have a login MAINLOGIN, for this database.

i want insertion of data in this database through multiple users, U1,U2,U3, each having different userids & passwords.

These users would be created by MAINLOGIN , manually or via the winform application.

So while creating MAINLOGIN , i would give him permission to further create logins.

For this what should i do?

i cannot create MULTIPLE users, because for one database, only one user can be created under one login.

so should i create multiple logins, L1,L2,L3, then map, U1, U2, U3 to them.

Or, is there a better way to do this? like application roles etc.

i dont want to use windows authentication. because if i know the system password, then i could simply connect sql via the application and insert wrong data.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-20T07:27:23+00:00Added an answer on May 20, 2026 at 7:27 am

    In SQL Server, you can have either accounts based on Windows accounts, or separate, specific SQL accounts. For both variations, you need one account for each user that needs to use your database.

    The only exception is the ability to create a SQL Server Login for a Windows security group, e.g. MyAppUsers, and then a user in your database for that login. With this, any Windows account that is member of that security group (in Windows/AD) will also have permissions to see / use your database.

    With this approach, you’re also moving the administration of who can use your database out of SQL Server, since it really only depends on membership in a Windows security group.

    One login, one user – multiple Windows accounts that get permissions with this. Seems like a winner to me!

    Update:

    Create a login for a Windows AD group:

    CREATE LOGIN [DOMAIN\GroupName] FROM WINDOWS
    

    Create a user in your database based on that login:

    USE (your database)
    
    CREATE USER GroupNameUser 
    FOR LOGIN [DOMAIN\GroupName]
    

    Connection string for your SQL Server connection:

    server=(your server);database=(your database);integrated security=SSPI;
    

    What else can I tell you?

    Update #2: the code not using the Windows accounts is this:

    Create a login for each user that needs to use your application

    CREATE LOGIN (some login name) WITH PASSWORD = 'Top$ecret'
    

    Create a user in your database based on that login – again, once for each user of your app:

    USE (your database)
    
    CREATE USER UserName
    FOR LOGIN (some login name)
    

    Connection string for your SQL Server connection:

    server=(your server);database=(your database);
      user id=UserName;Password=Top$ecret
    

    But again: this requires one login including a password and one user in each database which you need to keep track of and possibly do stuff like “reset password” operations etc. from your database app. Lots more in terms of admin overhead!

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have added Full Text Search to my sql server 2008 express database and
We have a Single Statement FUNCTION in SQL Server 2005 which uses CONTAINSTABLE(). All
I have a single Rails 2.2.2 app that I want to 'share' with multiple
I am trying to restore a database in my sql server 2005 express edition.
I have a grid view utilizing sql data source. Now I want to delete
I have a single RoutedUICommand that can be accessed through various places in the
I have created a SQL DB-based winforms application, and I want to deploy it
i have a single powerpoint slide that we use for reporting. This slidehas some
I have a long running query that returns a large data set. This query
I have an single threaded, embedded application that allocates and deallocates lots and lots

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.