Questions tagged [stored-procedures]

The tag has no usage guidance.

Filter by
Sorted by
Tagged with
0 votes
0 answers
66 views

Prioritize\speed up stored procedure

I've got a stored procedure with loops and what not inside and recursive calling of other stored procedure and recursive calling of the stored procedure itself. This stored procedure has a lot of ...
James's user avatar
  • 203
0 votes
3 answers
112 views

Changes to data ordering between SQL Server 2000 and 2012

My company recently migrated a .NET 1.1/SQL Server 2000 web application to SQL Server 2012. We've had a couple of support calls relating to unusual behaviour - particularly with stored procedure ...
Spodgy's user avatar
  • 103
0 votes
1 answer
4k views

How to backup SQL database without users and stored procedures

I have a database which i need to take backup monthly / or by running an script. I need to backup the data and structure only. I don't want to backup stored procedures and users for example... I have ...
Narbeh Davoodian's user avatar
0 votes
1 answer
708 views

I cant change sa password in mssql 2005 "Could not find stored procedure 'master.dbo.sp_password'. (.Net SqlClient Data Provider"

We have an old ms sql 2005 server and for some reason, most of the features in sa account settings are grayed out.. Even I cant change sa password It will though this error "Could not find stored ...
Aravinda's user avatar
  • 1,111
0 votes
2 answers
2k views

Script out SQL Job Create Statement Without SSMS

Does anyone have an idea of how to generate the Create statement for a SQL Agent Job? I've looked everywhere, and I can't seem to find a search result that doesn't involve using SSMS and going ...
Black Dynamite's user avatar
2 votes
1 answer
5k views

5.7.1 SMTP error when running stored proc using DB Mail in SQL Server 2012

I am getting an error in SQL Server 2012 Database Mail when executing a stored proc to send an email from a specified address to a specified address using Office 365 as the SMTP server. The mail ...
medina's user avatar
  • 135
-1 votes
1 answer
113 views

MySQL Server stops working on heavy calculation load [closed]

When executing the attached procedure, mysql hangs up and does not replay anymore until cancelling the task. It is installed locally on a windows machine. Its whole performance is terribly. What to do?...
Marco Klein's user avatar
1 vote
2 answers
739 views

Able to create procedures but not functions [closed]

I am able to create mysql stored procedures but not stored functions. example: DELIMITER $$; DROP FUNCTION IF EXISTS `interkm_db1`.`temp`$$ CREATE FUNCTION `interkm_db1`.`temp` () RETURNS int ...
Sydwell's user avatar
  • 111
0 votes
2 answers
109 views

Safely Execute Stored Procedure Via DMZ Server

I'd like to execute a stored procedure via web application that connects to SQL Server. The procedure is to be activated by clicking a link in an email. The link will have to be accessible from a ...
Michael Capobianco's user avatar
1 vote
2 answers
4k views

Stored Procedure taking more time to execute (Sql Server 2005)

I have a stored procedure implemented and calling of this stored proc from web page is taking more than 300ms, But when write the script in the web page and call the url, it is executing in 50ms ...
Tripz's user avatar
  • 23
1 vote
2 answers
2k views

Configure user login and stored procedures permissions on SQL Server

I'm a software developer finishing a web application. The app uses the database "DB1" in my SQL Server 2008 "SQLServer_1". I would like to create a limited user that the web app will use in its ...
NullOrEmpty's user avatar
3 votes
1 answer
5k views

DBCC Freeproccache greatly sped up sp execution time, why?

Using MSSQL 2005 Today I was called in to look at a stored procedure that started executing slowly when used from our program. Around the order of a couple seconds where it used it execute instantly. ...
Equixor's user avatar
  • 73
-2 votes
1 answer
29 views

Stored Proc. parameter being dropped on one server but not on another [closed]

I have a really weird issue here. I have two server setups, one here and one at a customer. The two setups are pretty alike - same OS/SQL server version etc. On our end everything is working fine, but ...
Graffen's user avatar
  • 37
0 votes
1 answer
249 views

RESTORE HEADERONLY usage for telling differential backups apart from full backups

Using RESTORE HEADERONLY and checking the BackupType column to tell differential and full backups apart, but a little stumped on how to restrict the data that is being returned from the RESTORE ...
asteroid's user avatar
  • 121
0 votes
1 answer
169 views

SQL Server 2005 inserting null when value hard coded

I have a stored proc that creates an entery in a table. INSERT INTO tbl_CaseDetails ( Case_Id , Client_Id , Client_HO_Id , Client_Case_Ref ...
Steven's user avatar
  • 101
2 votes
1 answer
207 views

SQL Server 2005 question about procedure cache

Server: SQL Server 2005 SP2 64 bit, 32 gigs of memory. 2 instances of SQL server running. Main instance I'm using has 20 gigs visible. We have a situation where it appears every so often our entire ...
Equixor's user avatar
  • 73
4 votes
1 answer
13k views

Is a MySQL stored procedure able to insert/update to a remote backup MySQL server?

Is it possible to create a MySQL stored procedure that can execute a given insert or update and then also have it connect to a 2nd server and run the same commands? I want to basically call one server ...
BobFranz's user avatar
4 votes
1 answer
3k views

MySQL Stored Procedure Parameters are NULL

I am stumped, and was hoping someone here would have a quick and easy answer. I did a fresh install of MySQL 5.5 and am trying to pass parameters into a stored procedure. The parameter values aren't ...
emmilely's user avatar
3 votes
2 answers
3k views

how to prevent log output from PostgreSQL stored procedure?

I am running a number of PostgreSQL scripts that used to produce excessive log output. I managed to reduce most of the output to an acceptable amount by passing --quiet as parameter to the psql ...
ssc's user avatar
  • 1,189
2 votes
3 answers
43k views

How do I grant a database role execute permissions on a schema? What am I doing wrong?

I am using SQL Server 2008 Express edition. I have created a Login , User, Role and Schema. I have mapped the user to the login, and assigned the role to the user. The schema contains a number of ...
Lewray's user avatar
  • 143
0 votes
2 answers
4k views

Running a MS-SQL Server Stored Procedure from MS Access?

I have an Access 2010 front-end to an SQL-Server 2008 database. I'd like to use the stored procedures already on the server via the front-end! Is this even possible? (Bit of a newb so go easy on me (...
MSpeed's user avatar
  • 103
1 vote
1 answer
158 views

Giving permissions to objects called in stored procedures

We've got about 55 vendor databases running in SQL Server 2000 compability mode on a SQL Server 2008 server. Cross database ownership chaining is enabled. We also have our own in-house reporting ...
theog's user avatar
  • 111
0 votes
1 answer
1k views

Index rebuild stored procedure fails while calling temporary table

SQL Server 2008 Enterprise on Windows Server 2008 Enterprise Cluster that is used to support SharePoint 2007 and 2010. We have a weekly index rebuild job that first checks the index fragmentation, and ...
Ddono25's user avatar
  • 165
0 votes
1 answer
712 views

Dump SQL Server Stored Procedures to Files

Is there a non-interactive (read: script-able) way to dump all stored procedures to disk? We keep versions of our stored procedures in the repository to track changes and for deployment and rollback ...
Jake Wharton's user avatar
2 votes
1 answer
141 views

MySQL Stored Procedure

I must convert some stored procedures from MS Sql Server to MySQL and in Sql Server I have these two variables: @@ERROR for a server error and @@IDENTITY for the last insert id are there MySql ...
xdevel2000's user avatar
1 vote
2 answers
178 views

What kind of database server should I use for a 500k stored procedure calls per day database?

I have a database that gets about 500,000 stored procedure calls a day in addition to other stuff. It's running too slow for us and we're going to upgrade it when we get around to it. I'm looking at ...
SteveGSD's user avatar
  • 297
1 vote
2 answers
3k views

Adding a MySQL StoredProcedure causes not responding state

I'm on Windows 7 ultimate 32bit + xampp 1.7.2 [MySQL v5.1.37] This is my stored procedure : delimiter // CREATE PROCEDURE updatePoints(IN parentid INT(5),IN userid INT(5)) DECLARE chpoints INT(5); ...
Omie's user avatar
  • 203
0 votes
2 answers
914 views

Importing oracle dump file, getting error on stored procedures

I export an oracle "schema" using exp userid=/ file=pt.dmp log=pt.log owner=FOO buffer=10000000 statistics=NONE direct=Y and then import it into a different schema on the same oracle instance on ...
Paul Tomblin's user avatar
  • 5,235
4 votes
3 answers
10k views

How safe is SQL Server's encryption of stored procedures?

Background I am using SQL Server 2008 Enterprise on Windows Server 2003 Enterprise. I developed some stored procedures for SQL Server and the machine installed with SQL Server may not be fully under ...
George2's user avatar
  • 1,147
2 votes
3 answers
1k views

SQL Server store procedure encrypt is safe?

I am using SQL Server 2008 Enterprise on Windows Server 2003 Enterprise. I developed some store procedure for SQL Server and the machine installed with SQL Server may not be fully under my control (...
George2's user avatar
  • 1,147
2 votes
2 answers
1k views

Deny Stored Procedure Data Modification by User Security

I want an easy way to make a read-only user on my database. The user should have permission to execute stored procedures only if they don't modify data. I don't want to figure out which stored ...
Mindy's user avatar
  • 117
0 votes
2 answers
123 views

Dynamic SQL within stored procedure

Will the below stored procedure be recompiled on every run, because of the dynamic SQL within it? Are there any serious performance hits with this method? CREATE PROCEDURE MyStoredProcedure AS BEGIN ...
niaher's user avatar
  • 135
2 votes
3 answers
9k views

How can I give a SQL Server user permission to run one stored procedure and nothing else?

I need to be able to remotely monitor the disk space on a SQL 2005 server. To do this I need to give a sql server user the ability to run the following stored procedure: EXEC xp_fixeddrives; ...
Dave Forgac's user avatar
  • 3,596
1 vote
2 answers
1k views

Why can't I access stored procedures on a linked MSDE 8.x server?

I am trying to execute a stored procedure on a linked MSDE 8.x server by running the following SQL against the parent SQL Server 2000 instance... DECLARE @RC int EXECUTE @RC = [LINKED_SERVER_NAME].[...
Tim Lara's user avatar
  • 187
0 votes
2 answers
1k views

Need a secure way of granting access to xp_cmdshell

Imagine the following scenario: I need to execute a stored procedure which, amongst other things, needs to EXECUTE xp_cmdshell to run a command-line script which executes a bulk insert (bcp) command ...
Jazza's user avatar
  • 135
3 votes
3 answers
18k views

SQL Server: Why is recompiling stored procedures required?

I was executing the script I found on this site to mark all my tables and stored procedures for recompilation. (I changed it to also mark the stored procedures) I have a Windows Forms (.net 3.5) ...
Marc's user avatar
  • 405