Hi, I want to generate the database script of sql server 2008. I want to generate only updates from particular date. how to do this?
+2
A:
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:
Knubo
2010-09-30 06:06:36
not sure why someone downvoted an obviously well intentioned answer to a vague question. +1 for making an effort
nathan gonzalez
2010-09-30 06:26:41
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 ?
Lalit
2010-09-30 07:26:00
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.
DForck42
2010-09-30 18:39:57
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.
Lalit
2010-10-01 04:31:25