Click here to Skip to main content
15,905,558 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hi..friends...

In my web application i am using sql server-2008 R2. My web application runs fine at local host but when i uploaded my project on server then it's give an error like...."Server couldn't find store procedure 'procedure_name'...."

I have created backup of my DB successfully with the same name which i used at localhost as well as a different DB name...i have tried with both of DB one by one but still error is not resolved....Please help me..

My connection strings in webConfig, DAL file and Class file are same...

Thanks

Sunil sharma
Posted
Comments
Member 10434230 30-Dec-13 3:32am    
can you please post, connection string
and DB Server name and DB name, so that it can be validated

Check the production server directly using SSMS and look at the database to check that you transferred the stored procedures - if you didn't explicitly select them when you did the backup to transfer to the production server, then you will not have copied them to the server.

You can also check using code from here: Using C# to Enumerate Through Stored Procedures in MS SQL Server 2000[^] - it's old, but should still work.
 
Share this answer
 
right click on your DB on localhost. Go to tasks/generate scripts. Here you can create scripts to create all of your procs, so you can install them on your server.
 
Share this answer
 
Hi,

I will suggest that Delete your Database from Server and create an empty Database, after that go to localhost Right Click on DB Name -> Task -> Generate Script and here is the catch.

When you see the window Choose Objects You get two options
1. Script entire Database and database objects.
2. Select Specific database objects

Choose 2nd Option and Check all you tables and Stored Procedures and Create the script and then run it to Sever Database. It will Work Fine.


This is because When you choose First option the script is created with MDF and LDF file with your local systems path, which may not exists in your Server and the scripts fails.


Hope above helps.
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900