'Error: Invalid Custom SQL query. Permission was denied'

  • Hi, 
    The sproc uses linked server to connect to a database. And it executes well on SSMS. However,
    on the front end, it is getting 'Error: Invalid Custom SQL query. Permission was denied.' 
    Thanks in advance,

  • keneangbu - Wednesday, September 26, 2018 8:53 AM

    Hi, 
    The sproc uses linked server to connect to a database. And it executes well on SSMS. However,
    on the front end, it is getting 'Error: Invalid Custom SQL query. Permission was denied.' 
    Thanks in advance,

    And since we can't see anything you see there really isn't much we can do to help except take random shots in the dark while blindfolded.  From the information provided, sounds like a permission issue related to the front end.

  • Are you using the same credentials in SSMS as you are using in the application? I suspect the answer is "No".

    Thom~

    Excuse my typos and sometimes awful grammar. My fingers work faster than my brain does.
    Larnu.uk

  • keneangbu - Wednesday, September 26, 2018 8:53 AM

    Hi, 
    The sproc uses linked server to connect to a database. And it executes well on SSMS. However,
    on the front end, it is getting 'Error: Invalid Custom SQL query. Permission was denied.' 
    Thanks in advance,

    What Lynn said, plus... What is "the front end"? A custom application built by your developers? A vended solution? If the later, is it possible the vendor installed code that prevents customers from writing their own procs to use in the application?

    Brandie Tarvin, MCITP Database AdministratorLiveJournal Blog: http://brandietarvin.livejournal.com/[/url]On LinkedIn!, Google+, and Twitter.Freelance Writer: ShadowrunLatchkeys: Nevermore, Latchkeys: The Bootleg War, and Latchkeys: Roscoes in the Night are now available on Nook and Kindle.

  • Thanks. The front end is custom by developers. It was suggested that the stored procedure needs to be updated to use the linked server to connect to the database. There is my confusion, considering that it runs on ssms without error or warning.

  • keneangbu - Wednesday, September 26, 2018 9:15 AM

    Thanks. The front end is custom by developers. It was suggested that the stored procedure needs to be updated to use the linked server to connect to the database. There is my confusion, considering that it runs on ssms without error or warning.

    Then I would agree with Thom that the app is using a different credential than SSMS. But the error is weird (very non-SQL Server) and is probably coming from the app. You should have your Devs locate the source that creates that error message and verify what it really means before you assume a credential change will solve all problems.

    Brandie Tarvin, MCITP Database AdministratorLiveJournal Blog: http://brandietarvin.livejournal.com/[/url]On LinkedIn!, Google+, and Twitter.Freelance Writer: ShadowrunLatchkeys: Nevermore, Latchkeys: The Bootleg War, and Latchkeys: Roscoes in the Night are now available on Nook and Kindle.

  • Great! Thanks a lot.

Viewing 7 posts - 1 through 6 (of 6 total)

You must be logged in to reply to this topic. Login to reply