How do I move charts between SQL Server databases?

I am trying to move a database from a hosted server to my own SQLExpress instance. I used the Publish Database Wizard to create a script ... but the diagrams were not migrated.

Then I found and followed the recommendations of another answer on this site in which I had to import / export data into a sysdiagrams table.

When I do this, I can see all the diagrams in the Diagrams folder. However, when I try to open it, I see the schema of each table and then I get a pop-up error message:

"Tables have been removed from the diagram because privileges have been removed to those tables (tables), or the table has been removed."

When I exit the popup, all tables are removed from the diagram (except for a couple of aspnet_xyz membership tables that were part of the same diagram).

Do you know how I can transfer charts without receiving this message?

0


a source to share


4 answers


You need to delete the diagram and in the right-click menu using "New Database Diagram" create a new one and add the tables you need and eventually save it.



+1


a source


The easiest way is to back up the entire database and restore it to your Express database. You are getting an error because the charts are not simple blueprints - they are just some metadata and they rely on the tables they show - you need the tables shown by the chart. If you don't want to modify the diagram, just export it as an image.



0


a source


I've seen something similar to this before, it wasn't exactly the same, but maybe it's close enough to appeal to you.

Probably the problem you ran into at the beginning is because user privileges are tied to the old server in some way.

Refer to http://forums.microsoft.com/MSDN/ShowPost.aspx?PostID=120849&SiteID=1 and this: http://msdn2.microsoft.com/en-us/library/ms143684.aspx .

  • You need to stop the "SQL Server (SQLEXPRESS)" service.

  • Then delete the \ Documents and Settings \ Username \ Local Settings \ Application Data \ Microsoft \ Microsoft SQL Server Data \ SQLEXPRESS folder.

  • Reboot SQL Server.

  • Restart Visual Studio.

I hope this helps.

0


a source


This problem stopped when I overwrote the entire database using the Publish Database Wizard ... This time I specified "Schema Only" instead of "Schema and Data". After that, I was able to successfully import and open the diagrams using the Import / Export Wizard.

0


a source







All Articles