0

We have a set for 200 over stored procedures which we have created and converted into scripts - Success

Environment: SQL Server 2008 R2 and SQL Server 2012

While testing we run the stored procedure script file on a newly created test DB and we encounter error each and every time. The error what we found is in the order of execution of these script as we have EXEC commands in the scripts which calls another stored procedure by passing the parameter values.

How to make sure the stored procedures are created without giving us issues just for the order of execution in new database.

We don't want to go ahead with DB restore nor want to manually order the stored procedures.

marc_s
  • 732,580
  • 175
  • 1,330
  • 1,459
aioracle
  • 371
  • 2
  • 7
  • 20
  • Well we will need at least a `redacted` script example to help. There is so much that can go on, such as a `Use [Database]`, `Insert into [Server].[Database].[Schema].[Table]`, and god forbid you have a LinkedServer setup, cause you will be in holy hell to resolve that one. Give a little more of a bone with meat on it so we can assist. – GoldBishop Apr 09 '14 at 00:13
  • As well, refer to [SO Post](http://stackoverflow.com/questions/2072086/how-to-check-if-a-stored-procedure-exists-before-creating-it) – GoldBishop Apr 09 '14 at 00:15

0 Answers0