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.
Author |
Topic |
pankaj.pareek@sparrowi.co
Starting Member
26 Posts |
Posted - 2008-07-28 : 01:24:02
|
Dear All,We need to copy the all database table with data to DB1 to DB2 on daily basis. How to do that in sqlserver 2005 database without data repetations of data.pls help me.ThanksRishi Kumar Sharma |
|
rmiao
Master Smack Fu Yak Hacker
7266 Posts |
Posted - 2008-07-28 : 22:27:47
|
insert into db1..table select * from db2..table where ... |
 |
|
sodeep
Master Smack Fu Yak Hacker
7174 Posts |
Posted - 2008-07-29 : 19:09:00
|
Better to do Backup/restore if you are doing for all tables. |
 |
|
tkizer
Almighty SQL Goddess
38200 Posts |
Posted - 2008-07-29 : 19:12:21
|
If you are going to use rmiao's solution, then you'll need to add a bit more code to handle duplicate data or changed data. You could use NOT EXISTS and then OUTER JOINs.But I'd go with BACKUP/RESTORE like sodeep mentioned. It clones a database.Tara KizerMicrosoft MVP for Windows Server System - SQL Serverhttp://weblogs.sqlteam.com/tarad/Subscribe to my blog |
 |
|
|
|
|