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 replication do this ?
and how to set ?
Thanks for your help
Tom,
there is a DTS 'Copy Objects task' which allows you to copy the schema
without taking the data. There are also tools (Redgate) which'll allow
similar things. To have this automatic is not possible AFAIK using SQL
Server 2000. In SQL 2005 there are ddl triggers that we could take advantage
of, but in SQL 2000 you'd have to have some sort of proactive polling
solution.
HTH,
Paul Ibison SQL Server MVP, www.replicationanswers.com
(recommended sql server 2000 replication book:
http://www.nwsu.com/0974973602p.html)
Showing posts with label dev_dbone. Show all posts
Showing posts with label dev_dbone. Show all posts
Sunday, February 19, 2012
About replication
Labels:
clone_db,
clone_dbwhere,
create,
database,
dev_db,
dev_dbone,
localhostone,
microsoft,
mysql,
oracle,
replication,
server,
sql
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
>
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
>
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 helpTom
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
>
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 helpTom
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
>
Subscribe to:
Posts (Atom)