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

  • SEARCH
  • Home
  • 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 7749991
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 1, 20262026-06-01T11:10:30+00:00 2026-06-01T11:10:30+00:00

I am wondering what rights should be given to sql server user for asp.net

  • 0

I am wondering what rights should be given to sql server user for asp.net website considering following criteria

Sql server user

Should be able to do

  • read from tables
  • insert into tables
  • update rows
  • execute sp, udf

Should NOT be able to

  • delete any of the tables
  • delete any records from table
  • delete any stored proc, udf or any other procedures
  • create new table
  • create new sp, udf, trigger, index etc
  • alter any table
  • alter any columns in tables
  • alter any sp, udf, trigger, index etc
  • any other dangerous stuff
  • 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-06-01T11:10:32+00:00Added an answer on June 1, 2026 at 11:10 am

    Create a user and then apply the following scripts substituting USERNAME with your sql user. This will generate all the scripts you should need!

      --STORED PROCS
        select  'GRANT EXECUTE ON [' + sys.schemas.name + '].[' + sys.objects.name +'] TO USERNAME' as SQL from sys.objects
        INNER JOIN sys.schemas ON sys.schemas.schema_id = sys.objects.schema_id
        where type = 'P' 
    
    --TABLES
    select  'GRANT SELECT ON [' + sys.schemas.name + '].[' + sys.objects.name +'] TO USERNAME' as SQL from sys.objects
    INNER JOIN sys.schemas ON sys.schemas.schema_id = sys.objects.schema_id
    where   type = 'U'
    
    --TABLES
    select  'GRANT INSERT ON [' + sys.schemas.name + '].[' + sys.objects.name +'] TO USERNAME' as SQL from sys.objects
    INNER JOIN sys.schemas ON sys.schemas.schema_id = sys.objects.schema_id
    where   type = 'U'
    
    
    --TABLES
    select  'GRANT UPDATE ON [' + sys.schemas.name + '].[' + sys.objects.name +'] TO USERNAME' as SQL from sys.objects
    INNER JOIN sys.schemas ON sys.schemas.schema_id = sys.objects.schema_id
    where   type = 'U'
    
    
    --FUNCTIONS
    select  'GRANT EXECUTE ON [' + sys.schemas.name + '].[' + sys.objects.name +'] TO USERNAME' as SQL from sys.objects
    INNER JOIN sys.schemas ON sys.schemas.schema_id = sys.objects.schema_id
    where  type = 'FN'
    
    
     --VIEWS
      select 'GRANT SELECT ON [' + sys.schemas.name + '].[' + sys.objects.name +'] TO dardsfp' as SQL from sys.objects
    INNER JOIN sys.schemas ON sys.schemas.schema_id = sys.objects.schema_id
    where  type ='V'
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am wondering if I am able to modify the right-click menu of the
I was wondering if someone could help me debug the following OCaml code that
I wondering where and when I should open/close my SQLiteDatabase connection in my AsyncTaskLoader.
I'm playing with parallel strategies and wondering if I'm doing the following the right
I'm wondering if any seasoned C#/ SQL developers could give me a nudge in
I was wondering how I could use PHP to calculate one's age given a
My friend was given this free google website optimizer tshirt and came to me
I am writing a small HTML+JavaScript (so to call) application. User is given two
As ASP.NET MVC has a pluggable view engine architecture, and XAML is an object
Just wondering if someone could point me in the right direction of how to

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.