Questions tagged [stored-procedures]
Callable code installed on a database manager, exposing an API through which it can be invoked. Normally written in the native query language, some DBMS platforms support other languages as well.
1,697 questions
0 votes
1 answer
25 views
Oracle: Insufficent privileges when compiling a stored procedure as DBA role
I'm complining a stored procedure as user with DBA role. The stored procedure contains several "DELETE" statements. For each of them I'm getting: PL/SQL: SQL Statement ignored PL/SQL: ORA-...
4 votes
3 answers
1k views
Is it better to add conditional logic to a heavily used stored procedure or create a separate one for a new use case?
We have a core stored procedure that's a critical part of our system and gets called thousands of times every hour to handle important operations. Now, there's a new application being introduced that ...
0 votes
2 answers
91 views
Can I get data from an estimated Execution Plan in my C# code?
After years of growth, some reports now take minutes to extract from our database, and in some cases fail due to excess resource consumption. This depends on the parameters that our customers choose ...
0 votes
1 answer
111 views
Could not find stored procedure 'sp_BlitzLock' [closed]
I'm running into an issue while trying to execute the stored procedure sp_BlitzLock in SQL Server 2022 Developer Edition. Here's the exact error message I'm getting: Msg 2812, Level 16, State 62, Line ...
2 votes
1 answer
182 views
On a linked server I can execute a stored procedure A but Can Not execute stored procedure B
On a linked server I can execute a stored procedure A but Can Not execute stored procedure B I have a db server DBServer and a linked server LinkedServer. From the DBServer I can execute successfully ...
3 votes
1 answer
82 views
MYSQL and random performance of store procedure
I run this SP at night, when there’s almost no activity. The SP performs an accumulative calculation of machine usage from a laundromat—an artisanal BI query. It writes the result to a table. On most ...
0 votes
0 answers
44 views
SQL Server Agent job to verify logshipping on multiple databases
I'm trying to come up with a SQL script that will verify log shipping on about 100 databases in an instance. I need to be alerted if log shipping is failing, but I do not want 100 plus emails coming ...
6 votes
1 answer
952 views
When creating stored procedure, are the comments before the definition always preserved?
When I wrote some comments before the CREATE PROCEDURE command, those comments seem to be preserved as part of procedure definition. For example, when I create procedure like this /*Comment header*/ ...