Red Gate forums :: View topic - SQL doc loses all changes if database is updated?
Return to www.red-gate.com RSS Feed Available

Search  | Usergroups |  Profile |  Messages |  Log in  Register 
Go to product documentation
SQL Doc 2
SQL Doc 2 forum

SQL doc loses all changes if database is updated?

Search in SQL Doc 2 forum
This forum is locked: you cannot post, reply to, or edit topics.   This topic is locked: you cannot edit posts or make replies.
Jump to:  
Author Message
crystalusa



Joined: 13 Oct 2010
Posts: 1

PostPosted: Wed Oct 13, 2010 11:03 pm    Post subject: SQL doc loses all changes if database is updated? Reply with quote

We bought SQL Doc so that we can document "version 2" of our production database.

SQL Doc points to a copy of the database on my local SQL Server. Once a week or so we backup/restore from production to my local machine and run some scripts that bring the schema up to v2.

I spent about 10 hours adding in all of last week's changes, brought over the latest copy of the database to my local server, ran the scripts, and now all my work is gone!

This is the second time this happens. How do I save my work and prevent this from happening again?
Back to top
View user's profile Send private message
james.billings



Joined: 16 Jun 2010
Posts: 1121
Location: My desk.

PostPosted: Fri Oct 15, 2010 9:50 am    Post subject: Reply with quote

Thanks for your post - are you referring to adding descriptions against various objects in your database?

If so, these are stored in the database itself as extended properties (assuming you have write access) - as detailed here:

So, when you restore your database, you will get a version that doesn't have all the descriptions you previously created and then lose them.

Is it possible for you to add the descriptions against the production database so that when you restore, you keep all those?

Failing that, you may be able to produce a script you can re-run after restoring to replace all the descriptions you entered previously. The example here creates a stored procedure you can then execute that will produce all the create commands for the extended properties. I think it looks like it only works on tables, but you can perhaps amend it to work on other objects too. You could then run this after documenting everything, produce the script, then run it on the restored data.
Back to top
View user's profile Send private message
Display posts from previous:   
This topic is locked: you cannot edit posts or make replies. All times are GMT + 1 Hour
Page 1 of 1

 
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group