Questions tagged [stored-procedures]

36 questions
1
vote
2 answers

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 What are the steps that are required to reduce the…
Tripz
  • 23
  • 1
  • 4
1
vote
2 answers

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 connection string. This users will be allow to execute…
1
vote
1 answer

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 database on this server with nothing but stored…
theog
  • 111
  • 3
1
vote
2 answers

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 Amazon EC2 as a solution and it seems alright.…
1
vote
2 answers

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); BEGIN SELECT points INTO chpoints FROM…
Omie
  • 103
  • 1
  • 2
  • 7
0
votes
2 answers

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 DECLARE @column varchar(3) SELECT @column = 'd'…
niaher
  • 135
  • 1
  • 1
  • 9
0
votes
3 answers

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 queries without ORDER BY clauses. I appreciate having…
Spodgy
  • 3
  • 2
0
votes
1 answer

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 tried "generating script" ... but i cannot…
0
votes
2 answers

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 to put data into another database. I have three…
Jazza
  • 135
  • 6
0
votes
1 answer

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 procedure 'master.dbo.sp_password'. (.Net…
Aravinda
  • 1,081
  • 5
  • 12
  • 30
0
votes
2 answers

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 through the Object Explorer. I've gone off and found…
Black Dynamite
  • 483
  • 2
  • 5
  • 15
0
votes
2 answers

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 mobile 3g connection, so the link will exist on a DMZ…
0
votes
1 answer

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 HEADERONLY command. How can you restrict the RESTORE…
asteroid
  • 121
  • 6
0
votes
1 answer

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 , Client_Cust_Ref , Access_Id …
Steven
  • 101
  • 1
0
votes
2 answers

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
  • 103
  • 1
  • 4