Skip to main content

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.

0 votes
1 answer
29 views

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-...
beginner_'s user avatar
  • 221
1 vote
2 answers
233 views

What I'm trying to do is to have an optional parameter in my stored procedure that gets the default value defined in the table if not provided. create table primates ( id int identity(1,1) ...
Shahriar's user avatar
  • 121
4 votes
3 answers
1k views

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 ...
lifeisajourney's user avatar
0 votes
0 answers
127 views

I am using Sybase Adaptive Server Enterprise (ASE) 16. I am using jConnect 4 in version 7.07. I have a stored procedure that contains a rather simple query, equivalent to this one (I have changed the ...
Harold L. Brown's user avatar
0 votes
2 answers
93 views

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 ...
Henrik R Clausen's user avatar
3 votes
2 answers
514 views

I’m trying to track impacts of stored procedure executions - CPU time, execution duration, logical/physical reads, memory grants, etc. - in order to visualize them. In particular, I'm looking for ...
Kaaniche Emna's user avatar
0 votes
1 answer
113 views

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 ...
Andy's user avatar
  • 111
2 votes
2 answers
157 views

I'm working on an analyzer that accepts a SQL Server query and returns information about all columns in the first result set - until for clause is used, this is pretty straightforward with ...
Matěj Štágl's user avatar
2 votes
1 answer
186 views

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 ...
SqlStar's user avatar
  • 23
5 votes
1 answer
308 views

I've encountered peculiar behaviour by SQL Server, and I wonder why does it behave like this. Consider following CREATE PROCEDURE script: CREATE PROCEDURE dbo.myProc @parameter INT = OUTPUT AS ...
Yano_of_Queenscastle's user avatar
3 votes
1 answer
83 views

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 ...
chronotrigger's user avatar
3 votes
2 answers
599 views

There are many ways you can see an encrypted procedure. Example of an encrypted procedure in SSMS: There is this very good question: How to view an encrypted view or stored procedure where you can ...
Marcello Miorelli's user avatar
0 votes
0 answers
44 views

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 ...
user323060's user avatar
3 votes
3 answers
245 views

I have this stored procedure that I want the max startDate base on AgentId or without the AgentId. The way I am doing this is using a if else and wanted to see if there was a better way to do this? ...
Jefferson's user avatar
  • 111
6 votes
1 answer
966 views

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*/ ...
Yano_of_Queenscastle's user avatar

15 30 50 per page