Adding Microsoft Sql Server "System Stored Procedure" in the Relational Model Data Retrieval Wizard

Posts   
 
    
mprothme avatar
mprothme
User
Posts: 80
Joined: 05-Oct-2017
# Posted on: 12-Aug-2019 20:18:47   

I'd like to add a system stored procedure to my LLBLGEN PRO project. When I go to select Stored Procedures in the tree I don't see any of the ones that would normally appear in the System Stored Procedures folder. Is there any way to add these to my project?

Thanks!

daelmo avatar
daelmo
Support Team
Posts: 8245
Joined: 28-Nov-2005
# Posted on: 13-Aug-2019 07:57:37   
  • What LLBLGen version are you using? (http://www.llblgen.com/TinyForum/Messages.aspx?ThreadID=7721)
  • Why do you have your own SPs on the system stored procedure folder on your SQL Server? Those SPs are not retrieved as they are not meant to use it. If you really want to use them you could write your own version of that SP in the normal user defined SPs node.
David Elizondo | LLBLGen Support Team
mprothme avatar
mprothme
User
Posts: 80
Joined: 05-Oct-2017
# Posted on: 13-Aug-2019 20:39:09   

We're using 5.5.

And we don't have our own sp's in that folder. Specifically, we're wanting to leverage Microsoft SQL's sp_getapplock and sp_releaseapplock stored procedures and call them through LLBLGEN Pro for a specific use case where we need to leverage distributed locking tied to the DB.

What you've recommended is what we've done. We wrapped the call to both of these procedures in our own that take the same parameters.

Those SPs are not retrieved as they are not meant to use it.

I would argue against the above, however. It's true that most of the time you shouldn't call system stored procedures, but there are valid cases when you should (our case for example). If there were performance or implementation reasons to not allow those I would understand, but just preventing users from leveraging functionality because you typically shouldn't call them seems questionable to me.

I'm sure its low on the feature list, but it would be great if those procedures were hidden by default but you could check a box to see them as opposed to forcing developers to wrap those procedures.

Thanks!

daelmo avatar
daelmo
Support Team
Posts: 8245
Joined: 28-Nov-2005
# Posted on: 14-Aug-2019 08:01:01   

mprothme wrote:

What you've recommended is what we've done. We wrapped the call to both of these procedures in our own that take the same parameters.

Good to know you already found this workaround. sunglasses

mprothme wrote:

daelmo wrote:

Those SPs are not retrieved as they are not meant to use it.

I would argue against the above, however. It's true that most of the time you shouldn't call system stored procedures, but there are valid cases when you should (our case for example)...

...it would be great if those procedures were hidden by default but you could check a box to see them as opposed to forcing developers to wrap those procedures.

I will pass this thread to the feature request forum so it can be considered wink

David Elizondo | LLBLGen Support Team
Otis avatar
Otis
LLBLGen Pro Team
Posts: 39760
Joined: 17-Aug-2003
# Posted on: 14-Aug-2019 09:33:45   

We'll look into adding a setting where you can switch on/off the retrieval of system procs. We filter them out by default as in general people won't use them. But fair point, if you want to use them, you should be able to. simple_smile

Frans Bouma | Lead developer LLBLGen Pro
mprothme avatar
mprothme
User
Posts: 80
Joined: 05-Oct-2017
# Posted on: 16-Aug-2019 16:21:38   

Thank you so much for your help and consideration!