Showing posts with label sp3a. Show all posts
Showing posts with label sp3a. Show all posts

Wednesday, March 28, 2012

Recovery model problem; db properities

Hello,

I've follow problem - thing to consider.

SQLServer 200 sp3a, ms win 2003 server
db simple recovery

There is a production database, wich is around 20gb big. Db is backed
up each day completely, but it takes up to 30 minutes.
Because there is a simple recovery model, there is no transaction log
backup (it fails anyway), and we do not have up-to-point recovery.

I'm considering to switch to full recovery model, but ...
The problem is, I do not want to affect performance (when the backup is
running, database is hardly avalible).

So my question will be: does the full recovery model, will be better
for db performance (for acces and blocking db; means, does it will take
shorter?)
Strategy will be (I hope ok) to back up during the week only
transaction log (incremental), and once at the weekend, full database
backup.

Generaly, which one is better for performance?
Which strategy will be the best, to keep performance at high level, but
also have the possibility to restore data (in case of emergency) from
the newest possible backup.

Thanks for help

Matik"Matik" <marzec@.sauron.xo.pl> wrote in message
news:1140084783.803830.233070@.g14g2000cwa.googlegr oups.com...
> Hello,
>
> I've follow problem - thing to consider.
> SQLServer 200 sp3a, ms win 2003 server
> db simple recovery
> There is a production database, wich is around 20gb big. Db is backed
> up each day completely, but it takes up to 30 minutes.

What's the form of backup? disk, NAS, tape?

> Because there is a simple recovery model, there is no transaction log
> backup (it fails anyway), and we do not have up-to-point recovery.
> I'm considering to switch to full recovery model, but ...
> The problem is, I do not want to affect performance (when the backup is
> running, database is hardly avalible).

That's unusual. Generally a full-backup shouldn't hurt performance that
much.

If it really is, I'd do some more digging and try to find out why.

> So my question will be: does the full recovery model, will be better
> for db performance (for acces and blocking db; means, does it will take
> shorter?)

We do backups of similar size databases every 20 minutes with no noticable
impact on performance. I may eventually move to 10 minute backup windows.
Generally the backups shouldn't be blocking the db at all, the biggest cost
is generally disk I/O.

> Strategy will be (I hope ok) to back up during the week only
> transaction log (incremental), and once at the weekend, full database
> backup.

Only problem with this may be that in the event of a failure, say right
before you do your weekly full, you'll have a LOT of transaction logs to
restore. This will impact your time to recovery, so take that into account.
You may also want to use differential backups during the week to speed
things up in the event of having to recovery.

> Generaly, which one is better for performance?
> Which strategy will be the best, to keep performance at high level, but
> also have the possibility to restore data (in case of emergency) from
> the newest possible backup.
> Thanks for help
> Matik|||Matik (marzec@.sauron.xo.pl) writes:
> I'm considering to switch to full recovery model, but ...
> The problem is, I do not want to affect performance (when the backup is
> running, database is hardly avalible).

Then you have something investigate. The footprint of a backup should
be light. Database should certainly be available during this time.

> So my question will be: does the full recovery model, will be better
> for db performance (for acces and blocking db; means, does it will take
> shorter?)
> Strategy will be (I hope ok) to back up during the week only
> transaction log (incremental), and once at the weekend, full database
> backup.

Daily differential backups would be a better choice in that case.

Most of our customers run a daily full backup, and then translog backups
at least once an hour, some every ten or fifteen minutes.

Depending on your activity in the database, the log can grow big it
you back it up once a day. If your run a maintenance job, it could
grow bigger than the data file itself.

> Generaly, which one is better for performance?
> Which strategy will be the best, to keep performance at high level, but
> also have the possibility to restore data (in case of emergency) from
> the newest possible backup.

The backup strategy should be determined of your requirements for
disaster recovery. If you are content with restoring a backup in
case of failure, continue with simple recovery. Switch to full if
you want up-to-the-point recovery.

A tip is that if you go for full recovery, is that you should allocate
a couple of GB for the log file on the spot, to prevent autogrow
growing the file piece by piece, which could lead to fragmentation
on file-syste level.

--
Erland Sommarskog, SQL Server MVP, esquel@.sommarskog.se

Books Online for SQL Server 2005 at
http://www.microsoft.com/technet/pr...oads/books.mspx
Books Online for SQL Server 2000 at
http://www.microsoft.com/sql/prodin...ions/books.mspxsql

Recovery mode 'magically' changing

I have a database that is the source in a logshipping pair (SQL2k,
SP3a) that is 'magically' changing from Full Recovery to Simple
Recovery. Is there a trace flag I can turn on to catch this change and
where it is being triggered from?
Obviously this is wrecking havoc on my log shipping.
thanks
Meredith RyanYou have it in the errorlog file. You can also run a profiler trace with appropriate events and
filter to catch it.
--
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
http://www.solidqualitylearning.com/
"mryan" <coffegrl@.gmail.com> wrote in message
news:1149807873.715008.262910@.i40g2000cwc.googlegroups.com...
>I have a database that is the source in a logshipping pair (SQL2k,
> SP3a) that is 'magically' changing from Full Recovery to Simple
> Recovery. Is there a trace flag I can turn on to catch this change and
> where it is being triggered from?
> Obviously this is wrecking havoc on my log shipping.
> thanks
> Meredith Ryan
>|||This isn't the master database is it?
--
This posting is provided "AS IS" with no warranties, and confers no rights.
Use of included script samples are subject to the terms specified at
http://www.microsoft.com/info/cpyright.htm
"mryan" <coffegrl@.gmail.com> wrote in message
news:1149807873.715008.262910@.i40g2000cwc.googlegroups.com...
>I have a database that is the source in a logshipping pair (SQL2k,
> SP3a) that is 'magically' changing from Full Recovery to Simple
> Recovery. Is there a trace flag I can turn on to catch this change and
> where it is being triggered from?
> Obviously this is wrecking havoc on my log shipping.
> thanks
> Meredith Ryan
>|||No,
It is a user DB. Looks like two of my user DB's are changing. I know
that it was changed last night between 6:30pm and 9pm - After I changed
it to Full earlier in the day.
-Meredith
Roger Wolter[MSFT] wrote:
> This isn't the master database is it?
> --
> This posting is provided "AS IS" with no warranties, and confers no rights.
> Use of included script samples are subject to the terms specified at
> http://www.microsoft.com/info/cpyright.htm
> "mryan" <coffegrl@.gmail.com> wrote in message
> news:1149807873.715008.262910@.i40g2000cwc.googlegroups.com...
> >I have a database that is the source in a logshipping pair (SQL2k,
> > SP3a) that is 'magically' changing from Full Recovery to Simple
> > Recovery. Is there a trace flag I can turn on to catch this change and
> > where it is being triggered from?
> > Obviously this is wrecking havoc on my log shipping.
> >
> > thanks
> > Meredith Ryan
> >|||I don't see anything with value in the Error Log. I do see the Error:
15457... message, but with the error log only showing me a SPID I
can't track down who is making the change.
Also,. All occurances of Error 15457 show that the Advanced Config
changed from 1 to 1. Wouldn't that signify no change at all?
Tibor Karaszi wrote:
> You have it in the errorlog file. You can also run a profiler trace with appropriate events and
> filter to catch it.
> --
> Tibor Karaszi, SQL Server MVP
> http://www.karaszi.com/sqlserver/default.asp
> http://www.solidqualitylearning.com/
>
> "mryan" <coffegrl@.gmail.com> wrote in message
> news:1149807873.715008.262910@.i40g2000cwc.googlegroups.com...
> >I have a database that is the source in a logshipping pair (SQL2k,
> > SP3a) that is 'magically' changing from Full Recovery to Simple
> > Recovery. Is there a trace flag I can turn on to catch this change and
> > where it is being triggered from?
> > Obviously this is wrecking havoc on my log shipping.
> >
> > thanks
> > Meredith Ryan
> >|||> Also,. All occurances of Error 15457 show that the Advanced Config
> changed from 1 to 1. Wouldn't that signify no change at all?
That is just EM setting advanced option when you show properties on a server. Not related to this
problem.
Perhaps 2000 doesn't show this in eventlog, I looked at 2005. I'd do a profiler trace to see who it
is.
--
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
http://www.solidqualitylearning.com/
"mryan" <coffegrl@.gmail.com> wrote in message
news:1149868370.743087.299980@.u72g2000cwu.googlegroups.com...
>I don't see anything with value in the Error Log. I do see the Error:
> 15457... message, but with the error log only showing me a SPID I
> can't track down who is making the change.
> Also,. All occurances of Error 15457 show that the Advanced Config
> changed from 1 to 1. Wouldn't that signify no change at all?
> Tibor Karaszi wrote:
>> You have it in the errorlog file. You can also run a profiler trace with appropriate events and
>> filter to catch it.
>> --
>> Tibor Karaszi, SQL Server MVP
>> http://www.karaszi.com/sqlserver/default.asp
>> http://www.solidqualitylearning.com/
>>
>> "mryan" <coffegrl@.gmail.com> wrote in message
>> news:1149807873.715008.262910@.i40g2000cwc.googlegroups.com...
>> >I have a database that is the source in a logshipping pair (SQL2k,
>> > SP3a) that is 'magically' changing from Full Recovery to Simple
>> > Recovery. Is there a trace flag I can turn on to catch this change and
>> > where it is being triggered from?
>> > Obviously this is wrecking havoc on my log shipping.
>> >
>> > thanks
>> > Meredith Ryan
>> >
>

Recovery mode 'magically' changing

I have a database that is the source in a logshipping pair (SQL2k,
SP3a) that is 'magically' changing from Full Recovery to Simple
Recovery. Is there a trace flag I can turn on to catch this change and
where it is being triggered from?
Obviously this is wrecking havoc on my log shipping.
thanks
Meredith RyanYou have it in the errorlog file. You can also run a profiler trace with app
ropriate events and
filter to catch it.
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
http://www.solidqualitylearning.com/
"mryan" <coffegrl@.gmail.com> wrote in message
news:1149807873.715008.262910@.i40g2000cwc.googlegroups.com...
>I have a database that is the source in a logshipping pair (SQL2k,
> SP3a) that is 'magically' changing from Full Recovery to Simple
> Recovery. Is there a trace flag I can turn on to catch this change and
> where it is being triggered from?
> Obviously this is wrecking havoc on my log shipping.
> thanks
> Meredith Ryan
>|||This isn't the master database is it?
This posting is provided "AS IS" with no warranties, and confers no rights.
Use of included script samples are subject to the terms specified at
http://www.microsoft.com/info/cpyright.htm
"mryan" <coffegrl@.gmail.com> wrote in message
news:1149807873.715008.262910@.i40g2000cwc.googlegroups.com...
>I have a database that is the source in a logshipping pair (SQL2k,
> SP3a) that is 'magically' changing from Full Recovery to Simple
> Recovery. Is there a trace flag I can turn on to catch this change and
> where it is being triggered from?
> Obviously this is wrecking havoc on my log shipping.
> thanks
> Meredith Ryan
>|||No,
It is a user DB. Looks like two of my user DB's are changing. I know
that it was changed last night between 6:30pm and 9pm - After I changed
it to Full earlier in the day.
-Meredith
Roger Wolter[MSFT] wrote:[vbcol=seagreen]
> This isn't the master database is it?
> --
> This posting is provided "AS IS" with no warranties, and confers no rights
.
> Use of included script samples are subject to the terms specified at
> http://www.microsoft.com/info/cpyright.htm
> "mryan" <coffegrl@.gmail.com> wrote in message
> news:1149807873.715008.262910@.i40g2000cwc.googlegroups.com...|||I don't see anything with value in the Error Log. I do see the Error:
15457... message, but with the error log only showing me a SPID I
can't track down who is making the change.
Also,. All occurances of Error 15457 show that the Advanced Config
changed from 1 to 1. Wouldn't that signify no change at all?
Tibor Karaszi wrote:[vbcol=seagreen]
> You have it in the errorlog file. You can also run a profiler trace with a
ppropriate events and
> filter to catch it.
> --
> Tibor Karaszi, SQL Server MVP
> http://www.karaszi.com/sqlserver/default.asp
> http://www.solidqualitylearning.com/
>
> "mryan" <coffegrl@.gmail.com> wrote in message
> news:1149807873.715008.262910@.i40g2000cwc.googlegroups.com...|||> Also,. All occurances of Error 15457 show that the Advanced Config
> changed from 1 to 1. Wouldn't that signify no change at all?
That is just EM setting advanced option when you show properties on a server
. Not related to this
problem.
Perhaps 2000 doesn't show this in eventlog, I looked at 2005. I'd do a profi
ler trace to see who it
is.
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
http://www.solidqualitylearning.com/
"mryan" <coffegrl@.gmail.com> wrote in message
news:1149868370.743087.299980@.u72g2000cwu.googlegroups.com...
>I don't see anything with value in the Error Log. I do see the Error:
> 15457... message, but with the error log only showing me a SPID I
> can't track down who is making the change.
> Also,. All occurances of Error 15457 show that the Advanced Config
> changed from 1 to 1. Wouldn't that signify no change at all?
> Tibor Karaszi wrote:
>

Saturday, February 25, 2012

Recording Changes to Records in SQL Server 2000 (SP3a)

Hi all,
I am interested in your feed back to this question and I know their may be
lots of replies and I am hoping with your replies it might give me an idea as
to go.
I have a SQL Server 2000 Database with loads of table for storing
information about people, addresses, products we sell all that kind of stuff.
What I would like to do is have some way of recoring all the changes made to
any entry so that we can view a history of lets say address changes. I am
looking for SQL Server 2000 to do all this recording automaticly for me. I
don't want to have to create more tables to store the old data. I just want
away of recording each change, so if only 1 column is changed then only the
columns previous value is stored, with details of when it was changed and by
who.
A modal or your ideas will be of great help.
Dr. Paul Caesar
CoullByte (UK) Limited
YOu can buy a product (www.lumigent.com) to do this or you can do it
yourself.
Normally, one would create triggers, and add history tables. When a change
is made the trigger automatically records the history.
Since you do not wish to create any new tables, then it seems your option is
to store things in existing tables. While generally not a good idea, it can
be done, but you would have to add some sort of flag to differentiate
between the LIVE rows and the history rows.. You would still write code and
put it into a trigger...
Wayne Snyder, MCDBA, SQL Server MVP
Mariner, Charlotte, NC
www.mariner-usa.com
(Please respond only to the newsgroups.)
I support the Professional Association of SQL Server (PASS) and it's
community of SQL Server professionals.
www.sqlpass.org
"Dr. Paul Caesar - CoullByte (UK) Limited"
<DrPaulCaesarCoullByteUKLimited@.discussions.micros oft.com> wrote in message
news:52652137-FFAD-4A87-B9B0-159418A5FE55@.microsoft.com...
> Hi all,
> I am interested in your feed back to this question and I know their may be
> lots of replies and I am hoping with your replies it might give me an idea
as
> to go.
> I have a SQL Server 2000 Database with loads of table for storing
> information about people, addresses, products we sell all that kind of
stuff.
> What I would like to do is have some way of recoring all the changes made
to
> any entry so that we can view a history of lets say address changes. I am
> looking for SQL Server 2000 to do all this recording automaticly for me. I
> don't want to have to create more tables to store the old data. I just
want
> away of recording each change, so if only 1 column is changed then only
the
> columns previous value is stored, with details of when it was changed and
by
> who.
> A modal or your ideas will be of great help.
> Dr. Paul Caesar
> CoullByte (UK) Limited
|||"Dr. Paul Caesar - CoullByte (UK) Limited"
<DrPaulCaesarCoullByteUKLimited@.discussions.micros oft.com> wrote in message
news:52652137-FFAD-4A87-B9B0-159418A5FE55@.microsoft.com...
> Hi all,
> I am interested in your feed back to this question and I know their may be
> lots of replies and I am hoping with your replies it might give me an idea
> as
> to go.
> I have a SQL Server 2000 Database with loads of table for storing
> information about people, addresses, products we sell all that kind of
> stuff.
> What I would like to do is have some way of recoring all the changes made
> to
> any entry so that we can view a history of lets say address changes. I am
> looking for SQL Server 2000 to do all this recording automaticly for me. I
> don't want to have to create more tables to store the old data. I just
> want
> away of recording each change, so if only 1 column is changed then only
> the
> columns previous value is stored, with details of when it was changed and
> by
> who.
> A modal or your ideas will be of great help.
> Dr. Paul Caesar
> CoullByte (UK) Limited
I have seen (and implemented) a solution to this with a single history
table. I then created triggers on the tables I wished to track. In the
history table, I have stored a simple XML document (as an nvarchar) which
looks similar to the following:
<row DateModified=' ' TableName=' ' ColumnName=' ' OldValue=' '
NewValue=' ' ModifiedBy=' ' />
HTH
Rick Sawtell
MCT, MCSD, MCDBA
|||Hi all, again, thanks for input so far, some more information which might help.
Lets say I have an Address table and a Orders table for a customer. If that
customer changes their address I don't want all the previous orders to lose
the previous address information. So I link the order address with the
address table. This allows me to follow orders at addresses to help aid fraud
prevation and also saves us recording duplicate information in the database.
Also if say a cutomer chages their surname I want the previous orders to keep
the old details but the old details will be marked in some way so we know it
was changed. Another example would be to have a product price table so we
could track price changes in a product or category of products.
Hope this extra information helps.
Dr. Paul Caesar
CoullByte (UK) Limited

Recording Changes to Records in SQL Server 2000 (SP3a)

Hi all,
I am interested in your feed back to this question and I know their may be
lots of replies and I am hoping with your replies it might give me an idea as
to go.
I have a SQL Server 2000 Database with loads of table for storing
information about people, addresses, products we sell all that kind of stuff.
What I would like to do is have some way of recoring all the changes made to
any entry so that we can view a history of lets say address changes. I am
looking for SQL Server 2000 to do all this recording automaticly for me. I
don't want to have to create more tables to store the old data. I just want
away of recording each change, so if only 1 column is changed then only the
columns previous value is stored, with details of when it was changed and by
who.
A modal or your ideas will be of great help.
Dr. Paul Caesar
CoullByte (UK) LimitedYOu can buy a product (www.lumigent.com) to do this or you can do it
yourself.
Normally, one would create triggers, and add history tables. When a change
is made the trigger automatically records the history.
Since you do not wish to create any new tables, then it seems your option is
to store things in existing tables. While generally not a good idea, it can
be done, but you would have to add some sort of flag to differentiate
between the LIVE rows and the history rows.. You would still write code and
put it into a trigger...
Wayne Snyder, MCDBA, SQL Server MVP
Mariner, Charlotte, NC
www.mariner-usa.com
(Please respond only to the newsgroups.)
I support the Professional Association of SQL Server (PASS) and it's
community of SQL Server professionals.
www.sqlpass.org
"Dr. Paul Caesar - CoullByte (UK) Limited"
<DrPaulCaesarCoullByteUKLimited@.discussions.microsoft.com> wrote in message
news:52652137-FFAD-4A87-B9B0-159418A5FE55@.microsoft.com...
> Hi all,
> I am interested in your feed back to this question and I know their may be
> lots of replies and I am hoping with your replies it might give me an idea
as
> to go.
> I have a SQL Server 2000 Database with loads of table for storing
> information about people, addresses, products we sell all that kind of
stuff.
> What I would like to do is have some way of recoring all the changes made
to
> any entry so that we can view a history of lets say address changes. I am
> looking for SQL Server 2000 to do all this recording automaticly for me. I
> don't want to have to create more tables to store the old data. I just
want
> away of recording each change, so if only 1 column is changed then only
the
> columns previous value is stored, with details of when it was changed and
by
> who.
> A modal or your ideas will be of great help.
> Dr. Paul Caesar
> CoullByte (UK) Limited|||"Dr. Paul Caesar - CoullByte (UK) Limited"
<DrPaulCaesarCoullByteUKLimited@.discussions.microsoft.com> wrote in message
news:52652137-FFAD-4A87-B9B0-159418A5FE55@.microsoft.com...
> Hi all,
> I am interested in your feed back to this question and I know their may be
> lots of replies and I am hoping with your replies it might give me an idea
> as
> to go.
> I have a SQL Server 2000 Database with loads of table for storing
> information about people, addresses, products we sell all that kind of
> stuff.
> What I would like to do is have some way of recoring all the changes made
> to
> any entry so that we can view a history of lets say address changes. I am
> looking for SQL Server 2000 to do all this recording automaticly for me. I
> don't want to have to create more tables to store the old data. I just
> want
> away of recording each change, so if only 1 column is changed then only
> the
> columns previous value is stored, with details of when it was changed and
> by
> who.
> A modal or your ideas will be of great help.
> Dr. Paul Caesar
> CoullByte (UK) Limited
I have seen (and implemented) a solution to this with a single history
table. I then created triggers on the tables I wished to track. In the
history table, I have stored a simple XML document (as an nvarchar) which
looks similar to the following:
<row DateModified=' ' TableName=' ' ColumnName=' ' OldValue=' '
NewValue=' ' ModifiedBy=' ' />
HTH
Rick Sawtell
MCT, MCSD, MCDBA|||Hi all, again, thanks for input so far, some more information which might help.
Lets say I have an Address table and a Orders table for a customer. If that
customer changes their address I don't want all the previous orders to lose
the previous address information. So I link the order address with the
address table. This allows me to follow orders at addresses to help aid fraud
prevation and also saves us recording duplicate information in the database.
Also if say a cutomer chages their surname I want the previous orders to keep
the old details but the old details will be marked in some way so we know it
was changed. Another example would be to have a product price table so we
could track price changes in a product or category of products.
Hope this extra information helps.
Dr. Paul Caesar
CoullByte (UK) Limited

Recording Changes to Records in SQL Server 2000 (SP3a)

Hi all,
I am interested in your feed back to this question and I know their may be
lots of replies and I am hoping with your replies it might give me an idea a
s
to go.
I have a SQL Server 2000 Database with loads of table for storing
information about people, addresses, products we sell all that kind of stuff
.
What I would like to do is have some way of recoring all the changes made to
any entry so that we can view a history of lets say address changes. I am
looking for SQL Server 2000 to do all this recording automaticly for me. I
don't want to have to create more tables to store the old data. I just want
away of recording each change, so if only 1 column is changed then only the
columns previous value is stored, with details of when it was changed and by
who.
A modal or your ideas will be of great help.
Dr. Paul Caesar
CoullByte (UK) LimitedYOu can buy a product (www.lumigent.com) to do this or you can do it
yourself.
Normally, one would create triggers, and add history tables. When a change
is made the trigger automatically records the history.
Since you do not wish to create any new tables, then it seems your option is
to store things in existing tables. While generally not a good idea, it can
be done, but you would have to add some sort of flag to differentiate
between the LIVE rows and the history rows.. You would still write code and
put it into a trigger...
Wayne Snyder, MCDBA, SQL Server MVP
Mariner, Charlotte, NC
www.mariner-usa.com
(Please respond only to the newsgroups.)
I support the Professional Association of SQL Server (PASS) and it's
community of SQL Server professionals.
www.sqlpass.org
"Dr. Paul Caesar - CoullByte (UK) Limited"
< DrPaulCaesarCoullByteUKLimited@.discussio
ns.microsoft.com> wrote in message
news:52652137-FFAD-4A87-B9B0-159418A5FE55@.microsoft.com...
> Hi all,
> I am interested in your feed back to this question and I know their may be
> lots of replies and I am hoping with your replies it might give me an idea
as
> to go.
> I have a SQL Server 2000 Database with loads of table for storing
> information about people, addresses, products we sell all that kind of
stuff.
> What I would like to do is have some way of recoring all the changes made
to
> any entry so that we can view a history of lets say address changes. I am
> looking for SQL Server 2000 to do all this recording automaticly for me. I
> don't want to have to create more tables to store the old data. I just
want
> away of recording each change, so if only 1 column is changed then only
the
> columns previous value is stored, with details of when it was changed and
by
> who.
> A modal or your ideas will be of great help.
> Dr. Paul Caesar
> CoullByte (UK) Limited|||"Dr. Paul Caesar - CoullByte (UK) Limited"
< DrPaulCaesarCoullByteUKLimited@.discussio
ns.microsoft.com> wrote in message
news:52652137-FFAD-4A87-B9B0-159418A5FE55@.microsoft.com...
> Hi all,
> I am interested in your feed back to this question and I know their may be
> lots of replies and I am hoping with your replies it might give me an idea
> as
> to go.
> I have a SQL Server 2000 Database with loads of table for storing
> information about people, addresses, products we sell all that kind of
> stuff.
> What I would like to do is have some way of recoring all the changes made
> to
> any entry so that we can view a history of lets say address changes. I am
> looking for SQL Server 2000 to do all this recording automaticly for me. I
> don't want to have to create more tables to store the old data. I just
> want
> away of recording each change, so if only 1 column is changed then only
> the
> columns previous value is stored, with details of when it was changed and
> by
> who.
> A modal or your ideas will be of great help.
> Dr. Paul Caesar
> CoullByte (UK) Limited
I have seen (and implemented) a solution to this with a single history
table. I then created triggers on the tables I wished to track. In the
history table, I have stored a simple XML document (as an nvarchar) which
looks similar to the following:
<row DateModified=' ' TableName=' ' ColumnName=' ' OldValue=' '
NewValue=' ' ModifiedBy=' ' />
HTH
Rick Sawtell
MCT, MCSD, MCDBA|||Hi all, again, thanks for input so far, some more information which might he
lp.
Lets say I have an Address table and a Orders table for a customer. If that
customer changes their address I don't want all the previous orders to lose
the previous address information. So I link the order address with the
address table. This allows me to follow orders at addresses to help aid frau
d
prevation and also saves us recording duplicate information in the database.
Also if say a cutomer chages their surname I want the previous orders to kee
p
the old details but the old details will be marked in some way so we know it
was changed. Another example would be to have a product price table so we
could track price changes in a product or category of products.
Hope this extra information helps.
Dr. Paul Caesar
CoullByte (UK) Limited