dbTalk Databases Forums  

How to Transfer data, data archieving, good strategy?

microsoft.public.sqlserver.dts microsoft.public.sqlserver.dts


Discuss How to Transfer data, data archieving, good strategy? in the microsoft.public.sqlserver.dts forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
Shamshad Ali
 
Posts: n/a

Default How to Transfer data, data archieving, good strategy? - 08-31-2009 , 09:33 AM






I have two databases Frontend and backend. All data of years since the db
started working is kept in Backend (you can say it as historical data or
achieving and for reporting purpose data.)
The frontend database is used for users live insertions/transactions in this
database. We only have to keep last 7 days data into this (frontend)
database and rest of the data will be moved to Backend database on daily
bases. This way we will have only last 7 days data into Frontend db.
There are master and detail tables in Frontend and its structure would be
same as in Backend database. We want data should be consistent. I would like
to know how do I do this job?
Either DTS or Logshipping or write a custom stored procedure to take a copy
of whole live data of last 7 days and update in backend.
Is there any logic we can build to solve this problem or does anyone has
done such kid of job before? Remember that the last 7 days data could be
updated because of the business logic that if a session remains open for few
days the session end time would be going to update in last few days. That's
why we are keeping atleast last 7 days data in frontend db.

Reply With Quote
  #2  
Old   
Todd C
 
Posts: n/a

Default RE: How to Transfer data, data archieving, good strategy? - 09-01-2009 , 10:16 AM






Hello:
This sounds like a not too easy task. Replication might work for you, but
you would need to investigate and TEST fully. You could set up your front-end
machine as the 'master/publisher' and your back-end machine as the
subscriber. The trick would be to:
1) set the subscriber to NEVER delete data, if in fact replication options
allow that
2) set up routines on the front-end to purge data older than X days.

If you can get all the above working, I suggest the following as well:
Store the "7" (days) as a record in a 'Control' table that can be queried or
retrieved by the delete routines so that should you later decide to retain 10
or 14 days, it is a simple changing of a value, not re-writing code, possibly
missing some routines! Second, do everything through stored procedures, and
have another 'control' table that decides the order in which the procedures
are run. Based on table structure changing, you may need to add/remove/change
the order of the deleting procedures.

Best of luck to you. I don't envy the job ahead of you!
=====
Todd C


"Shamshad Ali" wrote:

Quote:
I have two databases Frontend and backend. All data of years since the db
started working is kept in Backend (you can say it as historical data or
achieving and for reporting purpose data.)
The frontend database is used for users live insertions/transactions in this
database. We only have to keep last 7 days data into this (frontend)
database and rest of the data will be moved to Backend database on daily
bases. This way we will have only last 7 days data into Frontend db.
There are master and detail tables in Frontend and its structure would be
same as in Backend database. We want data should be consistent. I would like
to know how do I do this job?
Either DTS or Logshipping or write a custom stored procedure to take a copy
of whole live data of last 7 days and update in backend.
Is there any logic we can build to solve this problem or does anyone has
done such kid of job before? Remember that the last 7 days data could be
updated because of the business logic that if a session remains open for few
days the session end time would be going to update in last few days. That's
why we are keeping atleast last 7 days data in frontend db.


Reply With Quote
  #3  
Old   
kami
 
Posts: n/a

Default Re: How to Transfer data, data archieving, good strategy? - 09-08-2009 , 05:03 AM



hmmm
On Sep 1, 9:16*pm, Todd C <To... (AT) discussions (DOT) microsoft.com> wrote:
Quote:
Hello:
This sounds like a not too easy task. Replication might work for you, but
you would need to investigate and TEST fully. You could set up your front-end
machine as the 'master/publisher' and your back-end machine as the
subscriber. The trick would be to:
1) set the subscriber to NEVER delete data, if in fact replication options
allow that
2) set up routines on the front-end to purge data older than X days.

If you can get all the above working, I suggest the following as well:
Store the "7" (days) as a record in a 'Control' table that can be queriedor
retrieved by the delete routines so that should you later decide to retain 10
or 14 days, it is a simple changing of a value, not re-writing code, possibly
missing some routines! Second, do everything through stored procedures, and
have another 'control' table that decides the order in which the procedures
are run. Based on table structure changing, you may need to add/remove/change
the order of the deleting procedures.

Best of luck to you. I don't envy the job ahead of you!
=====
Todd C



"Shamshad Ali" wrote:
I have two databases Frontend and backend. All data of years since the db
started working is kept in Backend (you can say it as historical data or
achieving and for reporting purpose data.)
The frontend database is used for users live insertions/transactions inthis
database. We only have to keep last 7 days data into this (frontend)
database and rest of the data will be moved to Backend database on daily
bases. This way we will have only last 7 days data into Frontend db.
There are master and detail tables in Frontend and its structure would be
same as in Backend database. We want data should be consistent. I wouldlike
to know how do I do this job?
Either DTS or Logshipping or write a custom stored procedure to take a copy
of whole live data of last 7 days and update in backend.
Is there any logic we can build to solve this problem or does anyone has
done such kid of job before? Remember that the last 7 days data could be
updated because of the business logic that if a session remains open for few
days the session end time would be going to update in last few days. That's
why we are keeping atleast last 7 days data in frontend db.- Hide quoted text -

- Show quoted text -

Reply With Quote
  #4  
Old   
Shamshad Ali
 
Posts: n/a

Default Re: How to Transfer data, data archieving, good strategy? - 09-08-2009 , 05:18 AM



Hi Todd,

Thank you very much for your suggestion. Based on your suggestions and our
business requirements to meet, I have created a diagram and wanted to share
with you.
Please feel free to ask any questions to understand it first. Based on our
proposed architecture (as depicted in the diagram), Following are my
questions for which your answers will be very helpful


http://w8qm4a.blu.livefilestore.com/...chitecture.gif

1. Does any aspect of this design lead us to a disaster if we implement it?
If yes please point it out and let us know why it could be a disaster and if
there is any better solution exist.
2. Do you think if this architecture will involve heavy maintenance cost
which could be a nightmare for whole project?

Just to let you know our target is to meet high Performance and high
availability with minimum maintenances cost as the system we are developing
will have 100,000 online users transactions at a time.


Shamshad Ali.



"Todd C" <ToddC (AT) discussions (DOT) microsoft.com> wrote

Quote:
Hello:
This sounds like a not too easy task. Replication might work for you, but
you would need to investigate and TEST fully. You could set up your
front-end
machine as the 'master/publisher' and your back-end machine as the
subscriber. The trick would be to:
1) set the subscriber to NEVER delete data, if in fact replication options
allow that
2) set up routines on the front-end to purge data older than X days.

If you can get all the above working, I suggest the following as well:
Store the "7" (days) as a record in a 'Control' table that can be queried
or
retrieved by the delete routines so that should you later decide to retain
10
or 14 days, it is a simple changing of a value, not re-writing code,
possibly
missing some routines! Second, do everything through stored procedures,
and
have another 'control' table that decides the order in which the
procedures
are run. Based on table structure changing, you may need to
add/remove/change
the order of the deleting procedures.

Best of luck to you. I don't envy the job ahead of you!
=====
Todd C


"Shamshad Ali" wrote:

I have two databases Frontend and backend. All data of years since the db
started working is kept in Backend (you can say it as historical data or
achieving and for reporting purpose data.)
The frontend database is used for users live insertions/transactions in
this
database. We only have to keep last 7 days data into this (frontend)
database and rest of the data will be moved to Backend database on daily
bases. This way we will have only last 7 days data into Frontend db.
There are master and detail tables in Frontend and its structure would be
same as in Backend database. We want data should be consistent. I would
like
to know how do I do this job?
Either DTS or Logshipping or write a custom stored procedure to take a
copy
of whole live data of last 7 days and update in backend.
Is there any logic we can build to solve this problem or does anyone has
done such kid of job before? Remember that the last 7 days data could be
updated because of the business logic that if a session remains open for
few
days the session end time would be going to update in last few days.
That's
why we are keeping atleast last 7 days data in frontend db.


Reply With Quote
  #5  
Old   
Todd C
 
Posts: n/a

Default Re: How to Transfer data, data archieving, good strategy? - 09-08-2009 , 07:53 AM



Shamshed:
I reviewed your drawing and associated notes. I don't see any major issues
with it. I think your planned layout of the Pub/Sub is correct. It has the
*system* manage the 7 day rule, not user-developed code. With that single
difference from my suggestion I believe you will have a system that will be
easier to maintain. I am by no means an expert on SQL Server Replication, but
I will offer these suggestions:
* Read all you can on replication. BOL, MSDN, Microsoft Press books, on-line
video tutorials.
* Test EVERYTHING fully: every situation you can think of, such as power
failure on your PUB, or a record being edited by both Pub and Sub, etc.
* If you are also looking for high performance and high availability, read
up on log shipping, database mirrors, and clusters, especially how the
interact with replication.

Best of luck to you and your project.
=====
Todd C


"Shamshad Ali" wrote:

Quote:
Hi Todd,

Thank you very much for your suggestion. Based on your suggestions and our
business requirements to meet, I have created a diagram and wanted to share
with you.
Please feel free to ask any questions to understand it first. Based on our
proposed architecture (as depicted in the diagram), Following are my
questions for which your answers will be very helpful


http://w8qm4a.blu.livefilestore.com/...chitecture.gif

1. Does any aspect of this design lead us to a disaster if we implement it?
If yes please point it out and let us know why it could be a disaster and if
there is any better solution exist.
2. Do you think if this architecture will involve heavy maintenance cost
which could be a nightmare for whole project?

Just to let you know our target is to meet high Performance and high
availability with minimum maintenances cost as the system we are developing
will have 100,000 online users transactions at a time.


Shamshad Ali.



"Todd C" <ToddC (AT) discussions (DOT) microsoft.com> wrote in message
news:AE77ACB9-286F-425D-949C-B88DDEE85B6B (AT) microsoft (DOT) com...
Hello:
This sounds like a not too easy task. Replication might work for you, but
you would need to investigate and TEST fully. You could set up your
front-end
machine as the 'master/publisher' and your back-end machine as the
subscriber. The trick would be to:
1) set the subscriber to NEVER delete data, if in fact replication options
allow that
2) set up routines on the front-end to purge data older than X days.

If you can get all the above working, I suggest the following as well:
Store the "7" (days) as a record in a 'Control' table that can be queried
or
retrieved by the delete routines so that should you later decide to retain
10
or 14 days, it is a simple changing of a value, not re-writing code,
possibly
missing some routines! Second, do everything through stored procedures,
and
have another 'control' table that decides the order in which the
procedures
are run. Based on table structure changing, you may need to
add/remove/change
the order of the deleting procedures.

Best of luck to you. I don't envy the job ahead of you!
=====
Todd C


"Shamshad Ali" wrote:

I have two databases Frontend and backend. All data of years since the db
started working is kept in Backend (you can say it as historical data or
achieving and for reporting purpose data.)
The frontend database is used for users live insertions/transactions in
this
database. We only have to keep last 7 days data into this (frontend)
database and rest of the data will be moved to Backend database on daily
bases. This way we will have only last 7 days data into Frontend db.
There are master and detail tables in Frontend and its structure would be
same as in Backend database. We want data should be consistent. I would
like
to know how do I do this job?
Either DTS or Logshipping or write a custom stored procedure to take a
copy
of whole live data of last 7 days and update in backend.
Is there any logic we can build to solve this problem or does anyone has
done such kid of job before? Remember that the last 7 days data could be
updated because of the business logic that if a session remains open for
few
days the session end time would be going to update in last few days.
That's
why we are keeping atleast last 7 days data in frontend db.


Reply With Quote
  #6  
Old   
Shamshad Ali
 
Posts: n/a

Default Re: How to Transfer data, data archieving, good strategy? - 09-08-2009 , 09:42 PM



Hi Todd,

Thank you very much for your suggestions and help. I had already planned
that both Servers would be basically two different clusters. This way I am
sure that we can achieve high performance and high availability. I have not
mentioned earlier in the diagram to make it simple for everyone to
understand the basic idea but we are planned for cluster.

http://w8qm4a.blu.livefilestore.com/...chitecture.gif

One more help, do you know someone who can help me on this design further
and reply quickly? As you said that you are not expert in SQL Server
Replication same for me too . So if you suggest me some one to contact
personally who can take interest in this design and provide help quickly or
a forum where experts are providing answers in more details because I saw in
SQL Replication news group, the response to questions is just like dead
posts. So your suggestion would be a great help once again.


Shamshad Ali.


"Todd C" <ToddC (AT) discussions (DOT) microsoft.com> wrote

Quote:
Shamshed:
I reviewed your drawing and associated notes. I don't see any major issues
with it. I think your planned layout of the Pub/Sub is correct. It has the
*system* manage the 7 day rule, not user-developed code. With that single
difference from my suggestion I believe you will have a system that will
be
easier to maintain. I am by no means an expert on SQL Server Replication,
but
I will offer these suggestions:
* Read all you can on replication. BOL, MSDN, Microsoft Press books,
on-line
video tutorials.
* Test EVERYTHING fully: every situation you can think of, such as power
failure on your PUB, or a record being edited by both Pub and Sub, etc.
* If you are also looking for high performance and high availability, read
up on log shipping, database mirrors, and clusters, especially how the
interact with replication.

Best of luck to you and your project.
=====
Todd C


"Shamshad Ali" wrote:

Hi Todd,

Thank you very much for your suggestion. Based on your suggestions and
our
business requirements to meet, I have created a diagram and wanted to
share
with you.
Please feel free to ask any questions to understand it first. Based on
our
proposed architecture (as depicted in the diagram), Following are my
questions for which your answers will be very helpful


http://w8qm4a.blu.livefilestore.com/...chitecture.gif

1. Does any aspect of this design lead us to a disaster if we implement
it?
If yes please point it out and let us know why it could be a disaster and
if
there is any better solution exist.
2. Do you think if this architecture will involve heavy maintenance cost
which could be a nightmare for whole project?

Just to let you know our target is to meet high Performance and high
availability with minimum maintenances cost as the system we are
developing
will have 100,000 online users transactions at a time.


Shamshad Ali.



"Todd C" <ToddC (AT) discussions (DOT) microsoft.com> wrote in message
news:AE77ACB9-286F-425D-949C-B88DDEE85B6B (AT) microsoft (DOT) com...
Hello:
This sounds like a not too easy task. Replication might work for you,
but
you would need to investigate and TEST fully. You could set up your
front-end
machine as the 'master/publisher' and your back-end machine as the
subscriber. The trick would be to:
1) set the subscriber to NEVER delete data, if in fact replication
options
allow that
2) set up routines on the front-end to purge data older than X days.

If you can get all the above working, I suggest the following as well:
Store the "7" (days) as a record in a 'Control' table that can be
queried
or
retrieved by the delete routines so that should you later decide to
retain
10
or 14 days, it is a simple changing of a value, not re-writing code,
possibly
missing some routines! Second, do everything through stored procedures,
and
have another 'control' table that decides the order in which the
procedures
are run. Based on table structure changing, you may need to
add/remove/change
the order of the deleting procedures.

Best of luck to you. I don't envy the job ahead of you!
=====
Todd C


"Shamshad Ali" wrote:

I have two databases Frontend and backend. All data of years since the
db
started working is kept in Backend (you can say it as historical data
or
achieving and for reporting purpose data.)
The frontend database is used for users live insertions/transactions
in
this
database. We only have to keep last 7 days data into this (frontend)
database and rest of the data will be moved to Backend database on
daily
bases. This way we will have only last 7 days data into Frontend db.
There are master and detail tables in Frontend and its structure would
be
same as in Backend database. We want data should be consistent. I
would
like
to know how do I do this job?
Either DTS or Logshipping or write a custom stored procedure to take a
copy
of whole live data of last 7 days and update in backend.
Is there any logic we can build to solve this problem or does anyone
has
done such kid of job before? Remember that the last 7 days data could
be
updated because of the business logic that if a session remains open
for
few
days the session end time would be going to update in last few days.
That's
why we are keeping atleast last 7 days data in frontend db.


Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.3
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.