SQL Azure Export Process - Error SQL71562: Procedure: [dbo].[store_procedure_name] has an unresolved reference to object [database_name].[dbo].[table_name]
Using a database involve a backup mechanism. If we are using SQL Azure and the new Windows Azure portal we will be able to make manual backup very easily.
In the case our database is deployed long time ago, you can discover that an error will occur during the export process. This error appears usually only at store procedures and the error message is similar to this:
Each line of script that refers to a specific database named need to be changed in a way that will not contain the database name. After you make this change you will need to update all your scripts.
Before:
In the case our database is deployed long time ago, you can discover that an error will occur during the export process. This error appears usually only at store procedures and the error message is similar to this:
Error SQL71562: Procedure: [dbo].[store_procedure_name] has an unresolved reference to object [database_name].[dbo].[table_name]
This is happening because your store procedure contains in the table path or in the store procedure path the name of the database also. The solution for this problem is quite simple but will require changing of all your database scripts that contain the database name in the path.Each line of script that refers to a specific database named need to be changed in a way that will not contain the database name. After you make this change you will need to update all your scripts.
Before:
INSERT INTO [myFooDatabase].[dbo].[TableName] (…) …
After:INSERT INTO [dbo].[TableName] (…) …
Thanks men, I too had this error
ReplyDeleteDoes this mean that a database project limits you to using just one database? I've imported the 2nd database as another project within the solution and still get this error.
ReplyDelete