spamster
asked on
Copy SQL Stored Procedures (Export and Import)
We have a DB that got corrupted and had to be repaired (log file was deleted) - unfortunately it seems like not everything was recovered.
It's a CRM database and when we try to run the redeployment wizard it fails. When we look at the logs to see why it failed we see :
04/22/2009 07:54:17 The object 'p_CascadeGrantAccess' does not exist in database 'AcmeWidgits_MSCRM'.
04/22/2009 07:54:17 Microsoft OLE DB Provider for SQL Server
We do have a backup, but it's at least a month old! If we recover that SQL DB, is it possible to export the stored procedure (or procedures...) then go back to the more current DB and IMPORT the stored procedures?
It's a CRM database and when we try to run the redeployment wizard it fails. When we look at the logs to see why it failed we see :
04/22/2009 07:54:17 The object 'p_CascadeGrantAccess' does not exist in database 'AcmeWidgits_MSCRM'.
04/22/2009 07:54:17 Microsoft OLE DB Provider for SQL Server
We do have a backup, but it's at least a month old! If we recover that SQL DB, is it possible to export the stored procedure (or procedures...) then go back to the more current DB and IMPORT the stored procedures?
It is - you can copy objects using the import/export wizard (amongst other ways of recreating them)
ASKER
Ok, do both Databases have to be up at the same time to do that?
Or could I export to a file?
Or do I have to create a blank DB and export the stored procedures into that, and then restore the more current DB and import them in?
Or could I export to a file?
Or do I have to create a blank DB and export the stored procedures into that, and then restore the more current DB and import them in?
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Thanks man, I'm sure I can use this solution to get at least most of my data back :) Hope I can return the help that you gave some day.