Skip to main content

Questions tagged [extended-stored-procedure]

Filter by
Sorted by
Tagged with
1 vote
1 answer
61 views

Does Query Store track extended stored procedures?

My experiments suggest that Query Store does not track extended stored procedures. However, they each have their own individual behaviour, I am not even a beginner on the topic of extended stored ...
J. Mini's user avatar
  • 855
3 votes
1 answer
1k views

Error when using OPENROWSET from a View as a nonsysadmin

[SQL Server 2012] I am running into an issue regarding the usage of a non-sysadmin account calling a view which contains a OPENROWSET call that pulls from a stored procedure. I was wondering whether ...
Dray's user avatar
  • 51
12 votes
1 answer
7k views

How is the new system stored procedure sys.xp_delete_files different from sys.xp_delete_file?

SQL Server 2019 introduced a new (and undocumented) system stored procedure: sys.xp_delete_files What, exactly, does this new extended stored procedure do? How does it differ from xp_delete_file ...
Solomon Rutzky's user avatar
1 vote
0 answers
722 views

many MSQL_XP waits

I've run the script from Paul Randal: please tell me where it hurts, and the top wait type (by 32 %) is MSQL_XP. When running sp_whoisactive, I've seen calls to xp_sqljdbc_xa_commit, ...
Henrik Staun Poulsen's user avatar
3 votes
1 answer
895 views

Deleting files from within SQL Server

I've been using xp_delete_file to delete old backup files but I now an a need to delete files that are part of an application (as part of GDPR). As xp_delete_file only will only let you delete log or ...
Andrew Lackenby's user avatar
1 vote
2 answers
2k views

SQL Server Extend dynamic SQL query with where part fetched from Stored Procedure

I have a stored procedure that creates a dynamic SQL Query. I use sp_executesql, to have it SQL injection safe. I have a second stored procedure that generates a where logic. For example if I run the ...
1yunuz's user avatar
  • 13
0 votes
1 answer
13k views

EXEC xp_dirtree

I developed a stored procedure with a call to this extended SP EXEC xp_dirtree @path, 1, 1 Database: SQL Server 2008 R2 Express I run the stored procedure from different sources: ASP. Net with ...
jpussacq's user avatar
  • 146
1 vote
0 answers
2k views

xp_delete_file not working

I am running a query window under my own account and the following command: DECLARE @ReturnCode int EXECUTE @ReturnCode = [master].dbo.xp_delete_file 0, N'\\backup\sql', 'bak', '2015-11-24T23:30:02' ...
Tom's user avatar
  • 1,569
1 vote
0 answers
484 views

How to create a stored procedure to update database after table edit

In a C# website application with a database, I set a gridView table so that I could edit the values in the table by row, but it appears that I need a stored procedure to do that. Below is the stored ...
KES's user avatar
  • 11
5 votes
1 answer
909 views

Does XP_API deprecation announcement mean that sp_executesql will not be supported in the future?

I have setup an Extended Events session in SQL 2008 R2 to track the deprecation_final_support and deprecation_announcement events. I noticed some "deprecation_announcement" events in my log with "...
BateTech's user avatar
  • 766
0 votes
2 answers
6k views

create a stored procedure if it doesnt exist using a ddl in db2

My requirements are, I want to create a ddl script which will check if a stored procedure exists on DB, if yes then drop it and recreate it. What I tried is, IF EXISTS (select procname into ...
Nachiket Kate's user avatar
3 votes
1 answer
1k views

Variable numbers of parameters in a SqlClr UDF or Stored Proc

Lets say I have the following signature for a CLR Stored Proc or UDF: [Public] public static void RaisError( string message, short severity, short state, params object[] args) The ...
Justin Dearing's user avatar