Results 1 to 5 of 5
  1. #1
    Join Date
    May 2009

    Unanswered: I am having a permission problem

    I have a app that executes a stored procedure on a MS Sql 2005 database. I can successfully execute the SP in the development VS2012 environment.
    However, when I deploy, Everything works except for a stored procedure that executes an Insert into a table.

    If I run the same program from VS2012, everything works.
    \If I run a SQL profiler session on the SQL server, it shows an insertsp when the development box executes, but this entry is not showing when the deployment box executes.

    I have looked at the permissions in SQl server Management studio on both the underlying file (Public has delete, select, insert and update permissions) and the InsertSO (public has Execute).

    Can anyone help me with this?


  2. #2
    Join Date
    Feb 2004
    In front of the computer
    Provided Answers: 54
    I have a lot more questions than I have answers for you.

    First and foremost, if the Profiler output is different between development and production environments, then all bets are off... This means that the application is "environment aware" and behaves differently based on the environment, so comparisons between the environments are meaningless.

    Granting permissions to the public role in a banking database/application is very rarely a good idea. This will almost always cause you heartburn, if nothing else during a security audit.

    Did you really mean "underlying file", or did you actually mean "underlying table"? If so, it seems counter-intuitive to grant all permissions on the table itself but to also use a stored procedure.

    Please give me more information and I'll try to help you.

    In theory, theory and practice are identical. In practice, theory and practice are unrelated.

  3. #3
    Join Date
    Aug 2004
    Dallas, Texas
    Need grant execute on the stored procedure for whatever login is used. First guess.

  4. #4
    Join Date
    May 2009

    I can successfully execute with my user in VS2012 (64bit Windows7). However when I execute the same program on a deployment (Windows Server 2003 32bit) with my user, it executes everything but the insertSP.

    How can I debug the InsertSP in the SQL profiler to determine why it ignores the InsertSP?

  5. #5
    Join Date
    Jan 2003
    Provided Answers: 17
    Since you are not seeing the insert procedure fire on the deployment box, one of two things is happening. Either, the code is not reached (so the procedure would never fire), or the database server you are looking at is not the right database server. In which case, you would need to crawl back through your connection object potentially to your configuration file to see where that insert statement is being sent.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts