2

I want to generate the database script of sql server 2008. I want to generate only updates from particular date. how to do this?

1 Answer 1

2

Your question is kind of unclear. Do you want to generate a database script that creates the tables or inserts data?

If it is data you can create selects that outputs what would be valid inserts:

create table test (a int, b int, c int);

select 'insert into test (a,b,c) values
    ('+convert(varchar, a)+','+convert(varchar, b)+','+convert(varchar, c)+');' 
    from test

On the select you could add a where clause where you only obtain data from a given date.

Edit: It looks like someone has discussed how to find changes between databases already on some other discussion forum. Have a look at:

http://www.sqlteam.com/Forums/topic.asp?TOPIC_ID=27234

Sign up to request clarification or add additional context in comments.

4 Comments

not sure why someone downvoted an obviously well intentioned answer to a vague question. +1 for making an effort
See, I have made changes in relationships , columns and data also on date of let say 3 day before. So I want script of changes in DB design after changed (3'rd Day) day to current day. what have to do then ?
do you have two different databases, one dev and one prod? or did you make the changes to the main databases? if you don't have a copy of the databases in some form, you don't have anything to compare it to and script out the changes.
Yes , that is why I am asking. If Sql server have any internal mapping of the changes from 'this' date to 'this' date. Then it will sure this should happens there. I am not maintaining the 2 db. I have single one as dev. (No back up). So I am wondering that , sql serve must have to provide such facility. isn't it ? Because normal developer buying the licenses from Microsoft. He must think this facillity should availabale.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.