Thursday, February 9, 2012

about clone database schema problem

Hi :
If I want to do the follow :
I create 2 database in localhost
one is dev_db
one is clone_db
Where dev_db have data in the database, but clone_db is just a data
structure but need to synchronize with dev_db schema.
If I add table in dev_db , clone_db will auto add same table structure from
dev_db.
If I change the column (include add, change data type), clone_db will auto
to change.
If I change the script (both view, stored procedure, view, user define
function and trigger), , clone_db will auto to change.
Base on above situation, can sql server 2K do this ?
and how to set ?
Thanks for your help
Tom
To get a 'clone' you can generate a sql script of all objects. But SQL
Server cannot add automaticly each object that was created in the X
database to the Y database. You will have to write a script to do the job.
"Tom" <pclan@.tomgroup.com> wrote in message
news:eLp4DZNYFHA.2380@.tk2msftngp13.phx.gbl...
> Hi :
> If I want to do the follow :
> I create 2 database in localhost
> one is dev_db
> one is clone_db
> Where dev_db have data in the database, but clone_db is just a data
> structure but need to synchronize with dev_db schema.
> If I add table in dev_db , clone_db will auto add same table structure
from
> dev_db.
> If I change the column (include add, change data type), clone_db will auto
> to change.
> If I change the script (both view, stored procedure, view, user define
> function and trigger), , clone_db will auto to change.
> Base on above situation, can sql server 2K do this ?
> and how to set ?
> Thanks for your help
>
|||There are also some good third-party tools out there that will allow you to
script out "diffs" between two databases and configurable as to what you
consider differences: DDL only, DML only, and/or both DDL and DML, not to
mention security.
RedGate is one of these, but there are several.
Good luck.
Sincerely,
Anthony Thomas

"Uri Dimant" <urid@.iscar.co.il> wrote in message
news:uyQh75OYFHA.2420@.TK2MSFTNGP12.phx.gbl...
Tom
To get a 'clone' you can generate a sql script of all objects. But SQL
Server cannot add automaticly each object that was created in the X
database to the Y database. You will have to write a script to do the job.
"Tom" <pclan@.tomgroup.com> wrote in message
news:eLp4DZNYFHA.2380@.tk2msftngp13.phx.gbl...
> Hi :
> If I want to do the follow :
> I create 2 database in localhost
> one is dev_db
> one is clone_db
> Where dev_db have data in the database, but clone_db is just a data
> structure but need to synchronize with dev_db schema.
> If I add table in dev_db , clone_db will auto add same table structure
from
> dev_db.
> If I change the column (include add, change data type), clone_db will auto
> to change.
> If I change the script (both view, stored procedure, view, user define
> function and trigger), , clone_db will auto to change.
> Base on above situation, can sql server 2K do this ?
> and how to set ?
> Thanks for your help
>

No comments:

Post a Comment