I am working on a product that runs an SQL server which allows some applications to login and their logins are granted permission to run a stored procedure- AND NOTHING ELSE. The stored procedure is owned by an admin; the stored procedure takes a query and executes it, then the results are returned to the application.
Unfortunately I c...
Normally, when you want to call a stored procedure directly through Linq to Sql, you can use the ExecuteQuery method:
result = dc.ExecuteQuery<MyTable>("Exec myStoredProcedure");
And if you need to call it with parameters, you can add them through string substitution:
string query = "Exec myStoredProcedure ";
for (int i = 0; i < para...
Is there a good tool from either Sybase or elsewhere that will enable me to debug stored procedures in Sybase ASE? I need to be able to set breakpoints & watchpoints.
Previously, in Sybase ASA (not ASE), I used Sybase Central to do this. There is a plugin for ASE, but I doubt it will let me debug procedures.
...
I have a stored proc that processes a large amount of data (about 5m rows in this example). The performance varies wildly. I've had the process running in as little as 15 minutes and seen it run for as long as 4 hours.
For maintenance, and in order to verify that the logic and processing is correct, we have the SP broken up into secti...
Hey,
I need to create a stored procedure that upon exceution checks if any new rows have been added to a table within the past 12 hours. If not, an warning email must be sent to a recipient.
I have the procedures for sending the email, but the problem is the query itself. I imagine I'd have to make an sql command that uses current date...
I have two Microsoft SQL Server 2000 databases, and a stored procedure on one tries to read data from the other. This used to work fine, but since I became security-conscious and changed the login (SQL user) from "db owner" to "denydatareader" the call fails.
I can get things working if I use the group "datareader", but since I do not w...
I would like to run a search with MSSQL Full text engine where given the following user input:
"Hollywood square"
I want the results to have both Hollywood and square[s] in them.
I can create a method on the web server (C#, ASP.NET) to dynamically produce a sql statement like this:
SELECT TITLE
FROM MOVIES
WHERE CONTAINS(TITLE,'"holly...
I have several Stored Procedures that when added to my dbml, it seems that behind the scenes LINQ can not interpret the result set and will simply map the result as an int. I then have to create the result class myself which is a pain but also I have to go and change the designer file every time I add to my dbml because it will re-load ...
I'm working with a 3rd pary app where I can't alter the tables. We built custom matching "Monthly" tables with an additional datetime column "AsOfDate" where we dump the data at the end of the month and flag those data with the date of last day of the month.
I want to be able to create a single Stored Procedure (Application is designed ...
I've got an Oracle 10g database, and I have a third-party jar file. I want to be able to run a SQL select query in my database that ultimately runs code in my third-party library to retrieve info for inclusion in a SQL result set. I see lots of tutorials on "Java stored procedures" and these seem to be a promising way to do this, but n...
I'm trying to return sequence.nextval to my program from a proc stored in a package. I'm pretty green when it comes to PL/SQL and I'm kind of at a loss as to what is happening. The error that is actually being return is
PLS-00306: Wrong number or types of arguments in call to PROCGET_BOOKMARKID line 1, column 7 statement ignored.
He...
I'm trying to optimize a stored procedure I'm maintaining, and am wondering if anyone can clue me in to the performance benefits/penalities of the options below. For my solution, I basically need to run a conversion program on an image stored in an IMAGE column in a table. The conversion process lives in an external .EXE file. Here ar...
I want to separate a specific set of stored procedures into a seperate database … sort of like a library. However, when I run these procs from another database, they appear to call objects from within the library database.
Here is some source code which demonstrates the problem
use mylibdb
go
create proc gettablecount
as
begin
de...
Is there a way to provide access to users in my database to execute msdb.dbo.sp_send_dbmail without needing to add them to the MSDB database and the DatabaseMailUserRole?
I've tried this:
ALTER PROCEDURE [dbo].[_TestSendMail]
(
@To NVARCHAR(1000),
@Subject NVARCHAR(100),
@Body NVARCHAR(MAX)
)
WITH EXECUTE AS OWNER
AS
BEGIN
...
Are there any static code analysis tools for stored procedures written particularly in PL/SQL and T-SQL?
...
[DUPLICATE of http://stackoverflow.com/questions/337704/parameterizing-a-sql-in-clause]
Issue: I need to send in a list of values into a stored procedure for use with an IN statement in the WHERE clause.
Example:
declare @SPType NVARCHAR ( 30 )
declare @SPCodeA int
set @SPCodeA = 75
set @SPType = '''I'',''M'''
select * from tabl...
Im very new to loadrunner. I couldnt find any online material on running stored procs (for mssql) for loadrunner script. it says it need to be ansi c. I even wrote a c# that connects to db and call the stored proc in question and then used it for "recording" the task. after running it, it didnt generate the script i was hoping for. is th...
Hi,
I have to write code to clone a database entry with associated data in other tables and assign it a new ID. Simplified I have a MAIN Table with a key of ID and sub table say SUB1 with FK of ID and multiple records for each entry in MAIN.
I want to copy the data for a specific ID in MAIN to new records updating the ID to a new value...
We are building a new application in .net 3.5 with SQL server database. The database is fairly large having around 60 tables with loads on data. The .net application have functionality to bring data into this database from data entry and from third party systems.
After all the data is available in database the system have to do lots of ...
Hello!
Is it possible, by using a stored procedure, to fetch a column value from resultset into a local variable, manipulate it there and then write it back to resultset column? The column datatype is integer.
How would the syntax to write the value back look like?
Thanks in Advance... :-)
...