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 279765
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 12, 20262026-05-12T05:03:37+00:00 2026-05-12T05:03:37+00:00

We have a 3rd-party app that wants to call a stored proc using SQL

  • 0

We have a 3rd-party app that wants to call a stored proc using SQL 2005-style “schema” syntax:

Customer.InsertNewOrder

This db is still on SQL 2000, though, so we’re trying to make it “look” like a SQL 2005 schema, and still work right (with minimum necessary permissions). So we:

  1. Created a user called “Customer”
  2. Created the stored proc owned by that user
  3. Granted the web user “execute” rights on the stored proc (via a role)

Granting our web user execute rights is usually all that is takes to run dbo-owned procs (like “dbo.InsertOrder”). We don’t usually have to grant explicit permissions on the underlying tables. But it doesn’t seem to work in this case. We’re getting an error:

INSERT permission denied on object "Order"

So what am I doing wrong?

How can I tell what user is being denied here. Is it my WebUser? Or is it “executing as” the Customer user, and the Customer user needs additional permissions? (I tried granting additional permission to the Customer user (db_datareader and db_datawriter, even tried db_owner), but that didn’t seem to help. db_owner isn’t an option in production, anyway.)

I suppose I can grant explicit INSERT permissions on the necessary table, but why would this be necessary in this case, when it isn’t the case for a DBO owned proc?

EDIT:
I’ve simplified for the sake of this question. In reality, I have several dozen stored procs under two different “schemas” that insert, update, and select from many tables. So hoping to not have to manually itemize permissions on all, if I can help it…

  • 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-12T05:03:37+00:00Added an answer on May 12, 2026 at 5:03 am

    “When one user owns the source object
    and all target objects, the ownership
    chain is said to be unbroken. If
    different users own the target
    objects, the ownership chain is
    broken. SQL Server relies on the state
    of the ownership chain to determine
    when to check permissions.

    (snip)
    If
    the ownership chain is broken, SQL
    Server checks permissions on each
    branch of the chain owned by a
    different user. Only those statements
    where the user has the necessary
    permissions will be executed, and the
    remaining statements will get an
    “Insufficient Permissions” error. In this way, SQL Server allows object owners to retain control over permissions.”

    Quoted from Using Ownership Chains

    To apply this to the current scenario, when the Customer.InsertOrder proc attempts to insert into the dbo.Order table, this breaks the ownership chain, and SQL checks to see if the original user (WebUser, in this case) has permission to perform the insert.

    So WebUser (not Customer) will need permission to INSERT into dbo.Order (either explicitly, or via db_datawriter). All permissions can be removed from Customer, if desired.

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

Sidebar

Ask A Question

Stats

  • Questions 162k
  • Answers 162k
  • Best Answers 0
  • User 1
  • Popular
  • Answers
  • Editorial Team

    How to approach applying for a job at a company ...

    • 7 Answers
  • Editorial Team

    How to handle personal stress caused by utterly incompetent and ...

    • 5 Answers
  • Editorial Team

    What is a programmer’s life like?

    • 5 Answers
  • Editorial Team
    Editorial Team added an answer The problem is that you're adding the new items before… May 12, 2026 at 12:02 pm
  • Editorial Team
    Editorial Team added an answer Yes, in my experience, any large amount of work will… May 12, 2026 at 12:02 pm
  • Editorial Team
    Editorial Team added an answer In general looping through records is a poor idea. can… May 12, 2026 at 12:02 pm

Related Questions

So we ran into an interesting issue today. We have a Java EE web
We're developing a .NET app that must make up to tens of thousands of
I routinely run into this problem, and I'm not sure how to get past
I have a project that comprises pre-build Dll modules, built some time in the

Trending Tags

analytics british company computer developers django employee employer english facebook french google interview javascript language life php programmer programs salary

Top Members

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.