Sunday, February 19, 2012

A problem with "DTSTransferObjectsTask"

Hi,
I use "DTSTransferObjectsTask" to copy an attached database file. Everything
works fine.
But if the package wants to copy a view with the content
"CREATE VIEW dbo.Archive AS SELECT
[W2K_PROF_PCS7_TLG_S_200509220929].dbo.Archive.* FROM
[W2K_PROF_PCS7_TLG_S_200509220929].dbo.Archive"
I get the error:
"Invalid object name 'W2K_PROF_PCS7_TLG_S_200509220929.dbo.Archive'"
The error is correct because the database W2K_PROF_PCS7_TLG_S_200509220929
is not attached.
Is there any way to perform a successful transfer of the whole database ?
(may be without syntax check)
The backup function inside the Microsoft SQL Enterprise Manager copies the
whole database with the view and with no errors.
Many thanks in advance.
Robert Glaser.Hi
I don't think there is a way to do this except exclude the externally
dependent views and create them later when you have a database present.
John
"Robert Glaser" wrote:

> Hi,
> I use "DTSTransferObjectsTask" to copy an attached database file. Everythi
ng
> works fine.
> But if the package wants to copy a view with the content
> "CREATE VIEW dbo.Archive AS SELECT
> [W2K_PROF_PCS7_TLG_S_200509220929].dbo.Archive.* FROM
> [W2K_PROF_PCS7_TLG_S_200509220929].dbo.Archive"
> I get the error:
> "Invalid object name 'W2K_PROF_PCS7_TLG_S_200509220929.dbo.Archive'"
> The error is correct because the database W2K_PROF_PCS7_TLG_S_200509220929
> is not attached.
> Is there any way to perform a successful transfer of the whole database ?
> (may be without syntax check)
> The backup function inside the Microsoft SQL Enterprise Manager copies the
> whole database with the view and with no errors.
> Many thanks in advance.
> Robert Glaser.
>
>

No comments:

Post a Comment