Wednesday, March 7, 2012

Copy Content from Db1 (inconsistent) to Db2

Hi,
the consistency check on my Db1 failed. Though the database seems to be
intact, how ever all tools fail e.g. DTS with error messages.
Does anybody know how to copy the content from Db1 to DB2 (schema is the
same)?
Thanks for any advice
Graham
Graham SmithHi
What is the error you are getting?
"Graham Smith" <graham.smith@.bbank.com> wrote in message
news:eJvV8gu3FHA.2640@.TK2MSFTNGP09.phx.gbl...
> Hi,
> the consistency check on my Db1 failed. Though the database seems to be
> intact, how ever all tools fail e.g. DTS with error messages.
> Does anybody know how to copy the content from Db1 to DB2 (schema is the
> same)?
> Thanks for any advice
> Graham
> --
> Graham Smith
>|||insert into db2.owner.tablename
select * from db1.owner.tablename
Or DTS
or backup DB1 and restore on DB2
----
--
"I sense many useless updates in you... Useless updates lead to
fragmentation... Fragmentation leads to downtime...Downtime leads to
suffering..Fragmentation is the path to the darkside.. DBCC INDEXDEFRAG
and DBCC DBREINDEX are the force...May the force be with you" --
http://sqlservercode.blogspot.com/|||Hi,

> insert into db2.owner.tablename
> select * from db1.owner.tablename
thanks a lot. That works great. I have about 30 tables. Do you know how to
script that this statement loops through all user tables?
Thanks in advance
Graham

No comments:

Post a Comment