Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2000 Forums
 SQL Server Administration (2000)
 Archieving the Database

Author  Topic 

AskSQLTeam
Ask SQLTeam Question

0 Posts

Posted - 2004-09-14 : 08:23:48
Venkata writes "Hi,

I am using MSSQL 2000. Can someone suggest the best practise to Archiving the database. Currently I do like this:

1) Read data from live database.
2) Copy/update into Archive database.
3) Update the archivehistory table on live database.

Few issues that bothering me here.

When I need to insert into Archive database from live.
I can issue a statement like
"INSERT INTO table1
SELECT * FROM dblive.dbo.table1 WHERE ID = 1".
This works fine. After archiving the database later for the same table "Table1", if someone modifies the contents, I need to write a UPDATE statement to update the archive database.

If there any simplest way to write the update statement like the above "INSERT statement".

Please suggest me any best method for Archiving the database(s).

Thanks in advance"

derrickleggett
Pointy Haired Yak DBA

4184 Posts

Posted - 2004-09-14 : 08:39:54
Why are you archiving data that people are still updating? Is there a way around this?

MeanOldDBA
derrickleggett@hotmail.com

When life gives you a lemon, fire the DBA.
Go to Top of Page

RM
Yak Posting Veteran

65 Posts

Posted - 2004-09-14 : 08:51:21
Couldnt understand your scenario fully. How do you track changes done in table1 on live server? You can always drop the old table1 on the archive db and recreate a new table1 with the statement
INSERT INTO table1
SELECT * FROM dblive.dbo.table1 WHERE ID = 1 ;)

Go to Top of Page

jen
Master Smack Fu Yak Hacker

4110 Posts

Posted - 2004-09-14 : 23:47:19
if this is constant updating everytime the live is updated, then you might want to consider replication.
Go to Top of Page
   

- Advertisement -